patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v4] net/iavf: revert fix VLAN insertion
       [not found] <20221018102602.217673-1-yidingx.zhou@intel.com>
@ 2022-11-11  8:18 ` Yiding Zhou
  2022-11-13 16:30 ` [PATCH v5] " Yiding Zhou
  1 sibling, 0 replies; 3+ messages in thread
From: Yiding Zhou @ 2022-11-11  8:18 UTC (permalink / raw)
  To: dev, qiming.yang; +Cc: qi.z.zhang, ktraynor, Yiding Zhou, stable

The vector Tx path does not support VLAN insertion via the L2TAG2 field,
but the scalar path supports. The earlier commit was to force to select
scalar path as soon as kernel driver requests to use L2TAG2. That logic is
incorrect. Because other case like VLAN offloading not required but scalar
path selected would have a significant performance drop.

Therefore the following commit was reverted accordingly.

commit 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")

After reverting this commit, the AVX512 Tx path would insert the VLAN tag
into the wrong location(inner of QinQ) when the kernel driver requested
L2TAG2. This is inconsistent with the behavior of PF(outer of QinQ).

It is currently known that ice kernel drivers newer than 1.8.9 will request
the use of L2TAG2. User can set parameter '--force-max-simd-bitwidth' to
64/128/256 to avoid this issue.

Fixes: 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")
Cc: stable@dpdk.org

Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
---
v4: document this issue as kown issue and add some commit log
v3: rebase and change commit log
---
 doc/guides/rel_notes/known_issues.rst   | 23 +++++++++++++++++++++++
 drivers/net/iavf/iavf_rxtx_vec_common.h |  3 ---
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst
index 570550843a..1f73b17716 100644
--- a/doc/guides/rel_notes/known_issues.rst
+++ b/doc/guides/rel_notes/known_issues.rst
@@ -906,3 +906,26 @@ Vhost multi-queue reconnection failed with QEMU version 4.2.0 to 5.1.0
 
 **Driver/Module**:
    Virtual Device Poll Mode Driver (PMD).
+
+IAVF inserts VLAN tag incorrectly on AVX-512 Tx path
+----------------------------------------------------------------------
+
+**Description**
+   When the kernel driver requests the VF to use the L2TAG2 field of the Tx context
+   descriptor to insert the hardware offload VLAN tag, AVX-512 Tx path cannot handle
+   this case correctly due to its lack of support for the Tx context descriptor.
+
+**Implication**
+   The VLAN tag will be inserted to the wrong location(inner of QinQ) on AVX-512 Tx
+   path. That is inconsistent with the behavior of PF(outer of QinQ). The ice kernel
+   driver's version newer than 1.8.9 requests to use L2TAG2 and has this issue.
+
+**Resolution/Workaround**:
+   Set the parameter `--force-max-simd-bitwidth` as 64/128/256 to avoid selecting AVX-512
+   Tx path
+
+**Affected Environment/Platform**:
+   ALL.
+
+**Driver/Module**:
+   Poll Mode Driver (PMD).
diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h
index 4ab22c6b2b..a59cb2ceee 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_common.h
+++ b/drivers/net/iavf/iavf_rxtx_vec_common.h
@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)
 	if (txq->offloads & IAVF_TX_NO_VECTOR_FLAGS)
 		return -1;
 
-	if (txq->vlan_flag == IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2)
-		return -1;
-
 	if (txq->offloads & IAVF_TX_VECTOR_OFFLOAD)
 		return IAVF_VECTOR_OFFLOAD_PATH;
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v5] net/iavf: revert fix VLAN insertion
       [not found] <20221018102602.217673-1-yidingx.zhou@intel.com>
  2022-11-11  8:18 ` [PATCH v4] net/iavf: revert fix VLAN insertion Yiding Zhou
@ 2022-11-13 16:30 ` Yiding Zhou
  2022-11-14  0:52   ` Zhang, Qi Z
  1 sibling, 1 reply; 3+ messages in thread
From: Yiding Zhou @ 2022-11-13 16:30 UTC (permalink / raw)
  To: dev, qiming.yang; +Cc: qi.z.zhang, ktraynor, Yiding Zhou, stable

The vector Tx path does not support VLAN insertion via the L2TAG2 field,
but the scalar path supports. The earlier commit was to force to select
scalar path as soon as kernel driver requests to use L2TAG2. That logic is
incorrect. Because other case like VLAN offloading not required but scalar
path selected would have a significant performance drop.

Therefore the following commit was reverted accordingly.

commit 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")

After reverting this commit, the AVX512 Tx path would insert the VLAN tag
into the wrong location(inner of QinQ) when the kernel driver requested
L2TAG2. This is inconsistent with the behavior of PF(outer of QinQ).

It is currently known that ice kernel drivers newer than 1.8.9 will request
the use of L2TAG2. User can set parameter '--force-max-simd-bitwidth' to
64/128/256 to avoid this issue.

Fixes: 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")
Cc: stable@dpdk.org

Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
---
v5: move the document
v4: document this issue as kown issue and add some commit log
v3: rebase and change commit log
---
 doc/guides/nics/intel_vf.rst            | 13 +++++++++++++
 drivers/net/iavf/iavf_rxtx_vec_common.h |  3 ---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/doc/guides/nics/intel_vf.rst b/doc/guides/nics/intel_vf.rst
index d582f831da..edbda275c1 100644
--- a/doc/guides/nics/intel_vf.rst
+++ b/doc/guides/nics/intel_vf.rst
@@ -704,3 +704,16 @@ i40e: Vlan filtering of VF
 For i40e driver 2.17.15, configuring VLAN filters from the DPDK VF is unsupported.
 When applying VLAN filters on the VF it must first be configured from the
 corresponding PF.
+
+ice: VF inserts VLAN tag incorrectly on AVX-512 Tx path
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+When the kernel driver requests the VF to use the L2TAG2 field of the Tx context
+descriptor to insert the hardware offload VLAN tag, AVX-512 Tx path cannot handle
+this case correctly due to its lack of support for the Tx context descriptor.
+
+The VLAN tag will be inserted to the wrong location(inner of QinQ) on AVX-512 Tx
+path. That is inconsistent with the behavior of PF(outer of QinQ). The ice kernel
+driver's version newer than 1.8.9 requests to use L2TAG2 and has this issue.
+
+Set the parameter `--force-max-simd-bitwidth` as 64/128/256 to avoid selecting
+AVX-512 Tx path.
diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h
index 4ab22c6b2b..a59cb2ceee 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_common.h
+++ b/drivers/net/iavf/iavf_rxtx_vec_common.h
@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)
 	if (txq->offloads & IAVF_TX_NO_VECTOR_FLAGS)
 		return -1;
 
-	if (txq->vlan_flag == IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2)
-		return -1;
-
 	if (txq->offloads & IAVF_TX_VECTOR_OFFLOAD)
 		return IAVF_VECTOR_OFFLOAD_PATH;
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH v5] net/iavf: revert fix VLAN insertion
  2022-11-13 16:30 ` [PATCH v5] " Yiding Zhou
@ 2022-11-14  0:52   ` Zhang, Qi Z
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2022-11-14  0:52 UTC (permalink / raw)
  To: Zhou, YidingX, dev, Yang, Qiming; +Cc: ktraynor, stable



> -----Original Message-----
> From: Zhou, YidingX <yidingx.zhou@intel.com>
> Sent: Monday, November 14, 2022 12:31 AM
> To: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com>
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; ktraynor@redhat.com; Zhou,
> YidingX <yidingx.zhou@intel.com>; stable@dpdk.org
> Subject: [PATCH v5] net/iavf: revert fix VLAN insertion
> 
> The vector Tx path does not support VLAN insertion via the L2TAG2 field, but
> the scalar path supports. The earlier commit was to force to select scalar
> path as soon as kernel driver requests to use L2TAG2. That logic is incorrect.
> Because other case like VLAN offloading not required but scalar path selected
> would have a significant performance drop.
> 
> Therefore the following commit was reverted accordingly.
> 
> commit 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")
> 
> After reverting this commit, the AVX512 Tx path would insert the VLAN tag
> into the wrong location(inner of QinQ) when the kernel driver requested
> L2TAG2. This is inconsistent with the behavior of PF(outer of QinQ).
> 
> It is currently known that ice kernel drivers newer than 1.8.9 will request the
> use of L2TAG2. User can set parameter '--force-max-simd-bitwidth' to
> 64/128/256 to avoid this issue.
> 
> Fixes: 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-14  0:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20221018102602.217673-1-yidingx.zhou@intel.com>
2022-11-11  8:18 ` [PATCH v4] net/iavf: revert fix VLAN insertion Yiding Zhou
2022-11-13 16:30 ` [PATCH v5] " Yiding Zhou
2022-11-14  0:52   ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).