All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH v2 1/1] e1000e: fix buffer overrun while the I219 is processing DMA transactions
@ 2017-11-06  6:31 Sasha Neftin
  2017-11-10  3:10 ` Brown, Aaron F
  0 siblings, 1 reply; 2+ messages in thread
From: Sasha Neftin @ 2017-11-06  6:31 UTC (permalink / raw)
  To: intel-wired-lan

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

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Reviewed-by: Alexander H Duyck <alexander.h.duyck@intel.com>
Reviewed-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
Reviewed-by: Raanan Avargil <raanan.avargil@intel.com>
---
 drivers/net/ethernet/intel/e1000e/ich8lan.h | 3 ++-
 drivers/net/ethernet/intel/e1000e/netdev.c  | 9 ++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.h b/drivers/net/ethernet/intel/e1000e/ich8lan.h
index 67163ca898ba..e23d8da9b15b 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.h
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.h
@@ -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
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index f2f49239b015..9f18d39bdc8f 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -3034,9 +3034,12 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)
 		ew32(IOSFPC, reg_val);
 
 		reg_val = er32(TARC(0));
-		/* SPT and KBL Si errata workaround to avoid Tx hang */
-		reg_val &= ~BIT(28);
-		reg_val |= BIT(29);
+		/* SPT and KBL Si errata workaround to avoid Tx hang.
+		 * Dropping the number of outstanding requests from
+		 * 3 to 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);
 	}
 }
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Intel-wired-lan] [PATCH v2 1/1] e1000e: fix buffer overrun while the I219 is processing DMA transactions
  2017-11-06  6:31 [Intel-wired-lan] [PATCH v2 1/1] e1000e: fix buffer overrun while the I219 is processing DMA transactions Sasha Neftin
@ 2017-11-10  3:10 ` Brown, Aaron F
  0 siblings, 0 replies; 2+ messages in thread
From: Brown, Aaron F @ 2017-11-10  3:10 UTC (permalink / raw)
  To: intel-wired-lan

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf
> Of Sasha Neftin
> Sent: Sunday, November 5, 2017 10:32 PM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Neftin, Sasha
> <sasha.neftin@intel.com>; intel-wired-lan at lists.osuosl.org; Avargil, Raanan
> <raanan.avargil@intel.com>; Duyck, Alexander H
> <alexander.h.duyck@intel.com>; Ruinskiy, Dima <dima.ruinskiy@intel.com>
> Subject: [Intel-wired-lan] [PATCH v2 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/networki
> ng/
> ethernet-connection-i218-family-documentation.html
> 
> Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
> Reviewed-by: Alexander H Duyck <alexander.h.duyck@intel.com>
> Reviewed-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
> Reviewed-by: Raanan Avargil <raanan.avargil@intel.com>
> ---
>  drivers/net/ethernet/intel/e1000e/ich8lan.h | 3 ++-
>  drivers/net/ethernet/intel/e1000e/netdev.c  | 9 ++++++---
>  2 files changed, 8 insertions(+), 4 deletions(-)

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-10  3:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06  6:31 [Intel-wired-lan] [PATCH v2 1/1] e1000e: fix buffer overrun while the I219 is processing DMA transactions Sasha Neftin
2017-11-10  3:10 ` Brown, Aaron F

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.