提交 d1b08284 编写于 作者: I Ian Campbell 提交者: David S. Miller

macvtap: convert to SKB paged frag API.

Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 787343ad
无相关合并请求
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部