summaryrefslogtreecommitdiff
path: root/drivers/net/macvtap.c
diff options
context:
space:
mode:
authorIan Campbell <Ian.Campbell@citrix.com>2011-08-31 00:46:56 +0000
committerDavid S. Miller <davem@davemloft.net>2011-09-15 15:34:59 -0400
commitd1b08284ade773eb6aae680de03132eec618f2cd (patch)
tree5f8f536f6121119fe7cdc7dbdbb586e647c8de85 /drivers/net/macvtap.c
parent787343ad3d321fc987e36715433050df88353465 (diff)
downloadlwn-d1b08284ade773eb6aae680de03132eec618f2cd.tar.gz
lwn-d1b08284ade773eb6aae680de03132eec618f2cd.zip
macvtap: convert to SKB paged frag API.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvtap.c')
-rw-r--r--drivers/net/macvtap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index ab96c319a240..7c3f84acfdfb 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -503,10 +503,10 @@ static int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *from,
skb->truesize += len;
atomic_add(len, &skb->sk->sk_wmem_alloc);
while (len) {
- f = &skb_shinfo(skb)->frags[i];
- f->page = page[i];
- f->page_offset = base & ~PAGE_MASK;
- f->size = min_t(int, len, PAGE_SIZE - f->page_offset);
+ __skb_fill_page_desc(
+ skb, i, page[i],
+ base & ~PAGE_MASK,
+ min_t(int, len, PAGE_SIZE - f->page_offset));
skb_shinfo(skb)->nr_frags++;
/* increase sk_wmem_alloc */
base += f->size;