patch 'net/iavf: fix VLAN strip setting after enabling filter' has been queued to stable release 24.11.3

Kevin Traynor ktraynor at redhat.com
Fri Jul 18 21:30:46 CEST 2025


Hi,

FYI, your patch has been queued to stable release 24.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 07/23/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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/856e6a751b36cde62a2f1c766027985597046529

Thanks.

Kevin

---
>From 856e6a751b36cde62a2f1c766027985597046529 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 5c01a6eaa1..c2b4d45128 100644
--- a/.mailmap
+++ b/.mailmap
@@ -89,4 +89,5 @@ 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>
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 2ea84cef6d..3dfccb9969 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1378,38 +1378,19 @@ 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)) {
@@ -1422,4 +1403,33 @@ iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 }
 
+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.50.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-07-18 20:29:14.904024680 +0100
+++ 0112-net-iavf-fix-VLAN-strip-setting-after-enabling-filte.patch	2025-07-18 20:29:11.052907705 +0100
@@ -1 +1 @@
-From 3bfad066f9b4764981c9ad90a750fa6f1afcf15a Mon Sep 17 00:00:00 2001
+From 856e6a751b36cde62a2f1c766027985597046529 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 5c01a6eaa1..c2b4d45128 100644
@@ -32,5 +33,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
-@@ -1379,38 +1379,19 @@ 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 2ea84cef6d..3dfccb9969 100644
+--- a/drivers/net/iavf/iavf_ethdev.c
++++ b/drivers/net/iavf/iavf_ethdev.c
+@@ -1378,38 +1378,19 @@ iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)
@@ -85 +86 @@
-@@ -1423,4 +1404,33 @@ iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+@@ -1422,4 +1403,33 @@ iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)



More information about the stable mailing list