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 C9190A0540; Fri, 12 Aug 2022 04:07:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5799C406A2; Fri, 12 Aug 2022 04:07:20 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 5DE2540697; Fri, 12 Aug 2022 04:07:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660270038; x=1691806038; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=sIbTMiZ7SQVldyJ3rQKPyZ6K8MD04oGQjFJehyYk28c=; b=ScW0B+lOjkc7BzsO9yq6m8Ab9PewnLssYM4xT1m1f/4H/7o9VuzZziGz AvnX80GCd7miKnP2p8YxRHHVx0LAOXfvVsmqBh9mxaiNVH+tMkp01rlJ+ JgAP/+sThqFicJZZxXGVhNnLcju3APewe/vg+DtrpKwaEo0bUtH+ton7f aRPQo6BhjiPSFLxHF6m1cLGhyvJDEA5hcEOcBFkm9TUKiHE92/gVBCBB7 u8d0vTkqcF2BrauRSye6kyeXvCyqAml0/6YVnfrCjOZJizSPo7TWpo+e6 LcZwaQSymMw+iUk2CsYlF0eC7Ad88MfAofcNkrhfxjd/92m0VK4tnqZbz g==; X-IronPort-AV: E=McAfee;i="6400,9594,10436"; a="377794943" X-IronPort-AV: E=Sophos;i="5.93,231,1654585200"; d="scan'208";a="377794943" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2022 19:07:17 -0700 X-IronPort-AV: E=Sophos;i="5.93,231,1654585200"; d="scan'208";a="708837554" Received: from unknown (HELO dpdkserver..) ([10.239.252.174]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2022 19:07:15 -0700 From: Yiding Zhou To: dev@dpdk.org Cc: jingjing.wu@intel.com, beilei.xing@intel.com, stable@dpdk.org, yidingx.zhou@intel.com Subject: [PATCH] net/iavf: fix VLAN insertion Date: Fri, 12 Aug 2022 10:08:21 +0800 Message-Id: <20220812020821.233195-1-yidingx.zhou@intel.com> X-Mailer: git-send-email 2.34.1 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 When the driver tells the VF to insert VLAN tag using the L2TAG2 field, vector Tx path does not use Tx context descriptor and would cause VLAN tag inserted into the wrong location. This commit is to fix issue by using normal Tx path to handle L2TAG2 case. Fixes: 3aa957338503 ("net/iavf: fix VLAN insert") Cc: stable@dpdk.org Signed-off-by: Yiding Zhou --- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h index a59cb2ceee..4ab22c6b2b 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_common.h +++ b/drivers/net/iavf/iavf_rxtx_vec_common.h @@ -253,6 +253,9 @@ 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