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 E4377A0093 for ; Tue, 19 May 2020 15:13:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D47971D8F6; Tue, 19 May 2020 15:13:42 +0200 (CEST) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id E10671D702 for ; Tue, 19 May 2020 15:13:41 +0200 (CEST) Received: by mail-wm1-f66.google.com with SMTP id f13so3002653wmc.5 for ; Tue, 19 May 2020 06:13:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l/GhYRXjVkneJb9yJr6hoNyvokBguPF3PQ7V/wjDH+g=; b=EkfeZ6AnvlJuAtirGuYk0HwyEsKJfb2NO1xUWqCiOPz1C3m9f57xTp4vjzyX51z2CM TXaQtSaEXnlU8gcN0ZpRMOTpXcW/+41vXc8PIBRSCTPczJY5s8hOEwcx+b7nPxs36zaf 4OhAcrV4hBWriaj7OhEkIjj4Se6nMzX6qIM8Cl2zke9cmlootZM9VjzjT0viJEx4BRv/ +TlGIwlvv2JTvBi9EHvKHGW0JUC274om14tKA+sGT5OyNpi7KKuu/JrijBYCyWvXXMx8 yNPC0iCJ/g6xGgGchZyfDa75+UNA80JaZeAhidHjnTX2d+0An1IPVpcUXJb8yRVpd6Al Loug== 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=l/GhYRXjVkneJb9yJr6hoNyvokBguPF3PQ7V/wjDH+g=; b=Iu9J74xK3fG1xEBbKGqNtpU18+c7+FVan2jtODqq6M+72VVIhttkNeVmDi2OYWl3d7 BW40dsdKDF8k1zmjrC8P816nZ9IpLYfUw3ntAYnqFKVdSb16IY2fAZbin74KAPzAEDai hrTyAcrW0ST+N5N7MI8dNGkVH6fol0tB4AhGzTmkrnA7e3QorCFvJkC4EIrqL6DxQtpo FwjKHo86Zz2WLESYBAroxhnL3K7dFUUkjViXxtfvrWuI/6DMb7Ux88YACSZdmHEftl2i 1mZDTazfYWwCx6UCDuXz4rZQA0zISks8LGIQ5WJ+Gm9jOjKuYhgbuwCSF+OosB54/5Cb a/Sw== X-Gm-Message-State: AOAM530PApB7GadD4axmPZAoIfi7DM44fb4xRugVvqmJhJrMcxfDKHjv rBGNRnss7KHBFVNix9xQQhbJwuv33IY92CDo X-Google-Smtp-Source: ABdhPJz4RfWRj9TEkOImXuAWIZAyf0eBGOEE9iyhm1F5UKLTo7LoNY17HuRq5jM3w2jf3eAHLIbZ9g== X-Received: by 2002:a05:600c:1403:: with SMTP id g3mr5728214wmi.51.1589894021673; Tue, 19 May 2020 06:13:41 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id d6sm16722030wrj.90.2020.05.19.06.13.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:13:41 -0700 (PDT) From: luca.boccassi@gmail.com To: "Min Hu (Connor)" Cc: Wei Hu , Chengchang Tang , dpdk stable Date: Tue, 19 May 2020 14:04:45 +0100 Message-Id: <20200519130549.112823-150-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hns3: fix VLAN PVID when configuring device' has been queued to stable release 19.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 stable release 19.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 05/21/20. 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. Thanks. Luca Boccassi --- >From 827eb6ca970dc842f2c71365246397bb67381e5a Mon Sep 17 00:00:00 2001 From: "Min Hu (Connor)" Date: Wed, 29 Apr 2020 19:13:26 +0800 Subject: [PATCH] net/hns3: fix VLAN PVID when configuring device [ upstream commit 99d673d5d3a8046a7f55d82a0a26244372f76abd ] In current version, when upper level application calls the rte_eth_dev_configure API function, if pvid config is not set of the input parameter which struct type is rte_eth_conf, hns3 pmd driver also sets the VLAN pvid related configuration to hardware, and this is not reasonable. For example, As pvid is set to 100 by rte_eth_dev_set_vlan_pvid, when pvid config is not set in rte_eth_conf, rte_eth_dev_configure will tell driver to delete pvid 0, and that is meaningless. This patch fixes it to ensure that driver does not set VLAN pvid related configuration to hardware when pvid config is not set in rte_eth_conf. Fixes: 411d23b9eafb ("net/hns3: support VLAN") Signed-off-by: Min Hu (Connor) Signed-off-by: Wei Hu (Xavier) Signed-off-by: Chengchang Tang --- drivers/net/hns3/hns3_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 378774396f..6eb36d4258 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -1051,6 +1051,13 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev) return ret; } + /* + * If pvid config is not set in rte_eth_conf, driver needn't to set + * VLAN pvid related configuration to hardware. + */ + if (txmode->pvid == 0 && txmode->hw_vlan_insert_pvid == 0) + return 0; + /* Apply pvid setting */ ret = hns3_vlan_pvid_set(dev, txmode->pvid, txmode->hw_vlan_insert_pvid); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:50.560787758 +0100 +++ 0150-net-hns3-fix-VLAN-PVID-when-configuring-device.patch 2020-05-19 14:04:44.476653085 +0100 @@ -1,8 +1,10 @@ -From 99d673d5d3a8046a7f55d82a0a26244372f76abd Mon Sep 17 00:00:00 2001 +From 827eb6ca970dc842f2c71365246397bb67381e5a Mon Sep 17 00:00:00 2001 From: "Min Hu (Connor)" Date: Wed, 29 Apr 2020 19:13:26 +0800 Subject: [PATCH] net/hns3: fix VLAN PVID when configuring device +[ upstream commit 99d673d5d3a8046a7f55d82a0a26244372f76abd ] + In current version, when upper level application calls the rte_eth_dev_configure API function, if pvid config is not set of the input parameter which struct type is rte_eth_conf, hns3 pmd driver also @@ -16,7 +18,6 @@ configuration to hardware when pvid config is not set in rte_eth_conf. Fixes: 411d23b9eafb ("net/hns3: support VLAN") -Cc: stable@dpdk.org Signed-off-by: Min Hu (Connor) Signed-off-by: Wei Hu (Xavier) @@ -26,10 +27,10 @@ 1 file changed, 7 insertions(+) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c -index ae87aa0dd2..1fac4f3666 100644 +index 378774396f..6eb36d4258 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c -@@ -1059,6 +1059,13 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev) +@@ -1051,6 +1051,13 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev) return ret; }