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: [email protected]
Signed-off-by: Anurag Mandal <[email protected]>
---
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