From: Jakub Kicinski <kuba@kernel.org>
To: Dragos Tatulea <dtatulea@nvidia.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
"dsahern@kernel.org" <dsahern@kernel.org>,
"steffen.klassert@secunet.com" <steffen.klassert@secunet.com>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"edumazet@google.com" <edumazet@google.com>,
"almasrymina@google.com" <almasrymina@google.com>,
Leon Romanovsky <leonro@nvidia.com>,
Gal Pressman <gal@nvidia.com>,
"Anatoli.Chechelnickiy@m.interpipe.biz"
<Anatoli.Chechelnickiy@m.interpipe.biz>,
"ian.kumlien@gmail.com" <ian.kumlien@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v2] net: esp: fix bad handling of pages from page_pool
Date: Wed, 6 Mar 2024 19:53:59 -0800 [thread overview]
Message-ID: <20240306195359.1afb26d2@kernel.org> (raw)
In-Reply-To: <9ac9ffa9d11907dcb4a300bf4e81545b7acc40d6.camel@nvidia.com>
On Wed, 6 Mar 2024 19:09:58 +0000 Dragos Tatulea wrote:
> > Changes in v2:
> > - Added napi_page_unref api based on discussion in v1 [0].
> >
> > [0]https://lore.kernel.org/netdev/CAHS8izOoO-EovwMwAm9tLYetwikNPxC0FKyVGu1TPJWSz4bGoA@mail.gmail.com/T/#t
> >
> Jakub, are you sure that it is ok to have all this in a single patch?
Yup.
> > ---
> > include/linux/skbuff.h | 10 +++++++---
> > net/ipv4/esp4.c | 16 ++++++++++------
> > net/ipv6/esp6.c | 16 ++++++++++------
> > 3 files changed, 27 insertions(+), 15 deletions(-)
> >
> > diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> > index 696e7680656f..009603db2a43 100644
> > --- a/include/linux/skbuff.h
> > +++ b/include/linux/skbuff.h
> > @@ -3453,10 +3453,8 @@ int skb_cow_data_for_xdp(struct page_pool *pool, struct sk_buff **pskb,
> > bool napi_pp_put_page(struct page *page, bool napi_safe);
> >
> > static inline void
> > -napi_frag_unref(skb_frag_t *frag, bool recycle, bool napi_safe)
> > +napi_page_unref(struct page *page, bool recycle, bool napi_safe)
I'd call it skb_page_unref()
The napi_ prefix will just confuse people, because we don't have to be
in NAPI context at all when calling this. As long as "napi_safe" is
correctly set to false. So let's use skb_ as the prefix.
And I'd pass skb to this, not "bool recycle" so that the caller doesn't
have to know the weird details..
next prev parent reply other threads:[~2024-03-07 3:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 19:08 [RFC PATCH v2] net: esp: fix bad handling of pages from page_pool Dragos Tatulea
2024-03-06 19:09 ` Dragos Tatulea
2024-03-07 3:53 ` Jakub Kicinski [this message]
2024-03-06 21:15 ` Mina Almasry
2024-03-07 9:35 ` Dragos Tatulea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240306195359.1afb26d2@kernel.org \
--to=kuba@kernel.org \
--cc=Anatoli.Chechelnickiy@m.interpipe.biz \
--cc=almasrymina@google.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=herbert@gondor.apana.org.au \
--cc=ian.kumlien@gmail.com \
--cc=leonro@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=steffen.klassert@secunet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).