Re: [RFC PATCH v3 08/12] net: support non paged skb frags

2023-11-13 Thread Jakub Kicinski
On Sun, 12 Nov 2023 22:05:30 -0800 Mina Almasry wrote: > My issue here is that all these skb helpers call each other so I end > up having to move a lot of the unrelated skb helpers to this new > header (maybe that is acceptable but it feels weird). Splitting pp headers again is not an option, we

Re: [RFC PATCH v3 08/12] net: support non paged skb frags

2023-11-12 Thread Mina Almasry
On Fri, Nov 10, 2023 at 3:19 PM Jakub Kicinski wrote: > > On Sun, 5 Nov 2023 18:44:07 -0800 Mina Almasry wrote: > > #include > > #include > > +#include > > +#include > > > /** > > * DOC: skb checksums > > @@ -3402,15 +3404,38 @@ static inline void skb_frag_off_copy(skb_frag_t > >

Re: [RFC PATCH v3 08/12] net: support non paged skb frags

2023-11-10 Thread Jakub Kicinski
On Sun, 5 Nov 2023 18:44:07 -0800 Mina Almasry wrote: > #include > #include > +#include > +#include > /** > * DOC: skb checksums > @@ -3402,15 +3404,38 @@ static inline void skb_frag_off_copy(skb_frag_t > *fragto, > fragto->bv_offset = fragfrom->bv_offset; > } > > +/* Returns

Re: [RFC PATCH v3 08/12] net: support non paged skb frags

2023-11-09 Thread Mina Almasry
On Thu, Nov 9, 2023 at 1:15 AM Paolo Abeni wrote: > > On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: > [...] > > @@ -3421,7 +3446,7 @@ static inline struct page *skb_frag_page(const > > skb_frag_t *frag) > > */ > > static inline void __skb_frag_ref(skb_frag_t *frag) > > { > > -

Re: [RFC PATCH v3 08/12] net: support non paged skb frags

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: [...] > @@ -3421,7 +3446,7 @@ static inline struct page *skb_frag_page(const > skb_frag_t *frag) > */ > static inline void __skb_frag_ref(skb_frag_t *frag) > { > - get_page(skb_frag_page(frag)); > +

Re: [RFC PATCH v3 08/12] net: support non paged skb frags

2023-11-08 Thread Yunsheng Lin
On 2023/11/8 5:19, Mina Almasry wrote: >> >> > > My personal immediate reaction is that this may just introduce code > churn without significant benefit. If an unsuspecting caller call > skb_frag_page() on devmem frag and doesn't correctly handle NULL > return, it will crash or error out anyway,

Re: [RFC PATCH v3 08/12] net: support non paged skb frags

2023-11-07 Thread Mina Almasry
On Tue, Nov 7, 2023 at 1:00 AM Yunsheng Lin wrote: > > On 2023/11/6 10:44, Mina Almasry wrote: > > Make skb_frag_page() fail in the case where the frag is not backed > > by a page, and fix its relevent callers to handle this case. > > > > Correctly handle skb_frag refcounting in the

Re: [RFC PATCH v3 08/12] net: support non paged skb frags

2023-11-07 Thread Yunsheng Lin
On 2023/11/6 10:44, Mina Almasry wrote: > Make skb_frag_page() fail in the case where the frag is not backed > by a page, and fix its relevent callers to handle this case. > > Correctly handle skb_frag refcounting in the page_pool_iovs case. > > Signed-off-by: Mina Almasry > ... > /** > *

[RFC PATCH v3 08/12] net: support non paged skb frags

2023-11-05 Thread Mina Almasry
Make skb_frag_page() fail in the case where the frag is not backed by a page, and fix its relevent callers to handle this case. Correctly handle skb_frag refcounting in the page_pool_iovs case. Signed-off-by: Mina Almasry --- include/linux/skbuff.h | 42