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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f1041c3e-5962-44a0-92c1-021b2466f7a3@intel.com>
Date: Wed, 3 Dec 2025 16:39:36 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Michael Chan <michael.chan@...adcom.com>, <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <edumazet@...gle.com>, <kuba@...nel.org>,
	<pabeni@...hat.com>, <andrew+netdev@...n.ch>, <pavan.chebbi@...adcom.com>,
	<andrew.gospodarek@...adcom.com>, <pdubovitsky@...a.com>, Kalesh AP
	<kalesh-anakkur.purayil@...adcom.com>
Subject: Re: [PATCH net] bnxt_en: Fix XDP_TX path



On 12/2/2025 4:30 PM, Michael Chan wrote:
> For XDP_TX action in bnxt_rx_xdp(), clearing of the event flags is not
> correct.  __bnxt_poll_work() -> bnxt_rx_pkt() -> bnxt_rx_xdp() may be
> looping within NAPI and some event flags may be set in earlier
> iterations.  In particular, if BNXT_TX_EVENT is set earlier indicating
> some XDP_TX packets are ready and pending, it will be cleared if it is
> XDP_TX action again.  Normally, we will set BNXT_TX_EVENT again when we
> successfully call __bnxt_xmit_xdp().  But if the TX ring has no more
> room, the flag will not be set.  This will cause the TX producer to be
> ahead but the driver will not hit the TX doorbell.
> 
> For multi-buf XDP_TX, there is no need to clear the event flags and set
> BNXT_AGG_EVENT.  The BNXT_AGG_EVENT flag should have been set earlier in
> bnxt_rx_pkt().
> 
> The visible symptom of this is that the RX ring associated with the
> TX XDP ring will eventually become empty and all packets will be dropped.
> Because this condition will cause the driver to not refill the RX ring
> seeing that the TX ring has forever pending XDP_TX packets.
> 
> The fix is to only clear BNXT_RX_EVENT when we have successfully
> called __bnxt_xmit_xdp().
> 
> Fixes: 7f0a168b0441 ("bnxt_en: Add completion ring pointer in TX and RX ring structures")
> Reported-by: Pavel Dubovitsky <pdubovitsky@...a.com>
> Reviewed-by: Andy Gospodarek <andrew.gospodarek@...adcom.com>
> Reviewed-by: Pavan Chebbi <pavan.chebbi@...adcom.com>
> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@...adcom.com>
> Signed-off-by: Michael Chan <michael.chan@...adcom.com>
> ---
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>


Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ