patch 'net/iavf: fix VLAN strip setting after enabling filter' has been queued to stable release 22.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jun 30 14:25:36 CEST 2025
Hi,
FYI, your patch has been queued to stable release 22.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 07/02/25. 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.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/67bc75f0e394c192fdb985a29d69a4f89a2413c3
Thanks.
Luca Boccassi
---
>From 67bc75f0e394c192fdb985a29d69a4f89a2413c3 Mon Sep 17 00:00:00 2001
From: Amiya Ranjan Mohakud <amiyaranjan.mohakud at gmail.com>
Date: Mon, 23 Jun 2025 23:41:36 +0530
Subject: [PATCH] net/iavf: fix VLAN strip setting after enabling filter
[ upstream commit 3bfad066f9b4764981c9ad90a750fa6f1afcf15a ]
For i40e kernel drivers which support either vlan(v1) or vlan(v2)
VIRTCHNL OP, it will set strip on when setting filter on.
But DPDK side will not change strip flag.
To be consistent with DPDL side, explicitly disable strip again.
Bugzilla ID: 1725
Fixes: e25c7ed114b2 ("net/iavf: fix VLAN offload strip flag")
Signed-off-by: Amiya Ranjan Mohakud <amiyaranjan.mohakud at gmail.com>
Reviewed-by: Ciara Loftus <ciara.loftus at intel.com>
---
.mailmap | 1 +
drivers/net/iavf/iavf_ethdev.c | 68 +++++++++++++++++++---------------
2 files changed, 40 insertions(+), 29 deletions(-)
diff --git a/.mailmap b/.mailmap
index 9a89b1a12e..f53fdf0d85 100644
--- a/.mailmap
+++ b/.mailmap
@@ -79,6 +79,7 @@ Amir Avivi <amir.avivi at intel.com>
Amit Bernstein <amitbern at amazon.com>
Amit Gupta <agupta3 at marvell.com>
Amit Prakash Shukla <amitprakashs at marvell.com>
+Amiya Ranjan Mohakud <amiyaranjan.mohakud at gmail.com>
Amr Mokhtar <amr.mokhtar at intel.com>
Amruta Zende <amruta.zende at intel.com>
Amrutha Sampath <amrutha.sampath at intel.com>
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 656a4c6176..62e75f3626 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1345,40 +1345,21 @@ iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)
}
static int
-iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+iavf_disable_vlan_strip_ex(struct rte_eth_dev *dev, int on)
{
- struct iavf_adapter *adapter =
- IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
- struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
- struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
- int err;
-
- if (adapter->closed)
- return -EIO;
-
- if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN_V2) {
- err = iavf_add_del_vlan_v2(adapter, vlan_id, on);
- if (err)
- return -EIO;
- return 0;
- }
-
- if (!(vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN))
- return -ENOTSUP;
-
- err = iavf_add_del_vlan(adapter, vlan_id, on);
- if (err)
- return -EIO;
-
- /* For i40e kernel driver which only supports vlan(v1) VIRTCHNL OP,
+ /* For i40e kernel drivers which supports both vlan(v1 & v2) VIRTCHNL OP,
* it will set strip on when setting filter on but dpdk side will not
- * change strip flag. To be consistent with dpdk side, disable strip
- * again.
+ * change strip flag. To be consistent with dpdk side, explicitly disable
+ * strip again.
*
- * For i40e kernel driver which supports vlan v2, dpdk will invoke vlan v2
- * related function, so it won't go through here.
*/
+ struct iavf_adapter *adapter =
+ IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
+ struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
+ int err;
+
if (adapter->hw.mac.type == IAVF_MAC_XL710 ||
+ adapter->hw.mac.type == IAVF_MAC_VF ||
adapter->hw.mac.type == IAVF_MAC_X722_VF) {
if (on && !(dev_conf->rxmode.offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)) {
err = iavf_disable_vlan_strip(adapter);
@@ -1389,6 +1370,35 @@ iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
return 0;
}
+static int
+iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+{
+ struct iavf_adapter *adapter =
+ IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
+ struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
+ int err;
+
+ if (adapter->closed)
+ return -EIO;
+
+ if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN_V2) {
+ err = iavf_add_del_vlan_v2(adapter, vlan_id, on);
+ if (err)
+ return -EIO;
+
+ return iavf_disable_vlan_strip_ex(dev, on);
+ }
+
+ if (!(vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN))
+ return -ENOTSUP;
+
+ err = iavf_add_del_vlan(adapter, vlan_id, on);
+ if (err)
+ return -EIO;
+
+ return iavf_disable_vlan_strip_ex(dev, on);
+}
+
static void
iavf_iterate_vlan_filters_v2(struct rte_eth_dev *dev, bool enable)
{
--
2.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-30 13:21:22.012550361 +0100
+++ 0006-net-iavf-fix-VLAN-strip-setting-after-enabling-filte.patch 2025-06-30 13:21:21.743057270 +0100
@@ -1 +1 @@
-From 3bfad066f9b4764981c9ad90a750fa6f1afcf15a Mon Sep 17 00:00:00 2001
+From 67bc75f0e394c192fdb985a29d69a4f89a2413c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3bfad066f9b4764981c9ad90a750fa6f1afcf15a ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -18,2 +19,2 @@
- .mailmap | 1 +
- drivers/net/intel/iavf/iavf_ethdev.c | 68 ++++++++++++++++------------
+ .mailmap | 1 +
+ drivers/net/iavf/iavf_ethdev.c | 68 +++++++++++++++++++---------------
@@ -23 +24 @@
-index c6d72058bb..1b238970fb 100644
+index 9a89b1a12e..f53fdf0d85 100644
@@ -26 +27 @@
-@@ -88,6 +88,7 @@ Amir Avivi <amir.avivi at intel.com>
+@@ -79,6 +79,7 @@ Amir Avivi <amir.avivi at intel.com>
@@ -34,5 +35,5 @@
-diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
-index 02649c19b2..c33fdd9069 100644
---- a/drivers/net/intel/iavf/iavf_ethdev.c
-+++ b/drivers/net/intel/iavf/iavf_ethdev.c
-@@ -1378,40 +1378,21 @@ iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)
+diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
+index 656a4c6176..62e75f3626 100644
+--- a/drivers/net/iavf/iavf_ethdev.c
++++ b/drivers/net/iavf/iavf_ethdev.c
+@@ -1345,40 +1345,21 @@ iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)
@@ -89 +90 @@
-@@ -1422,6 +1403,35 @@ iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+@@ -1389,6 +1370,35 @@ iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
More information about the stable
mailing list