[PATCH v2] net/iavf: fix single VLAN strip in double VLAN mode
Anurag Mandal
anurag.mandal at intel.com
Wed Jul 8 12:33:00 CEST 2026
In Double VLAN Mode (DVM) i.e. when RTE_ETH_RX_OFFLOAD_VLAN_EXTEND
is enabled iavf_config_vlan_strip_v2() only toggles the inner
VLAN strip setting (0x8100) for the RTE_ETH_RX_OFFLOAD_VLAN_STRIP
offload, while the outer VLAN strip is controlled independently
through the QinQ strip path.
However, in DVM, most hardwares place a single (non-QinQ) VLAN
tag in the outer position
As a result, when a single VLAN packet is received and the
application disables single VLAN tag stripping, only the inner
VLAN tag strip gets turned off and the outer VLAN tag strip
stays enabled.
Hence, the single VLAN tag still gets stripped.
This does not honor the application's request.
This patch fixes the aforesaid case.
When DVM and QinQ stripping are both enabled, also apply the strip
enable/disable to the outer VLAN so that single VLAN packets received
in double VLAN mode respect the single VLAN strip configuration.
Fixes: 8599d7604e0a ("net/iavf: support QinQ strip")
Cc: stable at dpdk.org
Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
Tested-by: Ye Chen <yex.chen at intel.com>
---
V2: Spelling correction in commit message
.mailmap | 1 +
drivers/net/intel/iavf/iavf_vchnl.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/.mailmap b/.mailmap
index 05a55c0bd6..7ac425f800 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1893,6 +1893,7 @@ Yaron Illouz <yaroni at radcom.com>
Yaroslav Brustinov <ybrustin at cisco.com>
Yash Sharma <ysharma at marvell.com>
Yasufumi Ogawa <ogawa.yasufumi at lab.ntt.co.jp> <yasufum.o at gmail.com>
+Ye Chen <yex.chen at intel.com>
Yehor Malikov <yehor.malikov at solidigm.com>
Yelena Krivosheev <yelena at marvell.com>
Yerden Zhumabekov <e_zhumabekov at sts.kz> <yerden.zhumabekov at sts.kz>
diff --git a/drivers/net/intel/iavf/iavf_vchnl.c b/drivers/net/intel/iavf/iavf_vchnl.c
index cd6e8325fc..a3cc5459d6 100644
--- a/drivers/net/intel/iavf/iavf_vchnl.c
+++ b/drivers/net/intel/iavf/iavf_vchnl.c
@@ -922,8 +922,13 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable)
uint32_t *ethertype;
int qinq = adapter->dev_data->dev_conf.rxmode.offloads &
RTE_ETH_RX_OFFLOAD_VLAN_EXTEND;
+ bool strip_qinq = adapter->dev_data->dev_conf.rxmode.offloads &
+ RTE_ETH_RX_OFFLOAD_QINQ_STRIP;
int ret;
+ if (qinq && strip_qinq)
+ iavf_config_outer_vlan_strip_v2(adapter, enable);
+
stripping_caps = &vf->vlan_v2_caps.offloads.stripping_support;
/* When VLAN extend is disabled, Single VLAN mode which is Outer VLAN
--
2.34.1
More information about the stable
mailing list