From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id D3B7C1B120 for ; Wed, 21 Nov 2018 17:49:53 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3D47530842AE; Wed, 21 Nov 2018 16:49:53 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id BAB3C5C21E; Wed, 21 Nov 2018 16:49:51 +0000 (UTC) From: Kevin Traynor To: Qi Zhang Cc: Anand Rawat , Beilei Xing , dpdk stable Date: Wed, 21 Nov 2018 16:47:29 +0000 Message-Id: <20181121164828.32249-15-ktraynor@redhat.com> In-Reply-To: <20181121164828.32249-1-ktraynor@redhat.com> References: <20181121164828.32249-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 21 Nov 2018 16:49:53 +0000 (UTC) Subject: [dpdk-stable] patch 'net/i40e: fix send admin queue command before init' has been queued to stable release 18.08.1 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: , X-List-Received-Date: Wed, 21 Nov 2018 16:49:54 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/27/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 05ddf95eec36267989de278cb6468c7c880ff923 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Fri, 28 Sep 2018 11:20:01 +0800 Subject: [PATCH] net/i40e: fix send admin queue command before init [ upstream commit 0a1b657838c2c0546ebc6469ed2840c5a9a796f4 ] We should not issue Admin Queue command before Admin Queue is initialized. But this happened in i40e_hw_init and i40e_filter_input_set_init. The patch fixes the issue by proper reordering. Fixes: b6a0ec418274 ("i40e: use AQ for Rx control register read/write") Reported-by: Anand Rawat Signed-off-by: Qi Zhang Acked-by: Beilei Xing --- drivers/net/i40e/i40e_ethdev.c | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 85a6a867f..12ac6cde0 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1268,7 +1268,4 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) i40e_clear_hw(hw); - /* Initialize the hardware */ - i40e_hw_init(dev); - /* Reset here to make sure all is clean for each PF */ ret = i40e_pf_reset(hw); @@ -1285,19 +1282,4 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) } - i40e_config_automask(pf); - - i40e_set_default_pctype_table(dev); - - /* - * To work around the NVM issue, initialize registers - * for packet type of QinQ by software. - * It should be removed once issues are fixed in NVM. - */ - if (!pf->support_multi_driver) - i40e_GLQF_reg_init(hw); - - /* Initialize the input set for filters (hash and fd) to default value */ - i40e_filter_input_set_init(pf); - /* Initialize the parameters for adminq */ i40e_init_adminq_parameter(hw); @@ -1314,4 +1296,22 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) (hw->nvm.version & 0xf), hw->nvm.eetrack); + /* Initialize the hardware */ + i40e_hw_init(dev); + + i40e_config_automask(pf); + + i40e_set_default_pctype_table(dev); + + /* + * To work around the NVM issue, initialize registers + * for packet type of QinQ by software. + * It should be removed once issues are fixed in NVM. + */ + if (!pf->support_multi_driver) + i40e_GLQF_reg_init(hw); + + /* Initialize the input set for filters (hash and fd) to default value */ + i40e_filter_input_set_init(pf); + /* initialise the L3_MAP register */ if (!pf->support_multi_driver) { -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-21 16:44:31.332334208 +0000 +++ 0015-net-i40e-fix-send-admin-queue-command-before-init.patch 2018-11-21 16:44:30.000000000 +0000 @@ -1,15 +1,16 @@ -From 0a1b657838c2c0546ebc6469ed2840c5a9a796f4 Mon Sep 17 00:00:00 2001 +From 05ddf95eec36267989de278cb6468c7c880ff923 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Fri, 28 Sep 2018 11:20:01 +0800 Subject: [PATCH] net/i40e: fix send admin queue command before init +[ upstream commit 0a1b657838c2c0546ebc6469ed2840c5a9a796f4 ] + We should not issue Admin Queue command before Admin Queue is initialized. But this happened in i40e_hw_init and i40e_filter_input_set_init. The patch fixes the issue by proper reordering. Fixes: b6a0ec418274 ("i40e: use AQ for Rx control register read/write") -Cc: stable@dpdk.org Reported-by: Anand Rawat Signed-off-by: Qi Zhang @@ -19,10 +20,10 @@ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c -index de25de650..9225333d0 100644 +index 85a6a867f..12ac6cde0 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c -@@ -1333,7 +1333,4 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) +@@ -1268,7 +1268,4 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) i40e_clear_hw(hw); - /* Initialize the hardware */ @@ -30,7 +31,7 @@ - /* Reset here to make sure all is clean for each PF */ ret = i40e_pf_reset(hw); -@@ -1350,19 +1347,4 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) +@@ -1285,19 +1282,4 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) } - i40e_config_automask(pf); @@ -50,7 +51,7 @@ - /* Initialize the parameters for adminq */ i40e_init_adminq_parameter(hw); -@@ -1379,4 +1361,22 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) +@@ -1314,4 +1296,22 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) (hw->nvm.version & 0xf), hw->nvm.eetrack); + /* Initialize the hardware */