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 CEBB2A0586; Sun, 13 Nov 2022 17:27:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 68DD940150; Sun, 13 Nov 2022 17:27:42 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 6040E4014F; Sun, 13 Nov 2022 17:27:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668356861; x=1699892861; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=a/FO3N9tP7rckWXUmt0sqLXfvfWRZa8bHzC/2tAtc3w=; b=MP4q3+eDwwS3Oy0O/j2YTrrpHlMW+B5zq0I02mmDdz4NU3g2YjuBWAzT TgmkiUqr74pRxGTgdWU1XYGG+j2V2NVVRHfNyTA5BEMyafUvKw/Rv9lEo SyVXVKjMUNid4b9VxZdkTqzTyY1GR+hPF0o8K1rWyuOkK0FH/CNiJy2mN VpprXAnXGsOFg5003HWAGrMzkfQKSDm02/4JItzfq/g1Po6xypMxrteCZ vAdhHL3Jw14nmOFM1QGO+JV8KxB/Sskz48j5+/3ixVpnOC9dIDgYHWqfo /fg9tcI/mkij7fvRQjlMcDezwgOq+jYEkblHHknGwIGCDj2D5xOgp1WLw A==; X-IronPort-AV: E=McAfee;i="6500,9779,10530"; a="291540783" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="291540783" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2022 08:27:40 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10530"; a="883265565" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="883265565" Received: from unknown (HELO dpdkserver..) ([10.239.252.174]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2022 08:27:38 -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 v5] net/iavf: revert fix VLAN insertion Date: Mon, 14 Nov 2022 00:30:31 +0800 Message-Id: <20221113163031.1975916-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 --- 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