Patch "e1000e: Fix TX dispatch condition" has been added to the 5.4-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

    e1000e: Fix TX dispatch condition

to the 5.4-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:
     e1000e-fix-tx-dispatch-condition.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 318c5d246d712931f1370259b626673ee64366b9
Author: Akihiko Odaki <akihiko.odaki@xxxxxxxxxx>
Date:   Fri Oct 28 22:00:00 2022 +0900

    e1000e: Fix TX dispatch condition
    
    [ Upstream commit eed913f6919e253f35d454b2f115f2a4db2b741a ]
    
    e1000_xmit_frame is expected to stop the queue and dispatch frames to
    hardware if there is not sufficient space for the next frame in the
    buffer, but sometimes it failed to do so because the estimated maximum
    size of frame was wrong. As the consequence, the later invocation of
    e1000_xmit_frame failed with NETDEV_TX_BUSY, and the frame in the buffer
    remained forever, resulting in a watchdog failure.
    
    This change fixes the estimated size by making it match with the
    condition for NETDEV_TX_BUSY. Apparently, the old estimation failed to
    account for the following lines which determines the space requirement
    for not causing NETDEV_TX_BUSY:
        ```
            /* reserve a descriptor for the offload context */
            if ((mss) || (skb->ip_summed == CHECKSUM_PARTIAL))
                    count++;
            count++;
    
            count += DIV_ROUND_UP(len, adapter->tx_fifo_limit);
        ```
    
    This issue was found when running http-stress02 test included in Linux
    Test Project 20220930 on QEMU with the following commandline:
    ```
    qemu-system-x86_64 -M q35,accel=kvm -m 8G -smp 8
            -drive if=virtio,format=raw,file=root.img,file.locking=on
            -device e1000e,netdev=netdev
            -netdev tap,script=ifup,downscript=no,id=netdev
    ```
    
    Fixes: bc7f75fa9788 ("[E1000E]: New pci-express e1000 driver (currently for ICH9 devices only)")
    Signed-off-by: Akihiko Odaki <akihiko.odaki@xxxxxxxxxx>
    Tested-by: Gurucharan G <gurucharanx.g@xxxxxxxxx> (A Contingent worker at Intel)
    Tested-by: Naama Meir <naamax.meir@xxxxxxxxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index cbd83bb5c1ac..b0d43985724d 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -5916,9 +5916,9 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
 		e1000_tx_queue(tx_ring, tx_flags, count);
 		/* Make sure there is space in the ring for the next send. */
 		e1000_maybe_stop_tx(tx_ring,
-				    (MAX_SKB_FRAGS *
+				    ((MAX_SKB_FRAGS + 1) *
 				     DIV_ROUND_UP(PAGE_SIZE,
-						  adapter->tx_fifo_limit) + 2));
+						  adapter->tx_fifo_limit) + 4));
 
 		if (!netdev_xmit_more() ||
 		    netif_xmit_stopped(netdev_get_tx_queue(netdev, 0))) {



[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