linux/drivers/net/ethernet/intel/e1000e
Akihiko Odaki eed913f691 e1000e: Fix TX dispatch condition
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: bc7f75fa97 ("[E1000E]: New pci-express e1000 driver (currently for ICH9 devices only)")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2022-11-30 11:26:55 -08:00
..
80003es2lan.c
80003es2lan.h
82571.c
82571.h
defines.h
e1000.h e1000e: convert .adjfreq to .adjfine 2022-07-28 10:57:06 -07:00
ethtool.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
hw.h Revert "e1000e: Fix possible HW unit hang after an s0ix exit" 2022-07-14 09:17:21 -07:00
ich8lan.c Revert "e1000e: Fix possible HW unit hang after an s0ix exit" 2022-07-14 09:17:21 -07:00
ich8lan.h Revert "e1000e: Fix possible HW unit hang after an s0ix exit" 2022-07-14 09:17:21 -07:00
mac.c intel/e1000e:fix repeated words in comments 2022-06-30 10:49:06 -07:00
mac.h
Makefile
manage.c
manage.h
netdev.c e1000e: Fix TX dispatch condition 2022-11-30 11:26:55 -08:00
nvm.c
nvm.h
param.c intel: remove unused macros 2022-06-30 09:40:55 -07:00
phy.c drivers/net/ethernet/e1000e: check return value of e1e_rphy() 2022-09-08 08:25:48 -07:00
phy.h
ptp.c e1000e: convert .adjfreq to .adjfine 2022-07-28 10:57:06 -07:00
regs.h