Skip to content
Commit 917eeb22 authored by Ray Jui's avatar Ray Jui Committed by Greg Kroah-Hartman
Browse files

bnxt_en: Prevent XDP redirect from running when stopping TX queue

[ Upstream commit 27d4073f ]

Add checks in the XDP redirect callback to prevent XDP from running when
the TX ring is undergoing shutdown.

Also remove redundant checks in the XDP redirect callback to validate the
txr and the flag that indicates the ring supports XDP. The modulo
arithmetic on 'tx_nr_rings_xdp' already guarantees the derived TX
ring is an XDP ring.  txr is also guaranteed to be valid after checking
BNXT_STATE_OPEN and within RCU grace period.

Fixes: f18c2b77

 ("bnxt_en: optimized XDP_REDIRECT support")
Reviewed-by: default avatarVladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Signed-off-by: default avatarRay Jui <ray.jui@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 154fc224
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment