linux/drivers/net/ethernet/intel
Bruce Allan d821a4c4d1 e1000e: DoS while TSO enabled caused by link partner with small MSS
With a low enough MSS on the link partner and TSO enabled locally, the
networking stack can periodically send a very large (e.g.  64KB) TCP
message for which the driver will attempt to use more Tx descriptors than
are available by default in the Tx ring.  This is due to a workaround in
the code that imposes a limit of only 4 MSS-sized segments per descriptor
which appears to be a carry-over from the older e1000 driver and may be
applicable only to some older PCI or PCIx parts which are not supported in
e1000e.  When the driver gets a message that is too large to fit across the
configured number of Tx descriptors, it stops the upper stack from queueing
any more and gets stuck in this state.  After a timeout, the upper stack
assumes the adapter is hung and calls the driver to reset it.

Remove the unnecessary limitation of using up to only 4 MSS-sized segments
per Tx descriptor, and put in a hard failure test to catch when attempting
to check for message sizes larger than would fit in the whole Tx ring.
Refactor the remaining logic that limits the size of data per Tx descriptor
from a seemingly arbitrary 8KB to a limit based on the dynamic size of the
Tx packet buffer as described in the hardware specification.

Also, fix the logic in the check for space in the Tx ring for the next
largest possible packet after the current one has been successfully queued
for transmit, and use the appropriate defines for default ring sizes in
e1000_probe instead of magic values.

This issue goes back to the introduction of e1000e in 2.6.24 when it was
split off from e1000.

Reported-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Cc: Stable <stable@vger.kernel.org> [2.6.24+]
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-30 12:40:22 -04:00
..
e1000 e1000: advertise transmit time stamping 2012-07-22 12:33:32 -07:00
e1000e e1000e: DoS while TSO enabled caused by link partner with small MSS 2012-08-30 12:40:22 -04:00
igb igb: Fix register defines for all non-82575 hardware 2012-08-09 02:36:05 -07:00
igbvf drivers/net/ethernet: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:46 -07:00
ixgb ixgb: use PCI_VENDOR_ID_INTEL 2012-07-20 10:59:41 -07:00
ixgbe ixgbe: add missing braces 2012-08-10 16:51:23 -07:00
ixgbevf netvm: propagate page->pfmemalloc from skb_alloc_page to skb 2012-07-31 18:42:46 -07:00
Kconfig Kconfig: Fix Kconfig for Intel ixgbe and igb PTP support. 2012-06-20 00:52:54 -07:00
Makefile
e100.c net: e100: ucode is optional in some cases 2012-07-19 10:48:07 -07:00