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 D0A07A04FD; Mon, 23 May 2022 20:15:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C3C94067B; Mon, 23 May 2022 20:15:59 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 9BFA340156 for ; Mon, 23 May 2022 20:15:57 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24NBlt85030090; Mon, 23 May 2022 11:15:56 -0700 Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3g6wepfa8t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 May 2022 11:15:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F7yQWbcR1dTUbqfIlAAfYMJNKAc0ksjwrUUMi41vhOSo8U8f4UoqNoW8xEgjbmVmximeXwGXeXdL8BDeqwMOW3I6HB6aPmsyOWCQy81HnYg1j+05lCkTygB2otEBBo7AO5GMht8yvVsTqMK+zSdGr1Sr5Pifc4FfTQUF3quMAcB1l3eKY9TG2tHAxZIaNptCzHUnomIM5/suLkidn4LT6oXgeHIADKOHoamtV9U8nVeOWY6Dx4ZFWLSNr4vwzUl/1Bc5wm4V4Qrrgm3gL0OdUDNj5dvTaA+8z+tjzMLqqunSGk6YIx6wz03+yH99DTc5ah7VMxHIUkZZOdsxNslctA== 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=JyNK+RHOYTpp3PL089dWGjvWl4aR6a2pZV67xPYWncw=; b=BtxYbxAixlLLiy2SZVfX+7z0WlwQ01z2rz1+B5VFjGMpwWfCehlHdWn0rVBDlvtY/5ZTkh+4lCds1VUJVrhaj8unAEo3gMvRwE+9tlOq8p1jmJvIFd4I9Uz9OWHiGA8H+VOy/JBdSI+TvyfqMLTgmOlb4RL6MGWsSk8yGhiXzQVS8facuNOKLf0ZxUDBVlxt70/yhwYQDX6UYPRVzssKs0BwkEaj+nSfHbJykp4U7lvqhDEjXWkzG1SZo1lIGdNpab9Y3M9AGTIx/LYUWhKIMyF1CBWlxkk4duxkbBF1PD1lPnf//4NJfjlMFg/2ZTiGvL1WatLfDjNMGRS0iaMVOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JyNK+RHOYTpp3PL089dWGjvWl4aR6a2pZV67xPYWncw=; b=Mu5SqAnyKF54MsP0/AzN0Jq3R7gruBTE4yF26OMU5ibE1OsJkm+7rsXSmT2ZUjWioKJnLNsokR1HtqiSSxXrLLqAu35RgjUjCVahRXLNnfpJg+FdDKqikGCoGvG4rePzgf1YHsyPxDPbXzmA+RYJT1DqDxvPX9sa05FkabQhwsI= Received: from CO1PR18MB4540.namprd18.prod.outlook.com (2603:10b6:303:ff::13) by DM6PR18MB3339.namprd18.prod.outlook.com (2603:10b6:5:1ca::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.22; Mon, 23 May 2022 18:15:54 +0000 Received: from CO1PR18MB4540.namprd18.prod.outlook.com ([fe80::18da:75dd:5933:62b4]) by CO1PR18MB4540.namprd18.prod.outlook.com ([fe80::18da:75dd:5933:62b4%7]) with mapi id 15.20.5273.023; Mon, 23 May 2022 18:15:53 +0000 From: Ashwin Sekhar Thalakalath Kottilveetil To: Ashwin Sekhar Thalakalath Kottilveetil , "dev@dpdk.org" , "thomas@monjalon.net" CC: Jerin Jacob Kollanukkaran , Sunil Kumar Kori , Satha Koteswara Rao Kottidi , Pavan Nikhilesh Bhagavatula , Kiran Kumar Kokkilagadda , Satheesh Paul Antonysamy , Anoob Joseph , Akhil Goyal , Nithin Kumar Dabilpuram , Harman Kalra Subject: RE: [PATCH] mempool/cnxk: avoid batch op free for empty mempools Thread-Topic: [PATCH] mempool/cnxk: avoid batch op free for empty mempools Thread-Index: AQHYWuZNe2cpZQzw00G+KQzMTQF3Pq0s7B/w Date: Mon, 23 May 2022 18:15:53 +0000 Message-ID: References: <20220428095935.3612387-1-asekhar@marvell.com> In-Reply-To: <20220428095935.3612387-1-asekhar@marvell.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 54fd4af0-d677-48a4-c09c-08da3ce8465f x-ms-traffictypediagnostic: DM6PR18MB3339:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FNToivPMoYEX1gS+VEj1ix3OEH2kH/E36ROBHHE98eHvQPyUU3LoiYobAD8GyHbHPLS016mOhitqC5VweZ3hY/PyeBOf7hz5FM8MVn++Z4Z2iOOkV3ehVtRbgC1Qj0CctwjJXnuOGiE3sHfKog3aoR6EMP5Bk61803kGbIa2FDWgf+0zqnl9uE1HQjd1D2he63y0m8VZUwAo9YJW0Z7dn098/nbr6DJ7bRpP6WVsTEMFoiVZByIsKUjZyjOiDrrcCmsh5BRgHVKOsje8UVpd9Gum67i0aE0XevrLXGt+8B1PutesWwQ1BIuFwn8Ncg6aIO64NndCUAL3yWcv93aP+FXoa0Xugq6PDsYkNStIAF35tgW5m/pYp1TK5JpzeoC8RQetuZ+sLPfvrhR0279sEfeOfXpAgauX0SlQso5yPdVoRhYUQyh4vbVozQiAEkBLoNb3f+Yr876GfieaCEm/Nuie/n+NOv9hpKpfctBUFWsugcEbuQI7Y7JXl9Z8fvFcWTwrusddXZiijLPfCUujqgYb4SKnoMvMrfeUMgdpCWQGgURVLoQV6kdJMd8VUTDfk6D2oGVXbk8OhAlXDjQnfSYZSDkYmOELlp7b+DTv7EBvH2yTUsEg+jHY0dgQ+/uOzQFg1IBuo8mFfDc3poUt9MnysumKqaTTeT+3xEKma1q5ksiEpu6rCmtEKcnHxt6auKChBhspQQ2GGnRpr+JKOw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR18MB4540.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(2906002)(26005)(71200400001)(7696005)(66556008)(66446008)(66476007)(64756008)(8676002)(4326008)(76116006)(66946007)(5660300002)(186003)(107886003)(86362001)(508600001)(33656002)(6506007)(53546011)(52536014)(9686003)(83380400001)(110136005)(122000001)(55016003)(38070700005)(38100700002)(8936002)(316002)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Dxf2fnzqGErn8qu6n19NPKq3Srf0tm07tpLAWyMmagAh4aQdirP9+uGAK/r9?= =?us-ascii?Q?QY3pLIbNgGEVaMKx2f8T/LXNkT4bkWdbAwWCD+JZe9/ymKD84FgjB9aM8n3D?= =?us-ascii?Q?Pp/JjUfNQjE2WQyskPAF3pGD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us-ascii?Q?LiU9XvZQrmggGBEy4yGI6omrye7BnHjeu8qznamP0nrLvxXgukn1mgtdoFnX?= =?us-ascii?Q?0LB1xUlOLGQx4w1YruPUs83QaCzE9gpWdFw3X7p2HuP/gjw1MWsvQFFGloB/?= =?us-ascii?Q?gNuwsnWnK4zVMSXiNN5u/U++qtfNZgISg/boGWu5P5x+38bgrq3YFYEvMlSm?= =?us-ascii?Q?3nyJRUpX9E3F6ah9Ef6bT6NVEONJ0BajX23rYfs3CZLIgzVZJ7PK2lg2IoAD?= =?us-ascii?Q?6TxrsmAMWh+19CsGeoeP/+a9Fi3aivuK8SXsEYW9fszVHVcXNb02e8gMGeN8?= =?us-ascii?Q?XFlJSCAuwlVzq0jk4r5omV/7x70WuHYbhGs6p0EfKVY0LX82/O8TBw9bYVbf?= =?us-ascii?Q?l2X0rZ1obSXvuQt7lrPoGB5SyHYqNzML7xLlTi5TrEXo23zfDw53JV879Pgy?= =?us-ascii?Q?WdP+TDbXpzdqhEFQcD2sChmLZb3k7IkeQE0TCDH+FE8a1IaK0LxLg2kC/t+V?= =?us-ascii?Q?6cOUaZxcQX7Zde4SUiuRdOtuJCpfXsfTpJZHbYRmO1qjj90cme9wIPL4SE51?= =?us-ascii?Q?QF/ytMpt1e50x3+Ld56O35Owyqdqxb9X/67o/hzh2Kitplqcg1WHvo4++fJ1?= =?us-ascii?Q?42pQZVbGKrqad6xbnXiul8s4B13lIg2V8yxT44XJK7yaSViWglLgu40HuWhA?= =?us-ascii?Q?6f98PQKoFfSzvc7p39xsk9VSoSdghJ4i20oyig0uOxz9sDBu3BMBfSvL5EM7?= =?us-ascii?Q?tZMsSxMj5A=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR18MB4540.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54fd4af0-d677-48a4-c09c-08da3ce8465f X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2022 18:15:53.6637 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VSvho40Xum1MlTiJ1WrDRU8dVCcBmN6P6HzYl4ZoYL5VL9waXGgJdo7L7hQc7rY2akkflJbm0qkDjUb60VQ8zA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR18MB3339 X-Proofpoint-GUID: iADpOBXUm9epGBIwRury57AuZlrvhGN3 X-Proofpoint-ORIG-GUID: iADpOBXUm9epGBIwRury57AuZlrvhGN3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-23_07,2022-05-23_01,2022-02-23_01 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 PING. Ashwin Sekhar T K=20 > -----Original Message----- > From: Ashwin Sekhar T K > Sent: Thursday, April 28, 2022 3:30 PM > To: dev@dpdk.org > Cc: Jerin Jacob Kollanukkaran ; Sunil Kumar Kori > ; Satha Koteswara Rao Kottidi > ; Pavan Nikhilesh Bhagavatula > ; Kiran Kumar Kokkilagadda > ; Satheesh Paul Antonysamy > ; Ashwin Sekhar Thalakalath Kottilveetil > ; Anoob Joseph ; Akhil > Goyal ; Nithin Kumar Dabilpuram > ; Harman Kalra > Subject: [PATCH] mempool/cnxk: avoid batch op free for empty mempools >=20 > Batch op data is initialized inside mempool alloc. But in case of empty > mempools, the alloc function is not called and hence the initialization o= f batch > op data is also not done. So ensure the validity of batch op data inside > mempool free. >=20 > Signed-off-by: Ashwin Sekhar T K > --- > drivers/mempool/cnxk/cn10k_mempool_ops.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/drivers/mempool/cnxk/cn10k_mempool_ops.c > b/drivers/mempool/cnxk/cn10k_mempool_ops.c > index 6ebbf91de5..a02e01cea0 100644 > --- a/drivers/mempool/cnxk/cn10k_mempool_ops.c > +++ b/drivers/mempool/cnxk/cn10k_mempool_ops.c > @@ -109,6 +109,12 @@ batch_op_fini(struct rte_mempool *mp) > int i; >=20 > op_data =3D batch_op_data_get(mp->pool_id); > + if (!op_data) { > + /* Batch op data can be uninitialized in case of empty > + * mempools. > + */ > + return; > + } >=20 > rte_wmb(); > for (i =3D 0; i < RTE_MAX_LCORE; i++) { > -- > 2.32.0