Commit d1b08284 authored by Ian Campbell's avatar Ian Campbell Committed by David S. Miller

macvtap: convert to SKB paged frag API.

Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 787343ad
...@@ -503,10 +503,10 @@ static int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *from, ...@@ -503,10 +503,10 @@ static int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *from,
skb->truesize += len; skb->truesize += len;
atomic_add(len, &skb->sk->sk_wmem_alloc); atomic_add(len, &skb->sk->sk_wmem_alloc);
while (len) { while (len) {
f = &skb_shinfo(skb)->frags[i]; __skb_fill_page_desc(
f->page = page[i]; skb, i, page[i],
f->page_offset = base & ~PAGE_MASK; base & ~PAGE_MASK,
f->size = min_t(int, len, PAGE_SIZE - f->page_offset); min_t(int, len, PAGE_SIZE - f->page_offset));
skb_shinfo(skb)->nr_frags++; skb_shinfo(skb)->nr_frags++;
/* increase sk_wmem_alloc */ /* increase sk_wmem_alloc */
base += f->size; base += f->size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment