Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

igbvf: do not modify tx_queue_len on link speed change

Previously the driver tweaked txqueuelen to avoid false Tx hang reports seen at half duplex.
This had the effect of overriding user set values on link change/reset. Testing shows that
adjusting only the timeout factor is sufficient to prevent Tx hang reports at half duplex.

Based on e1000e patch by Franco Fichtner <franco@lastsummer.de>

CC: Franco Fichtner <franco@lastsummer.de>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Emil Tantilov and committed by
David S. Miller
a08af745 6a2bad70

+1 -11
-1
drivers/net/igbvf/igbvf.h
··· 198 198 struct igbvf_ring *tx_ring /* One per active queue */ 199 199 ____cacheline_aligned_in_smp; 200 200 201 - unsigned long tx_queue_len; 202 201 unsigned int restart_queue; 203 202 u32 txd_cmd; 204 203
+1 -10
drivers/net/igbvf/netdev.c
··· 1304 1304 1305 1305 /* enable Report Status bit */ 1306 1306 adapter->txd_cmd |= E1000_ADVTXD_DCMD_RS; 1307 - 1308 - adapter->tx_queue_len = adapter->netdev->tx_queue_len; 1309 1307 } 1310 1308 1311 1309 /** ··· 1522 1524 1523 1525 del_timer_sync(&adapter->watchdog_timer); 1524 1526 1525 - netdev->tx_queue_len = adapter->tx_queue_len; 1526 1527 netif_carrier_off(netdev); 1527 1528 1528 1529 /* record the stats before reset*/ ··· 1854 1857 &adapter->link_duplex); 1855 1858 igbvf_print_link_info(adapter); 1856 1859 1857 - /* 1858 - * tweak tx_queue_len according to speed/duplex 1859 - * and adjust the timeout factor 1860 - */ 1861 - netdev->tx_queue_len = adapter->tx_queue_len; 1860 + /* adjust timeout factor according to speed/duplex */ 1862 1861 adapter->tx_timeout_factor = 1; 1863 1862 switch (adapter->link_speed) { 1864 1863 case SPEED_10: 1865 1864 txb2b = 0; 1866 - netdev->tx_queue_len = 10; 1867 1865 adapter->tx_timeout_factor = 16; 1868 1866 break; 1869 1867 case SPEED_100: 1870 1868 txb2b = 0; 1871 - netdev->tx_queue_len = 100; 1872 1869 /* maybe add some timeout factor ? */ 1873 1870 break; 1874 1871 }