Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
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;