e1000e: fix buffer overrun while the I219 is processing DMA transactions
Subsystems (2)
PATCH 1/1 e1000e: fix buffer overrun while the I219 is processing DMA transactions
Description: Intel? 100/200 Series Chipset platforms reduced the round-trip latency for the LAN Controller DMA accesses, causing in some high performance cases a buffer overrun while the I219 LAN Connected Device is processing the DMA transactions. I219LM and I219V devices can fall into unrecovered Tx hang under very stressfully UDP traffic and multiple reconnection of Ethernet cable. This Tx hang of the LAN Controller is only recovered if the system is rebooted. Slightly slow down DMA access by reducing the number of outstanding requests. This workaround could have an impact on TCP traffic performance on the platform. Disabling TSO eliminates performance loss for TCP traffic without a noticeable impact on CPU performance.
Please, refer to I218/I219 specification update:
https://www.intel.com/content/www/us/en/embedded/products/networking/
ethernet-connection-i218-family-documentation.html
--- drivers/net/ethernet/intel/e1000e/ich8lan.h | 3 ++- drivers/net/ethernet/intel/e1000e/netdev.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/e1000e/ich8lan.h +2 -1
@@ -113,7 +113,8 @@#define NVM_SIZE_MULTIPLIER 4096/*multiplier for NVMS field */ #define E1000_FLASH_BASE_ADDR 0xE000/*offset of NVM access regs */ #define E1000_CTRL_EXT_NVMVS 0x3/*NVM valid sector */ -#define E1000_TARC0_CB_MULTIQ_3_REQ (1 << 28 | 1 << 29) +#define E1000_TARC0_CB_MULTIQ_3_REQ 0x30000000 +#define E1000_TARC0_CB_MULTIQ_2_REQ 0x20000000#define PCIE_ICH8_SNOOP_ALL PCIE_NO_SNOOP_ALL#define E1000_ICH_RAR_ENTRIES 7
drivers/net/ethernet/intel/e1000e/netdev.c +8 -3
@@ -3004,8 +3004,8 @@ static void e1000_configure_tx(struct e1000_adapter *adapter) hw->mac.ops.config_collision_dist (hw); -/* SPT and CNP Si errata workaround to avoid data corruption */ -if (hw->mac.type >= e1000_pch_spt) { +/* SPT and KBL Si errata workaround to avoid data corruption */ +if (hw->mac.type == e1000_pch_spt) {u32 reg_val; reg_val =er32 (IOSFPC );
@@ -3013,7 +3013,12 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)ew32 (IOSFPC , reg_val); reg_val =er32 (TARC (0 )); - reg_val |=E1000_TARC0_CB_MULTIQ_3_REQ ; +/* SPT and KBL Si errata workaround to avoid Tx hang. +* Dropping the number of outstanding requests from +* the in favor of 2 in order to avoid a buffer overrun. +*/ + reg_val &= ~E1000_TARC0_CB_MULTIQ_3_REQ ; + reg_val |=E1000_TARC0_CB_MULTIQ_2_REQ ;ew32 (TARC (0 ), reg_val); } }
Signature · 1 line
2.11.0
PATCH 1/1 e1000e: fix buffer overrun while the I219 is processing DMA transactions
Quoted 17 lines · Sasha Neftin
Description: Intel? 100/200 Series Chipset platforms reduced the round-trip latency for the LAN Controller DMA accesses, causing in some high performance cases a buffer overrun while the I219 LAN Connected Device is processing the DMA transactions. I219LM and I219V devices can fall into unrecovered Tx hang under very stressfully UDP traffic and multiple reconnection of Ethernet cable. This Tx hang of the LAN Controller is only recovered if the system is rebooted. Slightly slow down DMA access by reducing the number of outstanding requests. This workaround could have an impact on TCP traffic performance on the platform. Disabling TSO eliminates performance loss for TCP traffic without a noticeable impact on CPU performance.
Please, refer to I218/I219 specification update:
https://www.intel.com/content/www/us/en/embedded/products/networking/
ethernet-connection-i218-family-documentation.html
Quoted 8 lines
Signed-off-by Sasha Neftin <[email protected]>Reviewed-by Alexander H Duyck <[email protected]>Reviewed-by Dima Ruinskiy <[email protected]>Reviewed-by Raanan Avargil <[email protected]>--- drivers/net/ethernet/intel/e1000e/ich8lan.h | 3 ++- drivers/net/ethernet/intel/e1000e/netdev.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-)
Sasha, you generated this patch against an old tree and many of these changes are already upstream in Dave's net-next tree, so this patch does not apply cleanly.
Please rebase your patch against my latest next-queue tree, dev-queue
branch and submit a v2 please.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20171025/2b3cdd73/attachment.asc>