netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Wei Fang <wei.fang@nxp.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"edumazet@google.com" <edumazet@google.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [PATCH net] docs: net: clarify the NAPI rules around XDP Tx
Date: Thu, 20 Jul 2023 20:07:00 -0700	[thread overview]
Message-ID: <20230720200700.162b29c6@kernel.org> (raw)
In-Reply-To: <AM5PR04MB3139FC41B234823EE28424E2883FA@AM5PR04MB3139.eurprd04.prod.outlook.com>

On Fri, 21 Jul 2023 02:35:41 +0000 Wei Fang wrote:
> > -In other words, it is recommended to ignore the budget argument when
> > -performing TX buffer reclamation to ensure that the reclamation is not
> > -arbitrarily bounded; however, it is required to honor the budget argument -for
> > RX processing.
> > +In other words for Rx processing the ``budget`` argument limits how
> > +many packets driver can process in a single poll. Rx specific APIs like
> > +page pool or XDP cannot be used at all when ``budget`` is 0.
> > +skb Tx processing should happen regardless of the ``budget``, but if
> > +the argument is 0 driver cannot call any XDP (or page pool) APIs.
> >   
> Can I ask a stupid question why tx processing cannot call any XDP (or page pool)
> APIs if the "budget" is 0?

Because in that case we may be in an interrupt context, and page pool
assumes it's either in process or softirq context. See commit
afbed3f74830 ("net/mlx5e: do as little as possible in napi poll when
budget is 0") for an example stack trace.


  reply	other threads:[~2023-07-21  3:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 16:13 [PATCH net] docs: net: clarify the NAPI rules around XDP Tx Jakub Kicinski
2023-07-21  2:35 ` Wei Fang
2023-07-21  3:07   ` Jakub Kicinski [this message]
2023-07-21  4:31     ` Wei Fang
2023-07-22  2:10 ` patchwork-bot+netdevbpf
2023-07-25 17:30 ` Alexander H Duyck
2023-07-25 18:55   ` Jakub Kicinski
2023-07-25 20:10     ` Alexander Duyck
2023-07-25 20:41       ` Jakub Kicinski
2023-07-26  0:02         ` Alexander Duyck
2023-07-26  0:56           ` Jakub Kicinski

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=20230720200700.162b29c6@kernel.org \
    --to=kuba@kernel.org \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=wei.fang@nxp.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).