linux/drivers/net/ethernet/intel/e1000e
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
..
80003es2lan.c e1000e: Driver workaround for IPv6 Header Extension Erratum. 2012-05-03 02:29:04 -07:00
82571.c e1000e: 82571 Tx Data Corruption during Tx hang recovery 2012-08-07 00:41:36 -07:00
Makefile e1000e: update copyright year 2012-01-26 19:01:17 -08:00
defines.h e1000e: remove use of IP payload checksum 2012-07-01 00:25:32 -07:00
e1000.h e1000e: DoS while TSO enabled caused by link partner with small MSS 2012-08-30 12:40:22 -04:00
ethtool.c e1000e: advertise transmit time stamping 2012-07-22 12:33:32 -07:00
hw.h e1000e: initial support for i217 2012-05-04 03:15:06 -07:00
ich8lan.c e1000e: fix test for PHY being accessible on 82577/8/9 and I217 2012-07-14 00:45:45 -07:00
mac.c e1000e: test for valid check_reset_block function pointer 2012-06-05 20:47:50 -07:00
manage.c e1000e: cleanup boolean logic 2012-04-14 02:05:00 -07:00
netdev.c e1000e: DoS while TSO enabled caused by link partner with small MSS 2012-08-30 12:40:22 -04:00
nvm.c e1000e: rename e1000e_reload_nvm() and call as function pointer 2012-02-24 21:43:21 -08:00
param.c e1000e: use more informative logging macros when netdev not yet registered 2012-06-14 03:03:14 -07:00
phy.c e1000e: test for valid check_reset_block function pointer 2012-06-05 20:47:50 -07:00