From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA2ADA0542; Fri, 11 Nov 2022 09:16:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BE3FA410F2; Fri, 11 Nov 2022 09:16:49 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 6497040141; Fri, 11 Nov 2022 09:16:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668154608; x=1699690608; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mjRZqlEumx0UaLxx11AeBpEQV7oPmDEAtOxnPEGSP/k=; b=kyOxhr67uBcgxqhTUMCenLkmloSEikk098HFwb1th5/Mczu3r84yzOj5 B5deUgXFS0l1u1SH+dy/ofYQvH8PiI517RK5JHVEtIup4r+mPvEi59H7x A1hsmTyf07VyK7INKUsFXkdjdBSPdKbKR5WI0EsJmRH5m0/Xjiy3Cq5Pc QvVmkIkdtNnPE8zNy+HVaxGSP9piKSHxq0X2OtMjRaL7bII9PSZBeIMZC Mm3bKOsKiLOLzYsOeIlZouQn+0wVCNaJcEMyN/Jgs4v0p7th6MJ577Tnj oELx2WLOyrUuDLJkm6a2fqsakoD4S//45+zX9qvK/vhHqAicwM9ckw0ZU A==; X-IronPort-AV: E=McAfee;i="6500,9779,10527"; a="291274538" X-IronPort-AV: E=Sophos;i="5.96,156,1665471600"; d="scan'208";a="291274538" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2022 00:16:47 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10527"; a="670674363" X-IronPort-AV: E=Sophos;i="5.96,156,1665471600"; d="scan'208";a="670674363" Received: from unknown (HELO dpdkserver..) ([10.239.252.174]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2022 00:15:42 -0800 From: Yiding Zhou To: dev@dpdk.org, qiming.yang@intel.com Cc: qi.z.zhang@intel.com, ktraynor@redhat.com, Yiding Zhou , stable@dpdk.org Subject: [PATCH v4] net/iavf: revert fix VLAN insertion Date: Fri, 11 Nov 2022 16:18:39 +0800 Message-Id: <20221111081839.1962679-1-yidingx.zhou@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221018102602.217673-1-yidingx.zhou@intel.com> References: <20221018102602.217673-1-yidingx.zhou@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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