DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yiding Zhou <yidingx.zhou@intel.com>
To: dev@dpdk.org, qiming.yang@intel.com
Cc: qi.z.zhang@intel.com, ktraynor@redhat.com,
	Yiding Zhou <yidingx.zhou@intel.com>,
	stable@dpdk.org
Subject: [PATCH v5] net/iavf: revert fix VLAN insertion
Date: Mon, 14 Nov 2022 00:30:31 +0800	[thread overview]
Message-ID: <20221113163031.1975916-1-yidingx.zhou@intel.com> (raw)
In-Reply-To: <20221018102602.217673-1-yidingx.zhou@intel.com>

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


  parent reply	other threads:[~2022-11-13 16:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 10:26 [PATCH] " Yiding Zhou
2022-10-18 12:17 ` Kevin Traynor
2022-10-19  7:54 ` [PATCH v2] " Yiding Zhou
2022-10-19  8:53   ` Kevin Traynor
2022-10-20  1:33     ` Zhou, YidingX
2022-10-20  7:47       ` Kevin Traynor
2022-10-21  2:42         ` Zhou, YidingX
     [not found]           ` <CY4PR1101MB21039FCA7958A8B49BF5521885389@CY4PR1101MB2103.namprd11.prod.outlook.com>
     [not found]             ` <322c348e-3461-c7ab-a845-2782ffce5ef9@redhat.com>
2022-11-03 12:43               ` Kevin Traynor
     [not found]               ` <MWHPR11MB18863EA1EEE5DA7452AF7899E5389@MWHPR11MB1886.namprd11.prod.outlook.com>
2022-11-03 14:42                 ` Kevin Traynor
2022-11-04  6:10 ` [PATCH v3] " Yiding Zhou
2022-11-08  9:26   ` Zhou, YidingX
2022-11-09  0:45   ` Zhang, Qi Z
2022-11-10  2:10     ` Zhou, YidingX
2022-11-10  9:57       ` Zhang, Qi Z
2022-11-11  8:18 ` [PATCH v4] " Yiding Zhou
2022-11-13 16:30 ` Yiding Zhou [this message]
2022-11-14  0:52   ` [PATCH v5] " Zhang, Qi Z

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=20221113163031.1975916-1-yidingx.zhou@intel.com \
    --to=yidingx.zhou@intel.com \
    --cc=dev@dpdk.org \
    --cc=ktraynor@redhat.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    /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;
as well as URLs for NNTP newsgroup(s).