[dpdk-stable] patch 'net/hns3: fix configuring illegal VLAN PVID' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 15:02:22 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 3f9c9bdcb51baa5bc253195bb71582d6b5a169ee Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29 at huawei.com>
Date: Tue, 17 Mar 2020 17:12:05 +0800
Subject: [PATCH] net/hns3: fix configuring illegal VLAN PVID

[ upstream commit d33fb7f939e6fb9c7882b57e9c3c0fab68c16874 ]

The VLAN pvid ranges from 0 to 4095. The hns3 PMD driver does not
support this situation that the VLAN pvid is larger than Maximum VLAN
ID(4095).

Fixes: 411d23b9eafb ("net/hns3: support VLAN")

Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 9dc96fff5a..688227e0eb 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -868,6 +868,12 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
 	struct hns3_hw *hw = &hns->hw;
 	int ret;
 
+	if (pvid > RTE_ETHER_MAX_VLAN_ID) {
+		hns3_err(hw, "Invalid vlan_id = %u > %d", pvid,
+			 RTE_ETHER_MAX_VLAN_ID);
+		return -EINVAL;
+	}
+
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_vlan_pvid_configure(hns, pvid, on);
 	rte_spinlock_unlock(&hw->lock);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:44.875820818 +0100
+++ 0007-net-hns3-fix-configuring-illegal-VLAN-PVID.patch	2020-05-19 14:04:44.056645472 +0100
@@ -1,14 +1,15 @@
-From d33fb7f939e6fb9c7882b57e9c3c0fab68c16874 Mon Sep 17 00:00:00 2001
+From 3f9c9bdcb51baa5bc253195bb71582d6b5a169ee Mon Sep 17 00:00:00 2001
 From: "Min Hu (Connor)" <humin29 at huawei.com>
 Date: Tue, 17 Mar 2020 17:12:05 +0800
 Subject: [PATCH] net/hns3: fix configuring illegal VLAN PVID
 
+[ upstream commit d33fb7f939e6fb9c7882b57e9c3c0fab68c16874 ]
+
 The VLAN pvid ranges from 0 to 4095. The hns3 PMD driver does not
 support this situation that the VLAN pvid is larger than Maximum VLAN
 ID(4095).
 
 Fixes: 411d23b9eafb ("net/hns3: support VLAN")
-Cc: stable at dpdk.org
 
 Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
@@ -17,10 +18,10 @@
  1 file changed, 6 insertions(+)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index fe6b21fd12..a715354573 100644
+index 9dc96fff5a..688227e0eb 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -873,6 +873,12 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
+@@ -868,6 +868,12 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
  	struct hns3_hw *hw = &hns->hw;
  	int ret;
  


More information about the stable mailing list