From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 6A763201 for ; Mon, 15 Oct 2018 13:51:51 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id w5-v6so20961698wrt.2 for ; Mon, 15 Oct 2018 04:51:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yfLmaEYzoZ3tN7vFPheKfR53IIyvHytAdrV2Q23eYQI=; b=rUPCOphwTPr8NG4SPbO37XbIzIxlbTjVZi7GsMqaVQDLjQ4oQWY51FPQi98harD6pg u0DksmHY0Nvxz9GugV/Y5JIkNvScr7+IzH1DmaSLzmVlwMCoRCZCDPWpDYgHIoiheRTD gnQCMnIRddrWccEZhrQl6kFkZkghEbP/HS71+3HMq9u168WayD9jncTJg1zuu3e0Gi8g h10oZOzr1nn3uqHx0eQbPb/3WgrG1ESD84lLxrMdtl0F+tW78BT1khv2edeiYLRbreed p1WpQHyaT4qzwMITaf4gcg148+Np0in0p9b6rHN4waAxhiKRIIGG7BHBNQsERo4aAxcn S22A== X-Gm-Message-State: ABuFfoha/CwF3TSzZH8YOXNgwFLHvF0K7qvR3lkR+cO3Ih19CpwJGw/3 L6W2P2VZc2y6a5RbEx29sZs= X-Google-Smtp-Source: ACcGV62/ZcQh30knGy4GC2Q3HY1pjU7AEi6tfDdsiHYB1ra148e1yA7g8/xIyGiXFEa/GE0tYGxXYA== X-Received: by 2002:adf:8b5e:: with SMTP id v30-v6mr13020426wra.282.1539604310728; Mon, 15 Oct 2018 04:51:50 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id p9-v6sm6576837wrt.10.2018.10.15.04.51.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Oct 2018 04:51:49 -0700 (PDT) From: Luca Boccassi To: Qi Zhang Cc: Anand Rawat , Beilei Xing , dpdk stable Date: Mon, 15 Oct 2018 12:51:21 +0100 Message-Id: <20181015115144.27626-1-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181003162121.16364-1-bluca@debian.org> References: <20181003162121.16364-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/i40e: fix send admin queue command before init' has been queued to LTS release 16.11.9 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: Mon, 15 Oct 2018 11:51:51 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/17/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. Luca Boccassi --- >>From 994a8f3dfff72bfd0f83fcd6529997d74b84afd7 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 | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 3061296340..2ce0e70258 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1081,9 +1081,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev) /* Make sure all is clean before doing PF reset */ 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); if (ret) { @@ -1098,20 +1095,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev) return ret; } - i40e_config_automask(pf); - - /* - * To work around the NVM issue, initialize registers - * for flexible payload and 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); ret = i40e_init_adminq(hw); @@ -1126,6 +1109,23 @@ eth_i40e_dev_init(struct rte_eth_dev *dev) ((hw->nvm.version >> 4) & 0xff), (hw->nvm.version & 0xf), hw->nvm.eetrack); + /* Initialize the hardware */ + i40e_hw_init(dev); + + i40e_config_automask(pf); + + /* + * To work around the NVM issue, initialize registers + * for flexible payload and 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); + /* Need the special FW version to support floating VEB */ config_floating_veb(dev); /* Clear PXE mode */ -- 2.19.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-10-15 12:48:34.650047507 +0100 +++ 0001-net-i40e-fix-send-admin-queue-command-before-init.patch 2018-10-15 12:48:34.493096018 +0100 @@ -1,28 +1,29 @@ -From 0a1b657838c2c0546ebc6469ed2840c5a9a796f4 Mon Sep 17 00:00:00 2001 +From 994a8f3dfff72bfd0f83fcd6529997d74b84afd7 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 Acked-by: Beilei Xing --- - drivers/net/i40e/i40e_ethdev.c | 36 +++++++++++++++++----------------- - 1 file changed, 18 insertions(+), 18 deletions(-) + drivers/net/i40e/i40e_ethdev.c | 34 +++++++++++++++++----------------- + 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c -index de25de6500..9225333d05 100644 +index 3061296340..2ce0e70258 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c -@@ -1332,9 +1332,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) +@@ -1081,9 +1081,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev) /* Make sure all is clean before doing PF reset */ i40e_clear_hw(hw); @@ -32,18 +33,17 @@ /* Reset here to make sure all is clean for each PF */ ret = i40e_pf_reset(hw); if (ret) { -@@ -1349,21 +1346,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) +@@ -1098,20 +1095,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev) return ret; } - 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. +- * for flexible payload and 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); @@ -54,7 +54,7 @@ /* Initialize the parameters for adminq */ i40e_init_adminq_parameter(hw); ret = i40e_init_adminq(hw); -@@ -1378,6 +1360,24 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) +@@ -1126,6 +1109,23 @@ eth_i40e_dev_init(struct rte_eth_dev *dev) ((hw->nvm.version >> 4) & 0xff), (hw->nvm.version & 0xf), hw->nvm.eetrack); @@ -63,12 +63,11 @@ + + 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. ++ * for flexible payload and 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); @@ -76,9 +75,9 @@ + /* 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) { - ret = i40e_aq_debug_write_global_register(hw, + /* Need the special FW version to support floating VEB */ + config_floating_veb(dev); + /* Clear PXE mode */ -- 2.19.1