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 89065A0550 for ; Sun, 28 Aug 2022 20:34:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 830BD41140; Sun, 28 Aug 2022 20:34:51 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2059.outbound.protection.outlook.com [40.107.96.59]) by mails.dpdk.org (Postfix) with ESMTP id 56C2840696; Sun, 28 Aug 2022 20:34:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kx9JBfFYzOlSAk/IA6iuD2nkAvS08F2a4zl+6pZLZ9/Jjoyya3mUcwfVFiPsicLhewTmGRwPLXFRJhikhsoJ/cPW1jbxbjr9oBBSmya13fS0A6abFz2wReo5Elpv/ArQ4EqkRgpTgWsW5cvcjVHpaks2nGiMRayG5+98+V7k7A37iBImwY0UEmg0HAv8VhXksTKhiC/zZxPjEh5wn38DctVOtFMXBXHjOEbZRgqZ/8rwd021IUaZsrgIjE7ykEmoCrttRWh1CzVCH9uh7gkJhQHwOConN/cswbZhG8zqiKidXVDvgbxp4MxR9ggjmLfch5o8U0rfC7TflWH9u7PCug== 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=jnUIA79jhpeTCgjPtPwzD62EWIhNqrh7iYYDlXLa7cs=; b=OvZ8D2UYnZfQwYXIB2B5u+sZ+aI3pp5mQjDarUDHDg/y5Zz0+vvGI1yvnrsmMaZqMFPXw/rREbFl0jYyBVPDhKXBhwLZ7/Izi2fyMtxirkT+kReLdHVVjb2pYq4Lx4URaVFzWZ5+2Y+vtDD6ogxLUWDHqjop63IvRxuHRtSOnWCdXty+C0jDWtDGY8lAUorf4WCMrQBh7tMPiNkP2xaZlsElc11D2gAa87YNuxr9tSgytoIUFjF+i2h7kdwyvLGzCI/5hAbinMzpfgZih/tQNtNNZwLNb19+qVogOjNO6FnZreGYo5nFwwH+TD3qSIPByv27An001VLHAUQ9RI1mOA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jnUIA79jhpeTCgjPtPwzD62EWIhNqrh7iYYDlXLa7cs=; b=ckuk/ptpjgXpv1JZ/0qCC/cviUic75f2KiBhVOgTmdIDTfej8kC9rM5hiKNoYoitbOp1eR/kyNsViUczs02F4MzWMSVf0ytb64cir+qeQ2XQ+BEb3ELHZXYB6+EqZu5h+0k9cjL3JmzCjNEvXoyJeGyOmXZGWUydZSD4PKh0llFUwczK+0NtxkylGe62OcY1E2WCyNBmeRecSPxGjQYTMGEuMcdA6K1/BMNXSpVfZEIBseBTesT+oXSLK1EAz+Fs7JC3JRIFFfh2oJKwW/8BU5Ka6Ygahkf/kzvjjnrdOn+YikttLuZVBcAAIW9AsftEAFud7mxoafpe1cJG92ZSbg== Received: from DM6PR12MB3753.namprd12.prod.outlook.com (2603:10b6:5:1c7::18) by PH7PR12MB5656.namprd12.prod.outlook.com (2603:10b6:510:13b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Sun, 28 Aug 2022 18:34:47 +0000 Received: from DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::6024:e584:2770:7bf4]) by DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::6024:e584:2770:7bf4%5]) with mapi id 15.20.5566.021; Sun, 28 Aug 2022 18:34:47 +0000 From: Slava Ovsiienko To: Dmitry Kozlyuk , "dev@dpdk.org" CC: Matan Azrad , "stable@dpdk.org" Subject: RE: [PATCH 2/2] common/mlx5: fix multi-process mempool registration Thread-Topic: [PATCH 2/2] common/mlx5: fix multi-process mempool registration Thread-Index: AQHYqws/PKshTTWefEisgyo4pZiEPq3Ew4UA Date: Sun, 28 Aug 2022 18:34:47 +0000 Message-ID: References: <20220808094236.3395516-1-dkozlyuk@nvidia.com> <20220808094236.3395516-3-dkozlyuk@nvidia.com> In-Reply-To: <20220808094236.3395516-3-dkozlyuk@nvidia.com> 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=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7e875b5e-5a8b-4e92-610e-08da8923fc58 x-ms-traffictypediagnostic: PH7PR12MB5656:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: kaho/qAepBHYbM9FvSsQrYlhDJ5zdZ7FIEQclmOsjpYx8iz8qS8E0IbhhW3IkiXo+WExZRiLXaf6PS6VzH4yC2hBi0WwGxcgxKGk6kX5NFg4lk+7F4SfDpiUy6ftAEAtVCKKVTKQ6cgzSLigf+4MRsXalYDmayugw2ytd8Rxj/Cc+ZzVZNOiKkQ2SZGxTH+xy0SqXgxOtB2EdirleahMLcW7aTQbrYIknCIsvKzZ3enHE0oc2HwZ1qcHy2Gg4cZUDmFUoDG0nkHf0rSdkHrPgT1K934DeiHQPSMXvDGWP4YdLMZFr5x/43sImgEmckMrFa+nEYACXAhFojUTmntWJ4ROsHfOJw+eq5LzSQGjhqKKBSB5Ar/x0+VtVDDvJuhOy01BeX6ig1/k5Sq1M1VZiWGrYOOrc9Gn5N8zIfbfCEV5A6CDxQS3lLXzbP/pHY0nuFjYsJApO5Etg1033P9SsUb6Zim4cjQmwzcf8FlAlwwbYwQMQj1QC5DlFl1o7STvciTKS2setKUHq2uYT8eW6zY4zkIBSXvYhNsasX082gil6E8OIda3HzB6XMI/qAdeYlJUOW0SlhBZIWFXVj4wWfTY1E/SUYP7SIjFQTqKFnIB7MDwv1kWgf7L2ROoPFJg6EUoU/KPjdPzlx3zd54moUbFFN7Q2ndFphI4dvhkt5fWb+kqQLV7POU6T57XjMzDj+Ix2R4Bi3OxRLGtX22ClEMhayTROLVsDju3be6GbJ8SVwXtSKdtYdSXjIIvKd+r3w+tYoyZ1lLtfcSCLfhtiA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3753.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(376002)(136003)(39860400002)(396003)(346002)(366004)(86362001)(9686003)(7696005)(26005)(83380400001)(186003)(33656002)(2906002)(53546011)(6506007)(38070700005)(55016003)(38100700002)(54906003)(450100002)(71200400001)(8676002)(316002)(110136005)(122000001)(64756008)(52536014)(8936002)(478600001)(76116006)(4326008)(66446008)(66476007)(5660300002)(66946007)(66556008)(41300700001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?OyM45Fdj/60c6XWnVbz+MEeruVb3zDWvseQsFWcFf2rQ+wFY7DJTxC/xOUJ6?= =?us-ascii?Q?lH5zmiXAqxSGYR28CgP8Itu8Z3VdrS2C9yrXVx/8ByAws0sBdcDolo6lZMl/?= =?us-ascii?Q?dOMwrylr2G1HqGiWSVuaarThi1FK8C1bRBnNThwPutNlRGhNNW79jeg0xbqs?= =?us-ascii?Q?yqSK4vgP0DkegPMGfHhSxww7ae8eLhAxrrxtDoKM0jbS0NKpaFvRTtnukRVU?= =?us-ascii?Q?tGI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4ajfS5+ACnEDVsnT8?= =?us-ascii?Q?ZZXTv5/kj9TLv7HM27rJF+O2yVIEnQX2vSp+3dIWk8TzSK6rgKuuNavRXPbT?= =?us-ascii?Q?TSDcvywyho/bgCHQc8mBeSPnuRhytNiokyd0g7+ZtdgqBnY6cjgxSSC+fF+D?= =?us-ascii?Q?jndQdE7pTlXEy18TcJygFjEsKkclQ7VSPWmTwNxxVestg4dc/yONBShmlYgP?= =?us-ascii?Q?yqUKSTwAKPIoyA+GTMoK331CaYeBJDSH1mXm1lNC97QjiwzFcNQwnowOrim3?= =?us-ascii?Q?aiaWBvw/9o8uKSu4NG/wuEpOGBJu/9TpEgoikE4Wmrme1HbZI1ykd02xjaa1?= =?us-ascii?Q?NfvsclzTEoAvRgdsZeVfipogc+54QcEAgmOBhpuYtwr1Bv7Ead6ChCCpdfLQ?= =?us-ascii?Q?dzVcXrYIZeq3VmXE9Fr8Z0Dv9+ifaQ3+MthrFT20t+9+0OgYzXfEuLLMByMW?= =?us-ascii?Q?6TzDA3RxU6E5nzpGdnPxLnhQWytzmrmzp4BLTeE/?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3753.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e875b5e-5a8b-4e92-610e-08da8923fc58 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Aug 2022 18:34:47.6545 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3VqDl4a2PG4RgAFH1LrUFGpH7ROddUuctDWFkINKL9ayHYmiQGiRu6eVDjPn7iET7RTj15A3OqNIG3/WiM0UPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5656 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org > -----Original Message----- > From: Dmitry Kozlyuk > Sent: Monday, August 8, 2022 12:43 > To: dev@dpdk.org > Cc: Matan Azrad ; Slava Ovsiienko > ; stable@dpdk.org > Subject: [PATCH 2/2] common/mlx5: fix multi-process mempool registration >=20 > The `mp_cb_registered` flag shared between all processes was used to ensu= re > that for any IB device (MLX5 common device) mempool event callback was > registered only once and mempools that had been existing before the devic= e > start were traversed only once to register them. > Since mempool callback registrations have become process-private, callbac= k > registration must be done by every process. > The flag can no longer reflect the state for any single process. > Replace it with a registration counter to track when no more callbacks ar= e > registered for the device in any process. > It is sufficient to only register pre-existing mempools in the primary > process because it is the one that starts the device. >=20 > Fixes: 690b2a88c2f7 ("common/mlx5: add mempool registration facilities") > Cc: stable@dpdk.org >=20 > Signed-off-by: Dmitry Kozlyuk Acked-by: Viacheslav Ovsiienko