[dpdk-stable] patch 'net/e1000: fix buffer overrun while i219 processing DMA' has been queued to LTS release 18.11.3
Kevin Traynor
ktraynor at redhat.com
Wed Aug 28 15:42:27 CEST 2019
Hi,
FYI, your patch has been queued to LTS release 18.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 09/04/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/377737e44f3660720a01ebca9363be23d1a9c8d4
Thanks.
Kevin Traynor
---
>From 377737e44f3660720a01ebca9363be23d1a9c8d4 Mon Sep 17 00:00:00 2001
From: Xiao Zhang <xiao.zhang at intel.com>
Date: Sun, 21 Jul 2019 01:01:37 +0800
Subject: [PATCH] net/e1000: fix buffer overrun while i219 processing DMA
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit f0027fa182c7f3badea96a1e993eb74aae53309d ]
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: Xiao Zhang <xiao.zhang at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.h | 1 +
drivers/net/e1000/em_rxtx.c | 16 ++++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index bc4ed1dd2..9ee94f6b3 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -134,4 +134,5 @@ POSSIBILITY OF SUCH DAMAGE.
#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_2_REQ (1 << 29)
#define PCIE_ICH8_SNOOP_ALL PCIE_NO_SNOOP_ALL
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 0057dd01b..67c7ec701 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -1965,4 +1965,20 @@ eth_em_tx_init(struct rte_eth_dev *dev)
(E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT));
+ /* SPT and CNP Si errata workaround to avoid data corruption */
+ if (hw->mac.type == e1000_pch_spt) {
+ uint32_t reg_val;
+ reg_val = E1000_READ_REG(hw, E1000_IOSFPC);
+ reg_val |= E1000_RCTL_RDMTS_HEX;
+ E1000_WRITE_REG(hw, E1000_IOSFPC, reg_val);
+
+ /* Dropping the number of outstanding requests from
+ * 3 to 2 in order to avoid a buffer overrun.
+ */
+ reg_val = E1000_READ_REG(hw, E1000_TARC(0));
+ reg_val &= ~E1000_TARC0_CB_MULTIQ_3_REQ;
+ reg_val |= E1000_TARC0_CB_MULTIQ_2_REQ;
+ E1000_WRITE_REG(hw, E1000_TARC(0), reg_val);
+ }
+
/* This write will effectively turn on the transmit unit. */
E1000_WRITE_REG(hw, E1000_TCTL, tctl);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-08-28 14:32:34.896766686 +0100
+++ 0052-net-e1000-fix-buffer-overrun-while-i219-processing-D.patch 2019-08-28 14:32:31.723955532 +0100
@@ -1 +1 @@
-From f0027fa182c7f3badea96a1e993eb74aae53309d Mon Sep 17 00:00:00 2001
+From 377737e44f3660720a01ebca9363be23d1a9c8d4 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit f0027fa182c7f3badea96a1e993eb74aae53309d ]
+
@@ -25,2 +26,0 @@
-Cc: stable at dpdk.org
-
@@ -45 +45 @@
-index 708f832b0..9d7cbc409 100644
+index 0057dd01b..67c7ec701 100644
More information about the stable
mailing list