mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 04:20:23 +09:00
net: ena: Flush XDP packets on error.
[ Upstream commit6f411fb5ca] xdp_do_flush() should be invoked before leaving the NAPI poll function after a XDP-redirect. This is not the case if the driver leaves via the error path (after having a redirect in one of its previous iterations). Invoke xdp_do_flush() also in the error path. Cc: Arthur Kiyanovski <akiyano@amazon.com> Cc: David Arinzon <darinzon@amazon.com> Cc: Noam Dagan <ndagan@amazon.com> Cc: Saeed Bishara <saeedb@amazon.com> Cc: Shay Agroskin <shayagr@amazon.com> Fixes:a318c70ad1("net: ena: introduce XDP redirect implementation") Acked-by: Arthur Kiyanovski <akiyano@amazon.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Jesper Dangaard Brouer <hawk@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
07b569051f
commit
56d2418a07
@@ -1788,6 +1788,9 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi,
|
||||
return work_done;
|
||||
|
||||
error:
|
||||
if (xdp_flags & ENA_XDP_REDIRECT)
|
||||
xdp_do_flush();
|
||||
|
||||
adapter = netdev_priv(rx_ring->netdev);
|
||||
|
||||
if (rc == -ENOSPC) {
|
||||
|
||||
Reference in New Issue
Block a user