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 D0CDD41E08; Mon, 13 Mar 2023 07:52:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ADF09406BC; Mon, 13 Mar 2023 07:52:14 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 4ED8F40151 for ; Mon, 13 Mar 2023 07:52:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678690333; x=1710226333; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=LuHLtMvBULXgOycVmCQivPy1FnlAAZ8PFK8GoqSunOM=; b=eTnyvcSpZp+OM2MgMN9hLpCUCbebjAoMGbMmcEh+xFGbFgGU6FJELL4R pMO6YusARwiUsY5BiLwnQ9NbT3CvbK3QNK1WVNXZ/vQZ51GOiczH520/d wG+XLwY18ATdV/iKNXypgIEgpU3PfSUntNKqjetoMVATuruS3rTPk3QA6 3XVLQy+6y9Prium90B9qQP/1K1y+h2WAPXFh8k2vc4xSscEUNSdtkjYWM JCrSVlcRmQ7Qw9R/i9CBslcF/FK0bu/H9TnBaPxe1BH9xYskdAJvOa2Pq 5B3/aqYfcm16ZREaAJAtQ1rvYwXsboLc5DBwe90iJ/bR1pISNBy3BQbLB g==; X-IronPort-AV: E=McAfee;i="6500,9779,10647"; a="325433460" X-IronPort-AV: E=Sophos;i="5.98,256,1673942400"; d="scan'208";a="325433460" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2023 23:52:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10647"; a="711017148" X-IronPort-AV: E=Sophos;i="5.98,256,1673942400"; d="scan'208";a="711017148" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga001.jf.intel.com with ESMTP; 12 Mar 2023 23:52:12 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Sun, 12 Mar 2023 23:52:11 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Sun, 12 Mar 2023 23:52:11 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) 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.2507.21; Sun, 12 Mar 2023 23:52:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=heDnLQtZ3sq4jIyb72z2JPaBSrmaWigkVbTeLnKFMUPi/jgxl2HcDcZcqcavuPXBaDBh9UgLaWxcZwMp76TTbit0n/hyphFpmVti9lyBiAb1alJ2esmaBtsN3w59TNo5JBZWxtUf/msLk75kk+nNLl5IAkUgVyPt2QIZmZ9j71biTcu+Ej84xOUWqmCVNtyocx5STByLJGrUa5l+H4myz/0+Djk/cEPQnIa7UnIiUas6CUfMtO/yHu+bpQpWq3Ciq9gDlMPeo0VP10Nts5q2I/9gxf+02ZQyMJj3uEx7dEMd9sb+VpfyekLZgUcR2DtT3uRp9mj7kTkbKoWsn+x74Q== 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=klgNQVi6lFcrDi8Y5y5q023i64l08SzQ4ORTdvQorqU=; b=HExXv96ZTrmZOKGXcVadycsljCmiea20wUjD+m3tWJSDIWINwpfH8UjHjFbwus/MYbsxG8Izp+VO/FYM+yOva2fyXQZRGZ96vhNYdPyhsMWfpXzhyiYd3xjfCRDboe6HwlA0WaW/IdxpnOP3lH6a4TWgNgGVusF9ioe4juSZeUoQa1S5lVV7UKnycCsf7OtDKUsakoYdXsY926ARQMSPsc+mMvYUVdnzS3Zw0y9E4APCDROJ3UPdZMRgMU3jdg5+eoyKfp14Al34Z2SxBz5853W+J5pewny6ryGWBPjXFPo7OTunOW4JyyV8EQbZqgwnTVvXqqRg3cwwLqovaWKfFw== 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 DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by SJ0PR11MB4814.namprd11.prod.outlook.com (2603:10b6:a03:2d8::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.24; Mon, 13 Mar 2023 06:52:09 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::2c5d:49cd:a9b4:f764]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::2c5d:49cd:a9b4:f764%6]) with mapi id 15.20.6178.024; Mon, 13 Mar 2023 06:52:09 +0000 From: "Zhang, Qi Z" To: =?iso-8859-1?Q?Morten_Br=F8rup?= , Kamalakshitha Aligeri , "Zhang, Yuying" , "Xing, Beilei" , "Rong, Leyi" , "ruifeng.wang@arm.com" , "feifei.wang2@arm.com" CC: "nd@arm.com" , "dev@dpdk.org" Subject: RE: [PATCH] net/i40e: avx512 fast-free path bug fix Thread-Topic: [PATCH] net/i40e: avx512 fast-free path bug fix Thread-Index: AQHZUSumqBxOVsrBA0+mzPXZ9Fe0Xa7vw78AgAiKhGA= Date: Mon, 13 Mar 2023 06:52:08 +0000 Message-ID: References: <20230307193221.5365-1-kamalakshitha.aligeri@arm.com> <98CBD80474FA8B44BF855DF32C47DC35D877CA@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D877CA@smartserver.smartshare.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB5994:EE_|SJ0PR11MB4814:EE_ x-ms-office365-filtering-correlation-id: 29d73dbe-0e63-4a3d-3c02-08db238f7738 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8qOBxARzzuXyMhnSld3TroMe5opT5j8qg/0GkHfw4tGsT37tiRGvwWLdvTbnaMb2E/8LeWCR9rv7ZQdg4z9l/mHH1DD+0+w8e7FA5mJa10t/9gZTI0nIZKouJjrOLIBqPKph71aA1uTi/7DgI+JWcdUa0cp9c4Rakp6DJkXSZi6/ipcKCA8D7x26CYWNISRtpmQlyLYxi42jOXo+O2QZ7vNom3gDSnNSpY0ED8vgIb+VDcuIDdRQlJcaCSY0G6zicv7JKRFMuiOpVamfDmWAzJojEu5qsnECPxR1fNxDe7PsT3NkggyiflW6J70VNaOwdamh/GFR8Eyo97BDziLWSVUwAvK5fjBZa8/tkacKOHgP4vUUC0aV1yPg161yQ8vttTCeiLZSf87TiEQ+tHRwYNvxT3JpbmjUvM1we1LbEKFMCrpcH8Z8Yhb+NZPD8yztZSqjG9X4ygiclLD5BHGlVHXf6rI5UQ9F2A+4Q8plaE1WHFW/zSgHfJ4PTk+CUpcHBVBIX9/8hBbbHIk9DO11p4UxYzyyjDaiy/xmYHWAFXYwhTA6DlPoK/bO3AShqvy7cL1irT6Mk60+iU8LzzFNz0i8Ya15tW4aO9ICzU3ncx17IoBJtVbmGm1S4G1BynOxkwqAqDVRBZLApn2uu2a79zwiXztFWls80j4pfJfIV/M1k7wlyHtupehc2Ms92PyYt3//8z0rnkFwiTA47fhNnhcUR6TMn5RpY6x9FkWueus= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(376002)(136003)(39860400002)(346002)(366004)(396003)(451199018)(5660300002)(83380400001)(186003)(478600001)(71200400001)(6506007)(26005)(7696005)(53546011)(9686003)(66946007)(921005)(38070700005)(66476007)(8676002)(33656002)(66556008)(76116006)(66446008)(55016003)(64756008)(52536014)(8936002)(4326008)(41300700001)(86362001)(54906003)(110136005)(316002)(38100700002)(82960400001)(122000001)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?Q+U1mVAVS+N01Nvv6kjyBThhckj47se0z65Turx1Lo32RJiOCz/zntaRmt?= =?iso-8859-1?Q?igkcx7fseAoVUpqUFofSUFsbXV0PNqM1i7ZBi/cSWQLYzdVAKUouBzp5Rg?= =?iso-8859-1?Q?Vbi4Qf37Jht8uKYCPzw29ip8TRys3EklwbcIcXKalcDacjXzaHIZl6NO8u?= =?iso-8859-1?Q?Ht/E8VENSt9nnZI+Hx3ig7YOZCv1/90/Dbr9lZpVtTrSj/2TjIZyblIeDk?= =?iso-8859-1?Q?6LPUlzw0Bel/3eWoajAtIX83QYbC16zZ7whK8qv3Z7k2ZNKYj8SGNAs3WU?= =?iso-8859-1?Q?bjEvqFFO4jatgNTPZnvup+ZvISZv7dQRxiNpTd8KSjm3iXxD8C4E/m75rq?= =?iso-8859-1?Q?Tcupo1umU6dh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?iso-8859-1?Q?kS8BDIvkph/S2ytSkbY+1n5hnw2230bJNC3Tbuz7ilX+BeChAppai4T97Y?= =?iso-8859-1?Q?1gkWv6smJAd/v84r93HBrunsBkgc98+qFHtr1mld7MJS7pFjO+1M0w67er?= =?iso-8859-1?Q?RKFzcwN8OFO7OmlpSN+plQN6UBFX/33CqwPSVnn66HqKrgBYK0heaUZLgA?= =?iso-8859-1?Q?DmjTfj6cgwFe5O+5ARpEQwm9hKyahVqjAFOgljS963pa12iNMBYFF8DjZv?= =?iso-8859-1?Q?LXWsWWWQl1YTg3JvjawdeNVW84oYDZGZLkyPFEpxybxdYbn8N6yappnBNv?= =?iso-8859-1?Q?lIsm2OOsBH+og4NWZftGxzGmX/ZUz5AeeOL/DPKR7nyAo2Q7j9FPfSMsVT?= =?iso-8859-1?Q?4rHyIEZIRnO9myCSperGJvucb4Ev7m1SJo?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29d73dbe-0e63-4a3d-3c02-08db238f7738 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2023 06:52:09.0058 (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: zykQ1op4vLp5Cy/7FwNcfn3+T2XuNbewNwxX9i7jtLlkNhNKHQQ0XX9hBt3YGmqD0dp57si3NnDbmMwgo3kcug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4814 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 > -----Original Message----- > From: Morten Br=F8rup > Sent: Wednesday, March 8, 2023 4:26 AM > To: Kamalakshitha Aligeri ; Zhang, Yuying > ; Xing, Beilei ; Rong, Ley= i > ; ruifeng.wang@arm.com; feifei.wang2@arm.com > Cc: nd@arm.com; dev@dpdk.org > Subject: RE: [PATCH] net/i40e: avx512 fast-free path bug fix >=20 > > From: Kamalakshitha Aligeri [mailto:kamalakshitha.aligeri@arm.com] > > Sent: Tuesday, 7 March 2023 20.32 > > > > In i40e_tx_free_bufs_avx512 fast-free path, when cache is NULL, non > > fast-free path is being executed. Fixed the bug by calling > > rte_mempool_generic_put API that handles the cache=3D=3DNULL case. > > > > Fixes: 5171b4ee6b6b ("net/i40e: optimize Tx by using AVX512") > > Cc: leyi.rong@intel.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Kamalakshitha Aligeri > > Reviewed-by: Ruifeng Wang > > Reviewed-by: Feifei Wang > > --- > > .mailmap | 1 + > > drivers/net/i40e/i40e_rxtx_vec_avx512.c | 12 ++++-------- > > 2 files changed, 5 insertions(+), 8 deletions(-) > > > > diff --git a/.mailmap b/.mailmap > > index a9f4f28fba..2581d0efe7 100644 > > --- a/.mailmap > > +++ b/.mailmap > > @@ -677,6 +677,7 @@ Kai Ji Kaiwen Deng > > Kalesh AP > > > > Kamalakannan R > > +Kamalakshitha Aligeri > > Kamil Bednarczyk Kamil Chalupnik > > Kamil Rytarowski > > > > diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c > > b/drivers/net/i40e/i40e_rxtx_vec_avx512.c > > index d3c7bfd121..ad0893324d 100644 > > --- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c > > +++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c > > @@ -783,16 +783,13 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue > > *txq) > > struct rte_mempool_cache *cache =3D > > rte_mempool_default_cache(mp, > > rte_lcore_id()); > > > > - if (!cache || cache->len =3D=3D 0) > > - goto normal; > > - > > - cache_objs =3D &cache->objs[cache->len]; > > - > > - if (n > RTE_MEMPOOL_CACHE_MAX_SIZE) { > > - rte_mempool_ops_enqueue_bulk(mp, (void *)txep, > n); > > + if (!cache || n > RTE_MEMPOOL_CACHE_MAX_SIZE) { > > + rte_mempool_generic_put(mp, (void *)txep, n, > cache); > > goto done; > > } > > > > + cache_objs =3D &cache->objs[cache->len]; > > + > > /* The cache follows the following algorithm > > * 1. Add the objects to the cache > > * 2. Anything greater than the cache min value (if it > > @@ -824,7 +821,6 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue > *txq) > > goto done; > > } > > > > -normal: > > m =3D rte_pktmbuf_prefree_seg(txep[0].mbuf); > > if (likely(m)) { > > free[0] =3D m; > > -- > > 2.25.1 > > >=20 > An improvement of the copy-paste code we are aiming to replace by proper > use of the mempool API. >=20 > But still an improvement. >=20 > Acked-by: Morten Br=F8rup Applied to dpdk-next-net-intel. Thanks Qi