From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CC3CFA0613 for ; Wed, 28 Aug 2019 15:43:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C184C1C246; Wed, 28 Aug 2019 15:43:57 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 167681C241 for ; Wed, 28 Aug 2019 15:43:57 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 89F0918B3D88; Wed, 28 Aug 2019 13:43:56 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-52.ams2.redhat.com [10.36.117.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A18A4116; Wed, 28 Aug 2019 13:43:55 +0000 (UTC) From: Kevin Traynor To: Xiao Zhang Cc: Qi Zhang , dpdk stable Date: Wed, 28 Aug 2019 14:42:27 +0100 Message-Id: <20190828134234.20547-51-ktraynor@redhat.com> In-Reply-To: <20190828134234.20547-1-ktraynor@redhat.com> References: <20190828134234.20547-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Wed, 28 Aug 2019 13:43:56 +0000 (UTC) Subject: [dpdk-stable] patch 'net/e1000: fix buffer overrun while i219 processing DMA' has been queued to LTS release 18.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Acked-by: Qi Zhang --- 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@dpdk.org - @@ -45 +45 @@ -index 708f832b0..9d7cbc409 100644 +index 0057dd01b..67c7ec701 100644