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 692F8A0540; Fri, 12 Aug 2022 04:51:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14E6C406A2; Fri, 12 Aug 2022 04:51:46 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id B60FE40697; Fri, 12 Aug 2022 04:51:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660272705; x=1691808705; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZoVJmv2jzXV5RtrtGHBYthp/24o45BizbascBeqzB5I=; b=HSj/Ol+7qMDFOF0Mewpq/p1brV+6Dzv32gJBOnTM3NL6C7p7LsUNemf2 8YtfETzvlF2MyEv6e0mP5LCbP+irOuwKL8T6cqyXwKC3wB0GCQN3RnZ5U AaOZQZMEmt0/NjO4PFGb7SxoiMlP9LTz1FNf/plv1gz3lP+ugWr0PFPLf nLPid4LDrzgTiswvc89hxADFBR8js7wtpLedprir+leJG+Rw+QVSSnXDJ ySVjH8Zounz8biPA2AFY5te9UNp7Y+F+q1+R54IxDFAgGywdFnA6jf2xS EHTyvWM8kVmz2GnMC/ikhRzv7b1IyhxYg1eO0xx3R6vKo8UwEmsJ781Zn g==; X-IronPort-AV: E=McAfee;i="6400,9594,10436"; a="291508488" X-IronPort-AV: E=Sophos;i="5.93,231,1654585200"; d="scan'208";a="291508488" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2022 19:51:43 -0700 X-IronPort-AV: E=Sophos;i="5.93,231,1654585200"; d="scan'208";a="634485875" Received: from unknown (HELO dpdkserver..) ([10.239.252.174]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2022 19:51:41 -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:52:53 +0800 Message-Id: <20220812025253.233392-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 PF 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 the 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