]> Git Repo - linux.git/commit
bnxt: don't handle XDP in netpoll
authorJakub Kicinski <[email protected]>
Fri, 28 Jul 2023 20:50:20 +0000 (13:50 -0700)
committerJakub Kicinski <[email protected]>
Mon, 31 Jul 2023 21:28:39 +0000 (14:28 -0700)
commit37b61cda9c1606cd8b6445d900ca9dc03185e8b6
treecae7311b38243f08b5fc3c6b745a740b881c0a4d
parent4b31fd4d77ffa430d0b74ba1885ea0a41594f202
bnxt: don't handle XDP in netpoll

Similarly to other recently fixed drivers make sure we don't
try to access XDP or page pool APIs when NAPI budget is 0.
NAPI budget of 0 may mean that we are in netpoll.

This may result in running software IRQs in hard IRQ context,
leading to deadlocks or crashes.

To make sure bnapi->tx_pkts don't get wiped without handling
the events, move clearing the field into the handler itself.
Remember to clear tx_pkts after reset (bnxt_enable_napi())
as it's technically possible that netpoll will accumulate
some tx_pkts and then a reset will happen, leaving tx_pkts
out of sync with reality.

Fixes: 322b87ca55f2 ("bnxt_en: add page_pool support")
Reviewed-by: Andy Gospodarek <[email protected]>
Reviewed-by: Michael Chan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h
This page took 0.059865 seconds and 4 git commands to generate.