Patch "net: ena: Flush XDP packets on error." has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: ena: Flush XDP packets on error.

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-ena-flush-xdp-packets-on-error.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 861379702c677287bc96ec069a6229106a441b14
Author: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Date:   Mon Sep 18 17:36:09 2023 +0200

    net: ena: Flush XDP packets on error.
    
    [ Upstream commit 6f411fb5ca9419090bee6a0a46425e0a5060b734 ]
    
    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@xxxxxxxxxx>
    Cc: David Arinzon <darinzon@xxxxxxxxxx>
    Cc: Noam Dagan <ndagan@xxxxxxxxxx>
    Cc: Saeed Bishara <saeedb@xxxxxxxxxx>
    Cc: Shay Agroskin <shayagr@xxxxxxxxxx>
    Fixes: a318c70ad152b ("net: ena: introduce XDP redirect implementation")
    Acked-by: Arthur Kiyanovski <akiyano@xxxxxxxxxx>
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
    Acked-by: Jesper Dangaard Brouer <hawk@xxxxxxxxxx>
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 5ce01ac72637e..42a66b74c1e5b 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -1778,6 +1778,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) {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux