Skip to content

Commit

Permalink
macvtap: convert to SKB paged frag API.
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ian Campbell authored and David S. Miller committed Sep 15, 2011
1 parent 787343a commit d1b0828
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/macvtap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d1b0828

Please sign in to comment.