bnxt_en: Flush XDP for bnxt_poll_nitroa0()'s NAPI
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 18 Sep 2023 15:36:10 +0000 (17:36 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 21 Sep 2023 07:01:41 +0000 (09:01 +0200)
commitedc0140cc3b7b91874ebe70eb7d2a851e8817ccc
tree7dc149b93a71a674e3a17d76f7811c7edb0d5e78
parent6f411fb5ca9419090bee6a0a46425e0a5060b734
bnxt_en: Flush XDP for bnxt_poll_nitroa0()'s NAPI

bnxt_poll_nitroa0() invokes bnxt_rx_pkt() which can run a XDP program
which in turn can return XDP_REDIRECT. bnxt_rx_pkt() is also used by
__bnxt_poll_work() which flushes (xdp_do_flush()) the packets after each
round. bnxt_poll_nitroa0() lacks this feature.
xdp_do_flush() should be invoked before leaving the NAPI callback.

Invoke xdp_do_flush() after a redirect in bnxt_poll_nitroa0() NAPI.

Cc: Michael Chan <michael.chan@broadcom.com>
Fixes: f18c2b77b2e4e ("bnxt_en: optimized XDP_REDIRECT support")
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c