lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <AM5PR04MB3139FC41B234823EE28424E2883FA@AM5PR04MB3139.eurprd04.prod.outlook.com>
Date: Fri, 21 Jul 2023 02:35:41 +0000
From: Wei Fang <wei.fang@....com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "edumazet@...gle.com"
	<edumazet@...gle.com>, "pabeni@...hat.com" <pabeni@...hat.com>,
	"corbet@....net" <corbet@....net>, "linux-doc@...r.kernel.org"
	<linux-doc@...r.kernel.org>, "davem@...emloft.net" <davem@...emloft.net>
Subject: RE: [PATCH net] docs: net: clarify the NAPI rules around XDP Tx

> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: 2023年7月21日 0:13
> To: davem@...emloft.net
> Cc: netdev@...r.kernel.org; edumazet@...gle.com; pabeni@...hat.com;
> Jakub Kicinski <kuba@...nel.org>; corbet@....net; linux-doc@...r.kernel.org
> Subject: [PATCH net] docs: net: clarify the NAPI rules around XDP Tx
> 
> page pool and XDP should not be accessed from IRQ context which may
> happen if drivers try to clean up XDP TX with NAPI budget of 0.
> 
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> CC: corbet@....net
> CC: linux-doc@...r.kernel.org
> ---
>  Documentation/networking/napi.rst | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/networking/napi.rst
> b/Documentation/networking/napi.rst
> index a7a047742e93..7bf7b95c4f7a 100644
> --- a/Documentation/networking/napi.rst
> +++ b/Documentation/networking/napi.rst
> @@ -65,15 +65,16 @@ argument - drivers can process completions for any
> number of Tx  packets but should only process up to ``budget`` number of
> Rx packets. Rx processing is usually much more expensive.
> 
> -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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ