Re: [PATCH RFC v2 02/12] sock: skb_copy_ubufs support for compound pages

2017-02-22 Thread Willem de Bruijn
>> >> - page = alloc_page(gfp_mask); >> + page = skb_frag_page(f); >> + if (page_count(page) == 1) { >> + skb_frag_ref(skb, i); > > This could be : get_page(page); Ah, indeed. Thanks. > >> + goto copy_done; >> +

Re: [PATCH RFC v2 02/12] sock: skb_copy_ubufs support for compound pages

2017-02-22 Thread Eric Dumazet
On Wed, 2017-02-22 at 11:38 -0500, Willem de Bruijn wrote: > From: Willem de Bruijn > > Refine skb_copy_ubufs to support compount pages. With upcoming TCP > and UDP zerocopy sendmsg, such fragments may appear. > > These skbuffs can have both kernel and zerocopy fragments,

[PATCH RFC v2 02/12] sock: skb_copy_ubufs support for compound pages

2017-02-22 Thread Willem de Bruijn
From: Willem de Bruijn Refine skb_copy_ubufs to support compount pages. With upcoming TCP and UDP zerocopy sendmsg, such fragments may appear. These skbuffs can have both kernel and zerocopy fragments, e.g., when corking. Avoid unnecessary copying of fragments that have no