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 463F0A0C4E; Tue, 2 Nov 2021 09:09:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0AF214069F; Tue, 2 Nov 2021 09:09:22 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2057.outbound.protection.outlook.com [40.107.96.57]) by mails.dpdk.org (Postfix) with ESMTP id 44FFC4068F; Tue, 2 Nov 2021 09:09:21 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dtMzWCyoXb4KouO4/mixGL6qXowepuxqQkgYUS+Idnvc5DC4X5hneZrhv77MvgAuCS6lCGWVvnj0l282qquH64uLIXno2SDqyiWPYffFM9dOevvBQ7pMwYHZsrUujLQX2k5bZfyUf7VvZ1xC5+JHFl0x0pIWdIIE2pz5+XWQTE+1Mfnn5eBHaJaY3fIeFn1WFExJ18YYw+TfoJAper5RKjxHpPXEmBMbBw5YLtwiJVRywKgLXSpWVVe576eZHsOOXkbgWrJvtQNpQmPdhE86bH1jB1y6hIEnJ1oNyPp/JoCw9fyLEmmpGkCLURDrzLA5idin1pmVOj2IZZ05CCPmqg== 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=EkhDiSUGJVNVZYG8pNjX51/XA2H0SXkqHm2c1fCwlBs=; b=GOdEQ3egvq79q0k/zOfqJmmvQDHKnBZ28TWHl1AGZuqyjZ9EMG0JJhDuqYI0C2fKO9xFpRUF6q7Qp3hl/4zSIPWvQ0fAzO4ALwj6weQD0jNZoXeAMfQxh1nPufHg39iCJc5k8tglZEneyk+kWirnjQUQGopo3XKdZXzLjEezmzly1VDT7bmS9uvEWv1TYU0Q8DKVmc2l4psjHPexAJ5Ei3oJZ0kgHHvumGrUvRhm6KekT6CRqdJxtamhBMkU6dNSiPw9jIOeSx/U8ZjpmPc3y5DCBQS8qFzM3jB1scLCLPRgNKN4CKxgyoC8TzlTONUsGoy/gRxAWNiAGWCASXT9LA== 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=EkhDiSUGJVNVZYG8pNjX51/XA2H0SXkqHm2c1fCwlBs=; b=JkL0G2uU+J6fe8AY6D94ia7Oskuv7LdieljC8FsalPAqNiM3hYpNq0jpoZA9VVXfkgx0sKhsakm2PKmLVgu9h1I+kPoOBPu6awEM4chrfn32nn1awlNWfH01tyEp8292a/oEURyJMsUNA4tWT2HkLdP23mP8UhsMRKTWpSXv8V1e+a1kh5V1XYVc869y7wt1hwgVcWOru6MrsCwVnGDgmuEBaHqlzxTHLK68VgWIAt+XmuOT9Us5yG3AVgLkBDuSeRe50v2AsRHmEq37AUHr5/cfSDeQRqsmY5xbFb/D0NnsPEBo2qOE7xK0jfEmPqKkS2uMU5bo88V4Iwv9NwkvEQ== Received: from DM4PR12MB5312.namprd12.prod.outlook.com (2603:10b6:5:39d::20) by DM6PR12MB5565.namprd12.prod.outlook.com (2603:10b6:5:1b6::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Tue, 2 Nov 2021 08:09:19 +0000 Received: from DM4PR12MB5312.namprd12.prod.outlook.com ([fe80::a4bc:7da3:32e5:1665]) by DM4PR12MB5312.namprd12.prod.outlook.com ([fe80::a4bc:7da3:32e5:1665%9]) with mapi id 15.20.4649.019; Tue, 2 Nov 2021 08:09:19 +0000 From: Raslan Darawsheh To: "Jiawei(Jonny) Wang" , Matan Azrad , Ori Kam , Slava Ovsiienko , NBU-Contact-Thomas Monjalon , Suanming Mou CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH 1/2] net/mlx5: fix age action pool protection Thread-Index: AQHXzuoaCa7kBPo4Lk6L0JUwKdB6uqvv4+cA Date: Tue, 2 Nov 2021 08:09:19 +0000 Message-ID: References: <20211101063040.25303-1-jiaweiw@nvidia.com> In-Reply-To: <20211101063040.25303-1-jiaweiw@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1e5668ac-9620-4acb-95bc-08d99dd81273 x-ms-traffictypediagnostic: DM6PR12MB5565: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /MxK4osw6OhMcRrAIPqnSfn3WFWZcCnvqX6I1YtniTP6Dm1LHwMaCvDFKT0GDCZdxrYM+9vErdAd2Ah3D/uh+L7k+zxWFVy3HYPMSh2HBRDInJZS+jbhAXjbT7cqTB9+6TORK4rlZUgzWLjxzYnWG31rn2vEf9tuTkRQdPZzoUdvkA/vfbL3H8ttD8o373LAmJxhpVTLNZWan2xfblhv9cMZv4Qgfp/RoqF4Isk6LehbZgK0gMqWLjgLDKicd8liFlxtscADmLoR08GaEjSJjI6Sr37O221pDd9fxOtdy6oAQIo07j6yl/wnOi1b/5pB96lLv4GEJMxhj8SCqIqWkHoaN+hdY61uw3Dg58PZAzTkJ2xvK9VoUfy01Coe9hS7g/0n5G1/S/iF3Q0vqrRsr6djh26urbyDdOV/KKAtmJdLswKTwIKsRm4Luo6jL/Oh+iABkzFGsJZo8xhjDz+4/IcSwVDyZNmHFpUUlGTzJUhTCqCyAKCa0GV7/x5bZuJV7lRRREeGrTHSwFk8DwfhEM72CIUYaK1EdQ4el9lcH2W3kdCymcTKu+Q2dGyJMis9Ht0p8t/aGVdl4tS0A069jOU3+9Rajs2Vy6gNe2fbca21yyWEkP0iI9c9KWj/t9W6BcoKwYG523MuQbOoJiuJWn+w4w3VVuvKy5JvSa0v7OkfxK7XQ1myBHmEV9Wv+hU4X6T4u0EhskrdqkX1zJ63RA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5312.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(9686003)(52536014)(64756008)(33656002)(4326008)(55016002)(38070700005)(76116006)(186003)(26005)(71200400001)(66476007)(66446008)(66556008)(66946007)(86362001)(7696005)(508600001)(38100700002)(122000001)(6636002)(83380400001)(53546011)(6506007)(8936002)(54906003)(2906002)(316002)(5660300002)(110136005)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?JntdQaphR7lLz10K7jDO9NGgTDuhNMNk9OoYoBEk8PX4yDb9/4WtSxThZeko?= =?us-ascii?Q?l7urmRbZmXVpmevb3D1JomTCcxH2LpvbPF34VEA6fObKKiEWaps8Y7HRKHO9?= =?us-ascii?Q?IFIHCN/Sm/x/QN0KBZbsfj2gt746V3LFcFsG394W1cKoiWc0Q7paBAOmMWGi?= =?us-ascii?Q?qMeQTW8E8V9pPIos+jCGe8gIOopBC/wKA7yvr877T7pcuKkFsqlzQp+jla+w?= =?us-ascii?Q?4DBl/KIPH+8gxCaLYWz3EfH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= =?us-ascii?Q?/yRpqWJQNiRWL3OK2RDeN24sIxRz32KQSlJDaCOKJgIiVzGsx1IuB+DDnsXR?= =?us-ascii?Q?SPV3RguxI7gDCnu+GMHzOo84QfBYG8Hoz0WOoP+rS3w+NUzV65jzHHhwUVhD?= =?us-ascii?Q?3e/Fx6JKv7qijstKf3emh232+Ac8zCYPZ5Hw6LFrtEa6l53BXO9jeKAuss7X?= =?us-ascii?Q?yuerH02lafGkxSn0XngeZGXbisPDL0vZS7HBYaPgTNY5rShvI2yBsepuSMvj?= =?us-ascii?Q?xxrmXfeZSAbbvboC8ll++5yza3fJov7XqTpIwoob1CeErSb2LJEjBV9u/DQi?= =?us-ascii?Q?bciwk2m2A2d7V0uUbiWUOznW60bEooY2HJwWjO9vMfD0ayTp993p34jSpcu4?= =?us-ascii?Q?MDA2MaR+tRyDvK/aMtldSaG8nRMS52TpzZWltA0by0/Z4pzuW/FWz9uoeGuf?= =?us-ascii?Q?5sL6Bt/zgE2JrLIcho7f4q6h6CzwRdQ+/xtOnDAfm01UC1kc2mkBGQ1cqzkI?= =?us-ascii?Q?By/NXjF0SK/QV+aTkZSvWAw=3D?= 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: DM4PR12MB5312.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1e5668ac-9620-4acb-95bc-08d99dd81273 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2021 08:09:19.6930 (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: ZOz/oInMjsxiQ7ZWLSiQBauE2Br0/eVFD/xEwymAuIJbWeJ8sTXLhhRNft6zuTjjCAbB+UWIbZ/0Ocs3LU6vkQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB5565 Subject: Re: [dpdk-dev] [PATCH 1/2] net/mlx5: fix age action pool protection 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 Sender: "dev" Hi, > -----Original Message----- > From: Jiawei(Jonny) Wang > Sent: Monday, November 1, 2021 8:31 AM > To: Matan Azrad ; Ori Kam ; Slava > Ovsiienko ; NBU-Contact-Thomas Monjalon > ; Suanming Mou > Cc: dev@dpdk.org; Raslan Darawsheh ; > stable@dpdk.org > Subject: [PATCH 1/2] net/mlx5: fix age action pool protection >=20 > The age action with flows creation could be supported on the multiple > threads. The age pools were created to manage the age resources, if > there is no room in the current pool then resize the age pool to the new > pool size and free the old one. >=20 > There's a race condition while one thread resizes the age pool and the > old pool resource be freed, and another thread query the age action > value of the old pool so the queried value is invalid. >=20 > This patch uses the read-write lock to protect the pool resource while > resizing and query. >=20 > Fixes: a5835d530f00 ("net/mlx5: optimize Rx queue match") > Cc: stable@dpdk.org >=20 > Signed-off-by: Jiawei Wang > Acked-by: Matan Azrad Series applied to next-net-mlx, Kindest regards, Raslan Darawsheh