Re: [PATCH 04/12 v2 RFC] skbuff: Push status and refcounts into sock_zerocopy_callback

2020-12-22 Thread Willem de Bruijn
On Tue, Dec 22, 2020 at 12:48 PM Jonathan Lemon wrote: > > On Tue, Dec 22, 2020 at 09:43:39AM -0500, Willem de Bruijn wrote: > > On Mon, Dec 21, 2020 at 7:09 PM Jonathan Lemon > > wrote: > > > > > > From: Jonathan Lemon > > > > > > Before this change, the caller of sock_zerocopy_callback would

Re: [PATCH 04/12 v2 RFC] skbuff: Push status and refcounts into sock_zerocopy_callback

2020-12-22 Thread Jonathan Lemon
On Tue, Dec 22, 2020 at 09:43:39AM -0500, Willem de Bruijn wrote: > On Mon, Dec 21, 2020 at 7:09 PM Jonathan Lemon > wrote: > > > > From: Jonathan Lemon > > > > Before this change, the caller of sock_zerocopy_callback would > > need to save the zerocopy status, decrement and check the refcount,

Re: [PATCH 04/12 v2 RFC] skbuff: Push status and refcounts into sock_zerocopy_callback

2020-12-22 Thread David Ahern
On 12/22/20 7:43 AM, Willem de Bruijn wrote: > >> void sock_zerocopy_put(struct ubuf_info *uarg) >> { >> - if (uarg && refcount_dec_and_test(&uarg->refcnt)) >> + if (uarg) >> uarg->callback(uarg, uarg->zerocopy); >> } >> EXPORT_SYMBOL_GPL(sock_zerocopy_put); > > Th

Re: [PATCH 04/12 v2 RFC] skbuff: Push status and refcounts into sock_zerocopy_callback

2020-12-22 Thread Willem de Bruijn
On Mon, Dec 21, 2020 at 7:09 PM Jonathan Lemon wrote: > > From: Jonathan Lemon > > Before this change, the caller of sock_zerocopy_callback would > need to save the zerocopy status, decrement and check the refcount, > and then call the callback function - the callback was only invoked > when the

[PATCH 04/12 v2 RFC] skbuff: Push status and refcounts into sock_zerocopy_callback

2020-12-21 Thread Jonathan Lemon
From: Jonathan Lemon Before this change, the caller of sock_zerocopy_callback would need to save the zerocopy status, decrement and check the refcount, and then call the callback function - the callback was only invoked when the refcount reached zero. Now, the caller just passes the status into