From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7384BA04AA; Tue, 8 Sep 2020 09:54:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 54D241BEE1; Tue, 8 Sep 2020 09:54:14 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 32F761B9B7 for ; Tue, 8 Sep 2020 09:54:12 +0200 (CEST) IronPort-SDR: KnE30lc5yWAIIkbYQKSk75dLBSADEARDLHNeQl1CO8KpjG/e4AVa/ym75JAa2k0UrQUkF1RWcx /Ecz0VOzBggw== X-IronPort-AV: E=McAfee;i="6000,8403,9737"; a="138136764" X-IronPort-AV: E=Sophos;i="5.76,405,1592895600"; d="scan'208";a="138136764" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2020 00:54:11 -0700 IronPort-SDR: sCaKf7Vwr3utWhEaZkF+GKqrfT673QhNLphcsgPY7PtnJUhOgaktKV1ll1cqCjRn1LfsmuzSmh Ae9ECfnNmR/w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,405,1592895600"; d="scan'208";a="317106788" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga002.jf.intel.com with ESMTP; 08 Sep 2020 00:54:11 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 8 Sep 2020 00:54:10 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 8 Sep 2020 00:54:10 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 8 Sep 2020 00:54:10 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.172) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 8 Sep 2020 00:54:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hreZxFEY4cAHhjtuH0AYzi52xw9oaA9bOof0HiCcfTl6AxU5wexpLeRcqVKXKsINo3BS/Di3mPB7p3txTe1pCcy586hdvqXMuPgJL+T8F/9TGk6SwHzNUJ+VA4NOirFH9L+9YGVp0EgwIrh9PBwgTNuXJtFrn+aYdv7fQkP91wkNcPXf89SY9dhgwzI2CnjJnFtXs+Rq4KgRXtgUTqXz8mvzYzzUa9YyzAklTs1cLpZ/pgnjtAM+EI3IbJVDpaYyId7TC+ndE25EQwZqqjifeh2Zno63ZiuTIHEgB5ayLtCms5zaY0GTk8JYPGQdXTmZlFChFGi82O7vS46ka+7+Rg== 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-SenderADCheck; bh=KMbK4r91J4hRC0lg/J77isiNSSNheARL4fpGIHEDlcA=; b=FTWwmYsBKYF9A37kpz+OKwuCR5ySRnxEUgd9dawUqz/C7zRII2keaj+XIpz2fV7DKweoYLnklymsYQIv6LyaYWuwJDwQ6KIyso6Tk8q6KqHAbzPyX5ljTnkXYVf6VhHRozjWv3gMs9IBDNoVdxLhtDhfV/xt2lFYddPt3yqnyFv+4rVCDiE17JPfE24b+Oiir74oo0Vqt5SjBVoHcPtrrqkj4K5rS1vaYk5vBIXTgMHWPy7ob3ss0yQ9BxpTnN5PtmmMC+9I+EJD59sYHWG1iIbjb9/clR1hJXmP35t3IjnXh63WKeOOeI3VK8m27yYNjBBhoHjxf7N5rwC+IGdDpQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KMbK4r91J4hRC0lg/J77isiNSSNheARL4fpGIHEDlcA=; b=DM7Z5tRnLgdNvszXb8aXP93ghnLXDyAnlzAAsl9Qq0geKznWTc73nC4kVVqJKOSt38vazPRNq0q9XZ0qp4IaU3Ul/U9VnDdUnMY+98QGBN+gFwGf8bgrQaXvg1rvGHRKfe6ca6EDHt3HHCcFTsw7AJZibrTlHjEiiq3+1xUZSiI= Received: from BN6PR11MB0017.namprd11.prod.outlook.com (2603:10b6:405:6c::34) by BN7PR11MB2867.namprd11.prod.outlook.com (2603:10b6:406:b9::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15; Tue, 8 Sep 2020 07:54:02 +0000 Received: from BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::e41f:999f:5492:5175]) by BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::e41f:999f:5492:5175%6]) with mapi id 15.20.3305.026; Tue, 8 Sep 2020 07:54:02 +0000 From: "Yang, Qiming" To: "Jiang, JunyuX" , "dev@dpdk.org" CC: "Zhang, Qi Z" , "Sun, GuinanX" Thread-Topic: [PATCH v2 3/5] net/ice: support flow mark in AVX path Thread-Index: AQHWhPkEyWC82BYS/ke05e1jZMGOBaleYE7g Date: Tue, 8 Sep 2020 07:54:01 +0000 Message-ID: References: <20200826075501.50052-1-guinanx.sun@intel.com> <20200907091711.5980-1-junyux.jiang@intel.com> <20200907091711.5980-4-junyux.jiang@intel.com> In-Reply-To: <20200907091711.5980-4-junyux.jiang@intel.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.46] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fb2ef8ba-98ae-450a-ba01-08d853cc59ed x-ms-traffictypediagnostic: BN7PR11MB2867: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FRlBs+tU4gTaoCUveBYNlLKlJoo4CVeargKBy9M268MD7QgO5bVO1OLiPTYMzK/rZBhgbYbpThu1+nFShzqvtuL5o6Tl861xPqaZc+tUQ9Sa4MSd+cpOa74/g/CQ4oW1Ry/l4SsgsHnCbCdn0s0RwhIh7SqCBhUVvHmTP+snQuo89y0ioyfVI8WYweqeYCMBMWvEklkFqnXfkeSRtu3juXa0BYZb26aeB63mfzfHzraLs9d9bZ8a1lohVy9CT0w55qy2l1hAxzyW+Zj510TCpZHZDfwl19Yon4exyNDnCDtCBnRna12joQUVmjrB+ydkp1PH6UdHEwv137Lj4EcOWA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB0017.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(346002)(136003)(396003)(376002)(6506007)(53546011)(55016002)(52536014)(26005)(186003)(7696005)(71200400001)(8676002)(83380400001)(8936002)(5660300002)(4326008)(9686003)(110136005)(54906003)(107886003)(316002)(64756008)(66556008)(66476007)(66446008)(66946007)(2906002)(86362001)(76116006)(478600001)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: uhv0N2OXGC1vLx9JyyhbjRHeqBdith5RI/b23pMKpv091wgVkXBvSqU60ZEEJS66qJDzRTMTmPWYsTSJNzXRGsHpLD91VkDKdeIs3MKvQVOuBMSxnfA22YQ6lOEYc3hCc9WHdsaHnfZda5vO5fqRtrMgKlmKrmv53lWvCsd7onFHUex/D4CwlgVK397bH3k0iS+CQzKnLlSXsUI3jvfDOZqzIofRUj5NlHkJqWLpJNldmXDr0YQjhVNu12C6JKThnqV2DjH+7CbmpEHWVAbNh/mW1mlElTwiIwJ0mWFrhH6dLM7tORwV8AMgfO45vPFLXz53cgRz3ioBlFpydzjoU8YwIIyK42VKPCDTBOt2hJqbvCgqzp6UHSseRsTSC6R/2a7nDGsI3sOU8tyNAy0zqBYW/evUFARzHEw8aUfad/zJxuE6TAjS+vwUrmEkBo3duKVChN4t1NyY5bUo91JvSUubT3QAd5SxSqbPY8C0rW9qlSN+t17OV6FoPqh6Qrqy8Dn+FDo5JrDk8fnrbR3sYrCFa/v9ACfgG7ysiCKfB4bgKVOVUSvE/b3pOhj1d3TOsA3C0Wxh65Esrdh2qR44NpWAUm/ERl9BSpIU234eMygCz0M5p+kPw821fcyiDCBIV0Y3ICISYGd6xgSiHjVrWg== 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: BN6PR11MB0017.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb2ef8ba-98ae-450a-ba01-08d853cc59ed X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Sep 2020 07:54:01.7562 (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: PD0ERpi9NL0m2fBsvY7euWQqN+IPwY+yF20VI5O5HrLPEBR32woy84IsUZ2dRIbIWKmnAz3phxwsjQ4aHnoo7A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2867 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 3/5] net/ice: support flow mark in AVX path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Jiang, JunyuX > Sent: Monday, September 7, 2020 17:17 > To: dev@dpdk.org > Cc: Zhang, Qi Z ; Yang, Qiming > ; Sun, GuinanX > Subject: [PATCH v2 3/5] net/ice: support flow mark in AVX path >=20 > From: Guinan Sun >=20 > Support Flow Director mark ID parsing from Flex Rx descriptor in AVX path= . Same comments. >=20 > Signed-off-by: Guinan Sun > --- > drivers/net/ice/ice_rxtx_vec_avx2.c | 64 > ++++++++++++++++++++++++++++- > 1 file changed, 63 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c > b/drivers/net/ice/ice_rxtx_vec_avx2.c > index 07d129e3f..70e4b76db 100644 > --- a/drivers/net/ice/ice_rxtx_vec_avx2.c > +++ b/drivers/net/ice/ice_rxtx_vec_avx2.c > @@ -132,6 +132,25 @@ ice_rxq_rearm(struct ice_rx_queue *rxq) > ICE_PCI_REG_WRITE(rxq->qrx_tail, rx_id); } >=20 > +static inline __m256i > +ice_flex_rxd_to_fdir_flags_vec_avx2(const __m256i fdir_id0_7) { #define > +FDID_MIS_MAGIC 0xFFFFFFFF > + RTE_BUILD_BUG_ON(PKT_RX_FDIR !=3D (1 << 2)); > + RTE_BUILD_BUG_ON(PKT_RX_FDIR_ID !=3D (1 << 13)); > + const __m256i pkt_fdir_bit =3D _mm256_set1_epi32(PKT_RX_FDIR | > + PKT_RX_FDIR_ID); > + /* desc->flow_id field =3D=3D 0xFFFFFFFF means fdir mismatch */ > + const __m256i fdir_mis_mask =3D > _mm256_set1_epi32(FDID_MIS_MAGIC); > + __m256i fdir_mask =3D _mm256_cmpeq_epi32(fdir_id0_7, > + fdir_mis_mask); > + /* this XOR op results to bit-reverse the fdir_mask */ > + fdir_mask =3D _mm256_xor_si256(fdir_mask, fdir_mis_mask); > + const __m256i fdir_flags =3D _mm256_and_si256(fdir_mask, > pkt_fdir_bit); > + > + return fdir_flags; > +} > + > static inline uint16_t > _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, struct rte_mbuf > **rx_pkts, > uint16_t nb_pkts, uint8_t *split_packet) @@ -459,9 > +478,51 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, struct > rte_mbuf **rx_pkts, > rss_vlan_flag_bits); >=20 > /* merge flags */ > - const __m256i mbuf_flags =3D _mm256_or_si256(l3_l4_flags, > + __m256i mbuf_flags =3D _mm256_or_si256(l3_l4_flags, > rss_vlan_flags); >=20 > + if (rxq->fdir_enabled) { > + const __m256i fdir_id4_7 =3D > + _mm256_unpackhi_epi32(raw_desc6_7, > raw_desc4_5); > + > + const __m256i fdir_id0_3 =3D > + _mm256_unpackhi_epi32(raw_desc2_3, > raw_desc0_1); > + > + const __m256i fdir_id0_7 =3D > + _mm256_unpackhi_epi64(fdir_id4_7, > fdir_id0_3); > + > + const __m256i fdir_flags =3D > + > ice_flex_rxd_to_fdir_flags_vec_avx2(fdir_id0_7); > + > + /* merge with fdir_flags */ > + mbuf_flags =3D _mm256_or_si256(mbuf_flags, > fdir_flags); > + > + /* write to mbuf: have to use scalar store here */ > + rx_pkts[i + 0]->hash.fdir.hi =3D > + _mm256_extract_epi32(fdir_id0_7, 3); > + > + rx_pkts[i + 1]->hash.fdir.hi =3D > + _mm256_extract_epi32(fdir_id0_7, 7); > + > + rx_pkts[i + 2]->hash.fdir.hi =3D > + _mm256_extract_epi32(fdir_id0_7, 2); > + > + rx_pkts[i + 3]->hash.fdir.hi =3D > + _mm256_extract_epi32(fdir_id0_7, 6); > + > + rx_pkts[i + 4]->hash.fdir.hi =3D > + _mm256_extract_epi32(fdir_id0_7, 1); > + > + rx_pkts[i + 5]->hash.fdir.hi =3D > + _mm256_extract_epi32(fdir_id0_7, 5); > + > + rx_pkts[i + 6]->hash.fdir.hi =3D > + _mm256_extract_epi32(fdir_id0_7, 0); > + > + rx_pkts[i + 7]->hash.fdir.hi =3D > + _mm256_extract_epi32(fdir_id0_7, 4); > + } /* if() on fdir_enabled */ > + > #ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC > /** > * needs to load 2nd 16B of each desc for RSS hash parsing, > @@ -551,6 +612,7 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue > *rxq, struct rte_mbuf **rx_pkts, > mb0_1 =3D _mm256_or_si256(mb0_1, rss_hash0_1); > } /* if() on RSS hash parsing */ > #endif > + > /** > * At this point, we have the 8 sets of flags in the low 16-bits > * of each 32-bit value in vlan0. > -- > 2.17.1