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 08732A00C3; Tue, 16 Aug 2022 11:24:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B88C140691; Tue, 16 Aug 2022 11:24:58 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 1423140150; Tue, 16 Aug 2022 11:24:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660641896; x=1692177896; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PnoEGh95xp/ww81QN1rSoun2Caw6Zz4M+H627xU7LLo=; b=leMADcIVwZ5XZrEf4TNYhlN4QxorHq2qwaQUxODbPWu0L815a+r3eJG9 T5AJhDl9+lDynTtWmSjAN13a8RhntxMzc3ZxjQHfU7ctChMSwf6O1Ou/e C2+kNitmcyvUWXTjbuAQKgLSFcnW6WPBtoGyPuLyI7xkWn0NAs61ZoRPb Agx9QuOVn+SPgQ3sHbLj5+yN1IPkkhmryO02yWrOh1MoMKa385pxqqLeU cPlXTRWGSnOhFYP3DkJDBxApnGZv3m4xklWjGWMyxBKjFlLuAbnkcuuAy pgp5bH05nrXWo+BDsLqDFpYQYobFxaGFT3zCiMNG9pglKquAkAZ+Wk/Id A==; X-IronPort-AV: E=McAfee;i="6400,9594,10440"; a="292168586" X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="292168586" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2022 02:24:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="696292807" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by FMSMGA003.fm.intel.com with ESMTP; 16 Aug 2022 02:24:54 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Tue, 16 Aug 2022 02:24:54 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Tue, 16 Aug 2022 02:24:53 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Tue, 16 Aug 2022 02:24:53 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Tue, 16 Aug 2022 02:24:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IRCBLsaHB3adVyAqMliGhDdYXGdNQxF419kXpCweshMEYxkKfaAuiBkrM12RbB2ToGural8MvB+Cf4XiyRE0rZdN5xOC6KGyJGN9RgarxzcecTh9t/OjPiV96vmjAz3Zj7QWUTj/ryWl8KCK2/l7tU/h8fwspiDrdQYiySyHGl+NzdI7iUTOiu+FFnphQcomUhNlgZED1kDpDWI/yPWFQRntUkeJpSnt9T665VrXswW93Mt9tp0vu4uvtdFTMWwchVF4EzPVHTraSSM/puBhi/SLYKnWYtKjbntJZLqcwPjKxg/Ag4zuAcub+X+lGO3aZA4K1T5aKV6v68JdyrUi9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hkSeqqaJjmNo81tDHKN/47SQID9HSF1NhDifv/4AyUQ=; b=YuDjK3oEWwqY6huCCr/AdXfOtyzmOYU2TLK6w34/93H2u47jZ8P5RPHA2rSbXk1AlGhEyL2MJgzARVXXv4RK+Z1kLxm3fmRm5YbXMrGwBA6PWauqF1lfAvjWgvW3auuTQk2mPIaV/SUEfXtTdxGynoVDFCffKL45NwiKItjbixeW7XPk9ordySTxbxZ/xlFJNkRLUzhnFc5RZKocOpzYsEZTBbiokLfDPyzSODQFT2vSpE3RUV4Att8a4EGdtWmDPH1cCRTltadslid8p6xd3We3N882UQYDjGjkumc707LMkhBcV2Rg4aw+GJMqWxdf+S50glbVzvcROrYJXmVdsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW4PR11MB5774.namprd11.prod.outlook.com (2603:10b6:303:182::16) by MN2PR11MB4333.namprd11.prod.outlook.com (2603:10b6:208:195::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Tue, 16 Aug 2022 09:24:45 +0000 Received: from MW4PR11MB5774.namprd11.prod.outlook.com ([fe80::48f7:931:e4c7:1ab1]) by MW4PR11MB5774.namprd11.prod.outlook.com ([fe80::48f7:931:e4c7:1ab1%7]) with mapi id 15.20.5525.011; Tue, 16 Aug 2022 09:24:45 +0000 From: "Rong, Leyi" To: "Zeng, ZhichaoX" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Yang, Qiming" , "Richardson, Bruce" , Konstantin Ananyev , "Wu, Jingjing" , "Xing, Beilei" , "Zhang, Qi Z" Subject: RE: [PATCH] net/iavf: fix processing vlan tci in vector path Thread-Topic: [PATCH] net/iavf: fix processing vlan tci in vector path Thread-Index: AQHYna2RWlzrkELWa0ibLwxJ/n0YAa2xXtZQ Date: Tue, 16 Aug 2022 09:24:45 +0000 Message-ID: References: <20220722092945.4017592-1-zhichaox.zeng@intel.com> In-Reply-To: <20220722092945.4017592-1-zhichaox.zeng@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f6945764-3f6b-487e-f3ba-08da7f6928a8 x-ms-traffictypediagnostic: MN2PR11MB4333:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8auV6+wrQ383X5KQYqKMzNlID+yKCqPztKSeOoOCRJnlvOKstehpRBTYvpHRI7j245+mSO+vdvBj11OUK9ckmYm3qB7IMi6TyImktU5jemfxrNEr7x5EG2q6btHlztjg1bBVvkhmzEKZ6BHZBhan5Rwg/w7EsR2fBmF3XOWtIKdez0UueUqCxckJlEjmTk6YWBZPiGi7nX4e0lhBHnHtGBo1OS7FwwQiM8/wbh5ZrfRNxjmWvnL1i3KdbssKsU4KId3VMDq3KhBURebi2PmdiSEtnCUDBN78xIGnhBmti3ff7uf+/UY0V5B3TRzPiQBHIYzseh+5ldR1+2sCqjep1nOWyQ856VXCsIadlC0gCtDo/szgwUce5t8G/ps/tnui9KI4/4068hynU5hhTJpyzj6pWYpW6K9D2buO30Jz+Oc3MktWtoRlYi1ebUEdOjNvThIBXDraqNKHuloawvfzFpRbAPrsB2WcvpvkG4aawF4ZLWahjLgqQV+1gR809secCvNI8sYLWnjCq5Maf1rr0ZvwsdOuM4Bxee/JB/Xj7ZIQ/ySuszdyZzi/HXSkPLfpArLirKzUgA2YJ64AldynEKinHyVyJofzY/tO1zw6j3QA3CTpmAWZqMp5vYYM77IAvK79D1fjKsYXTLWDs/Vxkk61hbFQL6h5mMC0KhxnxLyEdkh3AxTzTVIYFsZ214hwaS8RKAyrCtsBRame9U71FWC307kS7X6Q0c29fqPjfY6IlFgBej+RysFkFaI/cxGTyKRc2tCpIGduvlW1cqMEPoJl5nGjKUh44M8gPIBL3pLPe90VCZ8e1K7qpRy+TnJn x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR11MB5774.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(376002)(366004)(396003)(39860400002)(346002)(136003)(38070700005)(86362001)(7696005)(6506007)(53546011)(33656002)(41300700001)(9686003)(26005)(186003)(71200400001)(107886003)(478600001)(83380400001)(66476007)(316002)(52536014)(55016003)(66946007)(66556008)(8676002)(54906003)(66446008)(76116006)(64756008)(110136005)(122000001)(4326008)(8936002)(82960400001)(5660300002)(2906002)(38100700002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?uz7kztBnlu/6VNmasPaRY/II4e5xza44CEHU4zX1oMSgyPE8aADwoVh/CW93?= =?us-ascii?Q?+tbDCi9oCtHZUfiN/hWvbUhiHorE3LtgMss7OfZGZ92/MV044B36gWor95qV?= =?us-ascii?Q?b6G93mycuJ6l3WWjp8gwIDM8b+G1i2NuUNKdJK6CgZHFRspxgZtX7sSyGSg2?= =?us-ascii?Q?44Itrx8PZlzuSYnbT6VkQmdXrMjy43G8wRLROwB3Ooqvj3GEBUoA6mN4CfCm?= =?us-ascii?Q?RNqq0jyHYCYO+WKLYEMW127I93GZghsCNMmVvJk8In791fGaMgEzkrOLJfDm?= =?us-ascii?Q?PnstuUbDuuMasmAdZG/lr0JhQn6qsZlNmLI5CXiHB9Ie/3kd/5dzDlbVAD2r?= =?us-ascii?Q?DlhpFTQYQttC/nbckHQboFmbViy/MlPTT14bP7v5fGY/vZMX5uHjcibVdfsv?= =?us-ascii?Q?YAF3sNb0w3K5XZbMarw8JL5GXmEAKMXcH2wI0cTB+D3/O4oedxC2Z0WUoVy1?= =?us-ascii?Q?D4r1pEV3iuzCT5XmBfAqKaC1e5bh+x3KiQ5/NHeP7ga0cnc6IBFHwHUNbzaC?= =?us-ascii?Q?hn/K4WJgP5u15XS6LZ9XP0clLmdK+JPVVGkqoYKDbHkCiATfkIjnE60F+5Qs?= =?us-ascii?Q?/jE5/IVReW8DdfWH4LoSllo4yzKcZ1nBDgqSGz/sDO+LqzLlLg45V3MsGV1M?= =?us-ascii?Q?1CiJwekzPxySg0npy6SxfDStHzNruDa86Idt3HZBC9ls20ilCcRQhznnHTrP?= =?us-ascii?Q?sI+kvQRktL/bd1pAod+sZ0laVhW6yJ9X01z3m+afnkS8JC6HVFnf6J7jsZsX?= =?us-ascii?Q?jRMoY0uoCFE6cUwCTY+tKLTOoOgYMb3aqS0tsncT9A0eNwiJFDOI7Ym7rGN7?= =?us-ascii?Q?KD3E3T1vqnYQ22AWmaD8dNQNi3sza+1gwWboOfzcklRW2WXFJ1y5B1ihf9+L?= =?us-ascii?Q?fKIoLbFX+SoEgjUjEH0EtYa1cZxUwY8s7lkO8O+sPgsIPogbuqE8r54d3t/E?= =?us-ascii?Q?SPL7zWnXAtAP4CelIHumO49F8KVgPHa2fkQbIGnDKTRcAdactFuByKXWlnQK?= =?us-ascii?Q?qpIIGAi6TdByWwSN5CNLd2kMYkNitj2VauSJLM6xKiq3nuvmKozMa02VTi8g?= =?us-ascii?Q?pgkZdNPrOW07Kr60spxn/XrxBs2I0kSTBX/T5cb2fY4EVJ+y25oTIYZn9bFP?= =?us-ascii?Q?IVBok1nQvDODjdqExnSmeisx0Vk4V9bp+VVLWcgCyT6HbhDJ/ohnPYyhTmmX?= =?us-ascii?Q?p/mW0aLp4SnYUX+JB5foTaxdrtf7wfcXXFOLIiEnVboCtpr5W6YbD95Bd25H?= =?us-ascii?Q?Pa2yKqej8ysIjcs68tucUI9dfF/YWeUqKQy4nHeoePP1x6pswU761HFI1g+c?= =?us-ascii?Q?HnAdBsEpcnrtLtgpn9ABesjQnekAC8i3WZor5QqFdrs6DnmzSQtrEwMgSXiT?= =?us-ascii?Q?yatK7c3dcgxOW/IvBy7Mtwj6Y2xziDzgc5L4oQ9SnuBSQzD9GN8yywuUIXKA?= =?us-ascii?Q?JePGPTlgHNfqtRnaA2AsX0sUcCtZqNRe1kkiXCsTomvZ1DDwoeVXl4vzD9c6?= =?us-ascii?Q?zw11iPOG1d87cZSqnkaRiGgfJQeWfzEwOnoPV2l4Rayj7Rl8Mkr0X0Dm1nL8?= =?us-ascii?Q?4PsOEof5IPAnry5y1hS8L6AjGj6Shsm/2O8oSudW?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5774.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6945764-3f6b-487e-f3ba-08da7f6928a8 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Aug 2022 09:24:45.6332 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 2XiyxkiftAHB5MCxOsoTX6WOSui3Iw1yct7Gqtl1DncndLTKBKUUywBzEZTqevy0sT7UCkKxT5mm+zjHeMUnVA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4333 X-OriginatorOrg: intel.com 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 Hi Zhichao, The "vector" in the subject and commit log should be revised to "SSE" with = a more accurate expression. For the code part, see below.=20 > -----Original Message----- > From: Zeng, ZhichaoX > Sent: Friday, July 22, 2022 5:30 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Yang, Qiming ; Zeng, ZhichaoX > ; Richardson, Bruce = ; > Konstantin Ananyev ; Wu, Jingjing > ; Xing, Beilei ; Zhang, Qi = Z > ; Rong, Leyi > Subject: [PATCH] net/iavf: fix processing vlan tci in vector path >=20 > From: Zhichao Zeng >=20 > The vector RX path does not process vlan tci correctly when it's stored i= n L2TAG2, > so that the vlan tci could not be extracted from descriptor, then would n= ot be > put into mbuf also. >=20 > Add processing when vlan tci is stored in L2TAG2. >=20 > Fixes: 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE pat= h") > Cc: stable@dpdk.org >=20 > Signed-off-by: Zhichao Zeng > --- > drivers/net/iavf/iavf_rxtx_vec_sse.c | 100 ++++++++++++++++++++++----- > 1 file changed, 83 insertions(+), 17 deletions(-) >=20 > diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c > b/drivers/net/iavf/iavf_rxtx_vec_sse.c > index 4a5232c1d2..00ca1f0c39 100644 > --- a/drivers/net/iavf/iavf_rxtx_vec_sse.c > +++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c > @@ -208,15 +208,24 @@ flex_rxd_to_fdir_flags_vec(const __m128i fdir_id0_3= ) > return fdir_flags; > } >=20 > +#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC > +static inline void > +flex_desc_to_olflags_v(struct iavf_rx_queue *rxq, __m128i descs[4], __m1= 28i > descs_bh[4], > + struct rte_mbuf **rx_pkts) > +#else > static inline void > flex_desc_to_olflags_v(struct iavf_rx_queue *rxq, __m128i descs[4], > struct rte_mbuf **rx_pkts) > +#endif > { > const __m128i mbuf_init =3D _mm_set_epi64x(0, rxq->mbuf_initializer); > __m128i rearm0, rearm1, rearm2, rearm3; >=20 > __m128i tmp_desc, flags, rss_vlan; >=20 > + unsigned long long vlan_mask =3D 0; > + if (rxq->rx_flags & IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG1) > + vlan_mask =3D RTE_MBUF_F_RX_VLAN | Be cautious to introduce branch statement in vector path, alternative is sp= litting the RSS and vlan flag processing. Better to check benchmarking data= w/ and w/o this flag. > RTE_MBUF_F_RX_VLAN_STRIPPED; > /* mask everything except checksum, RSS and VLAN flags. > * bit6:4 for checksum. > * bit12 for RSS indication. > @@ -259,8 +268,8 @@ flex_desc_to_olflags_v(struct iavf_rx_queue *rxq, > __m128i descs[4], > const __m128i rss_vlan_flags =3D _mm_set_epi8(0, 0, 0, 0, > 0, 0, 0, 0, > 0, 0, 0, 0, > - RTE_MBUF_F_RX_RSS_HASH | RTE_MBUF_F_RX_VLAN > | RTE_MBUF_F_RX_VLAN_STRIPPED, > - RTE_MBUF_F_RX_VLAN | > RTE_MBUF_F_RX_VLAN_STRIPPED, > + RTE_MBUF_F_RX_RSS_HASH | vlan_mask, > + vlan_mask, > RTE_MBUF_F_RX_RSS_HASH, 0); >=20 > /* merge 4 descriptors */ > @@ -286,6 +295,39 @@ flex_desc_to_olflags_v(struct iavf_rx_queue *rxq, > __m128i descs[4], > /* merge the flags */ > flags =3D _mm_or_si128(flags, rss_vlan); >=20 > +#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC > + if (rxq->rx_flags & IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG2_2) { > + const __m128i l2tag2_mask =3D > + _mm_set1_epi32(1 << > IAVF_RX_FLEX_DESC_STATUS1_L2TAG2P_S); > + > + const __m128i vlan_tci0_1 =3D > + _mm_unpacklo_epi32(descs_bh[0], descs_bh[1]); > + const __m128i vlan_tci2_3 =3D > + _mm_unpacklo_epi32(descs_bh[2], descs_bh[3]); > + const __m128i vlan_tci0_3 =3D > + _mm_unpacklo_epi64(vlan_tci0_1, vlan_tci2_3); > + > + __m128i vlan_bits =3D _mm_and_si128(vlan_tci0_3, l2tag2_mask); > + > + vlan_bits =3D _mm_srli_epi32(vlan_bits, > + > IAVF_RX_FLEX_DESC_STATUS1_L2TAG2P_S); > + > + const __m128i vlan_flags_shuf =3D > + _mm_set_epi8(0, 0, 0, 0, > + 0, 0, 0, 0, > + 0, 0, 0, 0, > + 0, 0, > + RTE_MBUF_F_RX_VLAN | > + RTE_MBUF_F_RX_VLAN_STRIPPED, > + 0); > + > + const __m128i vlan_flags =3D _mm_shuffle_epi8(vlan_flags_shuf, > +vlan_bits); > + > + /* merge with vlan_flags */ > + flags =3D _mm_or_si128(flags, vlan_flags); > + } > +#endif > + > if (rxq->fdir_enabled) { > const __m128i fdir_id0_1 =3D > _mm_unpackhi_epi32(descs[0], descs[1]); @@ -748,6 > +790,9 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq, > pos +=3D IAVF_VPMD_DESCS_PER_LOOP, > rxdp +=3D IAVF_VPMD_DESCS_PER_LOOP) { > __m128i descs[IAVF_VPMD_DESCS_PER_LOOP]; > +#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC > + __m128i descs_bh[IAVF_VPMD_DESCS_PER_LOOP]; > +#endif > __m128i pkt_mb0, pkt_mb1, pkt_mb2, pkt_mb3; > __m128i staterr, sterr_tmp1, sterr_tmp2; > /* 2 64 bit or 4 32 bit mbuf pointers in one XMM reg. */ @@ - > 806,8 +851,6 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq, > /* C.1 4=3D>2 filter staterr info only */ > sterr_tmp1 =3D _mm_unpackhi_epi32(descs[1], descs[0]); >=20 > - flex_desc_to_olflags_v(rxq, descs, &rx_pkts[pos]); > - > /* D.2 pkt 3,4 set in_port/nb_seg and remove crc */ > pkt_mb3 =3D _mm_add_epi16(pkt_mb3, crc_adjust); > pkt_mb2 =3D _mm_add_epi16(pkt_mb2, crc_adjust); @@ -821,36 > +864,35 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq, > * needs to load 2nd 16B of each desc for RSS hash parsing, > * will cause performance drop to get into this context. > */ > - if (offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH) { > + if (offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH || > + rxq->rx_flags & > IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG2_2) { > /* load bottom half of every 32B desc */ > - const __m128i raw_desc_bh3 =3D > - _mm_load_si128 > + descs_bh[3] =3D _mm_load_si128 > ((void *)(&rxdp[3].wb.status_error1)); > rte_compiler_barrier(); > - const __m128i raw_desc_bh2 =3D > - _mm_load_si128 > + descs_bh[2] =3D _mm_load_si128 > ((void *)(&rxdp[2].wb.status_error1)); > rte_compiler_barrier(); > - const __m128i raw_desc_bh1 =3D > - _mm_load_si128 > + descs_bh[1] =3D _mm_load_si128 > ((void *)(&rxdp[1].wb.status_error1)); > rte_compiler_barrier(); > - const __m128i raw_desc_bh0 =3D > - _mm_load_si128 > + descs_bh[0] =3D _mm_load_si128 > ((void *)(&rxdp[0].wb.status_error1)); > + } >=20 > + if (offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH) { > /** > * to shift the 32b RSS hash value to the > * highest 32b of each 128b before mask > */ > __m128i rss_hash3 =3D > - _mm_slli_epi64(raw_desc_bh3, 32); > + _mm_slli_epi64(descs_bh[3], 32); > __m128i rss_hash2 =3D > - _mm_slli_epi64(raw_desc_bh2, 32); > + _mm_slli_epi64(descs_bh[2], 32); > __m128i rss_hash1 =3D > - _mm_slli_epi64(raw_desc_bh1, 32); > + _mm_slli_epi64(descs_bh[1], 32); > __m128i rss_hash0 =3D > - _mm_slli_epi64(raw_desc_bh0, 32); > + _mm_slli_epi64(descs_bh[0], 32); >=20 > __m128i rss_hash_msk =3D > _mm_set_epi32(0xFFFFFFFF, 0, 0, 0); @@ - > 869,6 +911,30 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq, > pkt_mb1 =3D _mm_or_si128(pkt_mb1, rss_hash1); > pkt_mb0 =3D _mm_or_si128(pkt_mb0, rss_hash0); > } /* if() on RSS hash parsing */ > + > + if (rxq->rx_flags & IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG2_2) > { > + /* L2TAG2_2 */ > + __m128i vlan_tci3 =3D _mm_slli_si128(descs_bh[3], 4); > + __m128i vlan_tci2 =3D _mm_slli_si128(descs_bh[2], 4); > + __m128i vlan_tci1 =3D _mm_slli_si128(descs_bh[1], 4); > + __m128i vlan_tci0 =3D _mm_slli_si128(descs_bh[0], 4); > + > + const __m128i vlan_tci_msk =3D _mm_set_epi32(0, > 0xFFFF0000, 0, 0); > + > + vlan_tci3 =3D _mm_and_si128(vlan_tci3, vlan_tci_msk); > + vlan_tci2 =3D _mm_and_si128(vlan_tci2, vlan_tci_msk); > + vlan_tci1 =3D _mm_and_si128(vlan_tci1, vlan_tci_msk); > + vlan_tci0 =3D _mm_and_si128(vlan_tci0, vlan_tci_msk); > + > + pkt_mb3 =3D _mm_or_si128(pkt_mb3, vlan_tci3); > + pkt_mb2 =3D _mm_or_si128(pkt_mb2, vlan_tci2); > + pkt_mb1 =3D _mm_or_si128(pkt_mb1, vlan_tci1); > + pkt_mb0 =3D _mm_or_si128(pkt_mb0, vlan_tci0); > + } > + > + flex_desc_to_olflags_v(rxq, descs, descs_bh, &rx_pkts[pos]); > #else > + flex_desc_to_olflags_v(rxq, descs, &rx_pkts[pos]); > #endif >=20 > /* C.2 get 4 pkts staterr value */ > -- > 2.25.1