[dpdk-stable] patch 'net/bnxt: fix VLAN add when port is stopped' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 15:04:10 CEST 2020


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 0407d17daef926a5909d9a8ebc70faa1477c4ede Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Tue, 21 Apr 2020 14:33:49 -0700
Subject: [PATCH] net/bnxt: fix VLAN add when port is stopped

[ upstream commit 8b60154d4b8a413eec43aafce1b4341dd575d4c3 ]

Driver destroys the vnic when the port is brought down.
When user tries to add a vlan when port is stopped, driver
issues HWRM command to FW with invalid vnic_id and it fails.

Fixed to return an error while setting vlan when port is
not started.

Fixes: b4e190d55c25 ("net/bnxt: fix MAC/VLAN filter allocation")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index cddcd427df..a4cd6cc672 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1849,6 +1849,11 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev,
 	if (rc)
 		return rc;
 
+	if (!eth_dev->data->dev_started) {
+		PMD_DRV_LOG(ERR, "port must be started before setting vlan\n");
+		return -EINVAL;
+	}
+
 	/* These operations apply to ALL existing MAC/VLAN filters */
 	if (on)
 		return bnxt_add_vlan_filter(bp, vlan_id);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.173896464 +0100
+++ 0115-net-bnxt-fix-VLAN-add-when-port-is-stopped.patch	2020-05-19 14:04:44.384651418 +0100
@@ -1,8 +1,10 @@
-From 8b60154d4b8a413eec43aafce1b4341dd575d4c3 Mon Sep 17 00:00:00 2001
+From 0407d17daef926a5909d9a8ebc70faa1477c4ede Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
 Date: Tue, 21 Apr 2020 14:33:49 -0700
 Subject: [PATCH] net/bnxt: fix VLAN add when port is stopped
 
+[ upstream commit 8b60154d4b8a413eec43aafce1b4341dd575d4c3 ]
+
 Driver destroys the vnic when the port is brought down.
 When user tries to add a vlan when port is stopped, driver
 issues HWRM command to FW with invalid vnic_id and it fails.
@@ -11,7 +13,6 @@
 not started.
 
 Fixes: b4e190d55c25 ("net/bnxt: fix MAC/VLAN filter allocation")
-Cc: stable at dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
 Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru at broadcom.com>
@@ -21,10 +22,10 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 206111db5b..589190b372 100644
+index cddcd427df..a4cd6cc672 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -2082,6 +2082,11 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev,
+@@ -1849,6 +1849,11 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev,
  	if (rc)
  		return rc;
  


More information about the stable mailing list