DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anurag Mandal <anurag.mandal@intel.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, vladimir.medvedkin@intel.com,
	Anurag Mandal <anurag.mandal@intel.com>,
	stable@dpdk.org
Subject: [PATCH] net/iavf: fix QinQ handling when only inner VLAN capability is supported
Date: Wed,  1 Jul 2026 23:08:58 +0000	[thread overview]
Message-ID: <20260701230858.436510-1-anurag.mandal@intel.com> (raw)

While adding support for QinQ stripping and insertion
operations, it was assumed that Single VLAN
operations are always reported through outer VLAN
capabilities by the hardware.
However, it seems that Single VLAN operations can
also be reported through only inner VLAN capabilities
as well by the hardware.

This patches fixes the same for QinQ operations.

Fixes: 8599d7604e0a ("net/iavf: support QinQ strip")
Fixes: 7ce1363b424f ("net/iavf: support QinQ insertion")
Cc: stable@dpdk.org

Signed-off-by: Anurag Mandal <anurag.mandal@intel.com>
---
 drivers/net/intel/iavf/iavf_vchnl.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/intel/iavf/iavf_vchnl.c b/drivers/net/intel/iavf/iavf_vchnl.c
index 0643a835d5..0c5b0f8ff1 100644
--- a/drivers/net/intel/iavf/iavf_vchnl.c
+++ b/drivers/net/intel/iavf/iavf_vchnl.c
@@ -904,13 +904,14 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable)
 	stripping_caps = &vf->vlan_v2_caps.offloads.stripping_support;
 
 	/* When VLAN extend is disabled, Single VLAN mode which is Outer VLAN
-	 * When VLAN extend is enabled, QinQ mode, this API works only on
-	 * Inner VLAN strip which is always 0x8100.
+	 * When VLAN extend is enabled i.e. DVM mode or when hardware reports
+	 * Single VLAN capability through inner stripping_caps, this API
+	 * works only on Inner VLAN strip which is always 0x8100.
 	 */
 	if (!qinq && (stripping_caps->outer & VIRTCHNL_VLAN_ETHERTYPE_8100) &&
 	    (stripping_caps->outer & VIRTCHNL_VLAN_TOGGLE))
 		ethertype = &vlan_strip.outer_ethertype_setting;
-	else if (qinq && (stripping_caps->inner & VIRTCHNL_VLAN_ETHERTYPE_8100) &&
+	else if ((stripping_caps->inner & VIRTCHNL_VLAN_ETHERTYPE_8100) &&
 		 (stripping_caps->inner & VIRTCHNL_VLAN_TOGGLE))
 		ethertype = &vlan_strip.inner_ethertype_setting;
 	else
@@ -1003,7 +1004,7 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable)
 	if (!qinq && (insertion_caps->outer & VIRTCHNL_VLAN_ETHERTYPE_8100) &&
 	    (insertion_caps->outer & VIRTCHNL_VLAN_TOGGLE))
 		ethertype = &vlan_insert.outer_ethertype_setting;
-	else if (qinq && (insertion_caps->inner & VIRTCHNL_VLAN_ETHERTYPE_8100) &&
+	else if ((insertion_caps->inner & VIRTCHNL_VLAN_ETHERTYPE_8100) &&
 		 (insertion_caps->inner & VIRTCHNL_VLAN_TOGGLE))
 		ethertype = &vlan_insert.inner_ethertype_setting;
 	else
-- 
2.34.1


             reply	other threads:[~2026-07-01 23:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 23:08 Anurag Mandal [this message]
2026-07-02  8:20 ` [PATCH] net/iavf: fix QinQ handling when only inner VLAN capability is supported Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260701230858.436510-1-anurag.mandal@intel.com \
    --to=anurag.mandal@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox