All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH v1 1/1] e1000e: fix buffer overrun while the I219 is processing DMA transactions
@ 2017-08-06 13:49 Sasha Neftin
  2017-08-18  2:56 ` Brown, Aaron F
  0 siblings, 1 reply; 4+ messages in thread
From: Sasha Neftin @ 2017-08-06 13:49 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: Dima Ruinskiy <dima.ruinskiy@intel.com>
Reviewed-by: Raanan Avargil <raanan.avargil@intel.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 2dcb5463d9b8..ea20c3fc542f 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -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,9 @@ 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 */
+		reg_val &= ~BIT(28);
+		reg_val |= BIT(29);
 		ew32(TARC(0), reg_val);
 	}
 }
-- 
2.11.0


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

* [Intel-wired-lan] [PATCH v1 1/1] e1000e: fix buffer overrun while the I219 is processing DMA transactions
  2017-08-06 13:49 Sasha Neftin
@ 2017-08-18  2:56 ` Brown, Aaron F
  0 siblings, 0 replies; 4+ messages in thread
From: Brown, Aaron F @ 2017-08-18  2:56 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, August 6, 2017 6:49 AM
> To: Neftin, Sasha <sasha.neftin@intel.com>; Ruinskiy, Dima
> <dima.ruinskiy@intel.com>; Avargil, Raanan <raanan.avargil@intel.com>;
> intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH v1 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: Dima Ruinskiy <dima.ruinskiy@intel.com>
> Reviewed-by: Raanan Avargil <raanan.avargil@intel.com>
> ---
>  drivers/net/ethernet/intel/e1000e/netdev.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

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

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

* [Intel-wired-lan] [PATCH v1 1/1] e1000e: fix buffer overrun while the I219 is processing DMA transactions
@ 2017-10-25 12:23 Sasha Neftin
  2017-10-25 15:20 ` Jeff Kirsher
  0 siblings, 1 reply; 4+ messages in thread
From: Sasha Neftin @ 2017-10-25 12:23 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  | 11 ++++++++---
 2 files changed, 10 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 327dfe5bedc0..d4179ec1344c 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -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);
 	}
 }
-- 
2.11.0


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

* [Intel-wired-lan] [PATCH v1 1/1] e1000e: fix buffer overrun while the I219 is processing DMA transactions
  2017-10-25 12:23 [Intel-wired-lan] [PATCH v1 1/1] e1000e: fix buffer overrun while the I219 is processing DMA transactions Sasha Neftin
@ 2017-10-25 15:20 ` Jeff Kirsher
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Kirsher @ 2017-10-25 15:20 UTC (permalink / raw)
  To: intel-wired-lan

On Wed, 2017-10-25 at 15:23 +0300, Sasha Neftin wrote:
> 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  | 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>

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

end of thread, other threads:[~2017-10-25 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-25 12:23 [Intel-wired-lan] [PATCH v1 1/1] e1000e: fix buffer overrun while the I219 is processing DMA transactions Sasha Neftin
2017-10-25 15:20 ` Jeff Kirsher
  -- strict thread matches above, loose matches on Subject: below --
2017-08-06 13:49 Sasha Neftin
2017-08-18  2:56 ` 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.