From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1A4CBA0524 for ; Thu, 4 Feb 2021 12:30:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11538240722; Thu, 4 Feb 2021 12:30:56 +0100 (CET) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 860C6240722 for ; Thu, 4 Feb 2021 12:30:54 +0100 (CET) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l7cqc-000561-AJ; Thu, 04 Feb 2021 11:30:54 +0000 From: Christian Ehrhardt To: Beilei Xing Cc: Jeff Guo , dpdk stable Date: Thu, 4 Feb 2021 12:27:51 +0100 Message-Id: <20210204112954.2488123-16-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> References: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/i40e: fix global register recovery' has been queued to stable release 19.11.7 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 stable release 19.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/06/21. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/e80347c7113d86517f9c1fa86a376e7cec62c41f Thanks. Christian Ehrhardt --- >From e80347c7113d86517f9c1fa86a376e7cec62c41f Mon Sep 17 00:00:00 2001 From: Beilei Xing Date: Fri, 20 Nov 2020 16:49:47 +0800 Subject: [PATCH] net/i40e: fix global register recovery [ upstream commit ac241c74ac75b2670788635b1a8e6809afae0827 ] PMD configures the global register I40E_GLINT_CTL during device initialization to work around the Rx write back issue. But when a device is bound from DPDK to kernel, the global register is not recovered to the original state, it will cause kernel driver performance drop issue. This patch fixes this issue. Fixes: be6c228d4da3 ("i40e: support Rx interrupt") Fixes: 4ab831449a1c ("net/i40e: fix interrupt conflict with multi-driver") Signed-off-by: Beilei Xing Acked-by: Jeff Guo --- drivers/net/i40e/i40e_ethdev.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index a8a534c6f8..ec9b16608c 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -777,6 +777,21 @@ static inline void i40e_config_automask(struct i40e_pf *pf) I40E_WRITE_REG(hw, I40E_GLINT_CTL, val); } +static inline void i40e_clear_automask(struct i40e_pf *pf) +{ + struct i40e_hw *hw = I40E_PF_TO_HW(pf); + uint32_t val; + + val = I40E_READ_REG(hw, I40E_GLINT_CTL); + val &= ~(I40E_GLINT_CTL_DIS_AUTOMASK_PF0_MASK | + I40E_GLINT_CTL_DIS_AUTOMASK_VF0_MASK); + + if (!pf->support_multi_driver) + val &= ~I40E_GLINT_CTL_DIS_AUTOMASK_N_MASK; + + I40E_WRITE_REG(hw, I40E_GLINT_CTL, val); +} + #define I40E_FLOW_CONTROL_ETHERTYPE 0x8808 /* @@ -2632,6 +2647,8 @@ i40e_dev_close(struct rte_eth_dev *dev) /* Remove all Traffic Manager configuration */ i40e_tm_conf_uninit(dev); + i40e_clear_automask(pf); + hw->adapter_closed = 1; } -- 2.30.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-04 12:04:28.867769705 +0100 +++ 0016-net-i40e-fix-global-register-recovery.patch 2021-02-04 12:04:27.846789551 +0100 @@ -1 +1 @@ -From ac241c74ac75b2670788635b1a8e6809afae0827 Mon Sep 17 00:00:00 2001 +From e80347c7113d86517f9c1fa86a376e7cec62c41f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ac241c74ac75b2670788635b1a8e6809afae0827 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index f54769c29d..2cb18ecc03 100644 +index a8a534c6f8..ec9b16608c 100644 @@ -27 +28 @@ -@@ -763,6 +763,21 @@ static inline void i40e_config_automask(struct i40e_pf *pf) +@@ -777,6 +777,21 @@ static inline void i40e_config_automask(struct i40e_pf *pf) @@ -49 +50 @@ -@@ -2741,6 +2756,8 @@ i40e_dev_close(struct rte_eth_dev *dev) +@@ -2632,6 +2647,8 @@ i40e_dev_close(struct rte_eth_dev *dev) @@ -56 +56,0 @@ - return ret; @@ -57,0 +58 @@ +