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 8A10AA0C4B; Tue, 23 Nov 2021 21:35:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 73AB24115C; Tue, 23 Nov 2021 21:35:29 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam08on2086.outbound.protection.outlook.com [40.107.101.86]) by mails.dpdk.org (Postfix) with ESMTP id C3DDE40688; Tue, 23 Nov 2021 21:35:27 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fah+2WCPCKb9HP7SWMRcpv3pppBcWbZ0/iA19Ns8tDDixiyiT7waJWE/NprC0Hxd/hFepPO3DbyWzBCLnOV/d/+qYm2u6aASJ2Z2y7AIeSTx48kxusNRMD+WkzbNC8TbDqoZQzy57IUzE90COGLTV2J+9JFwdyaIEZ65y2X97YK+z3WbnnWhGt4BjzqJvO3cYoNhKfWbC6ymR9Nui4ZLQvPxALfUa1RutBvo0ENI0DaDMvSmf3JJGfEdeN7iipCq8/t6WYzx5rQyibqlrNaUnrG78/vIt49DLbKmZRanEzQQNW4ZNV8eio21c/ZyNZCTCLTw+7kz6H2iD3OVQY7ExA== 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=u5ylQLLM4sATnXCerEivlIQQSSVDPxExF1Vs0NgdY2I=; b=lUok6HOHkJ3M4HN1D97e2vkBjoviDH1UeGoKjEQ+It1KHndfBkklDfeexLxRavRXAqArc4KxkC4Ndk1JM75WgNwe1w63n0NjlG4fk1JmCDFHuEZtTtNzlND5wCQ4mPBw5CdxXtKrbKO2JBLEf8H6STS+S/d+5QRHxIP0rjTu+QYklF9VCL4f9uwCjuDRbm2Z9vEh3lmnzN2/3jXRD4A4EqwI9MVj7lkULdREtJc3AuO37i0yjr6hBcfV8BQuFZA0cCTz3ogCPI/wviNKaNTLhQIIuEVL77uVMqYDh+8UB0BuxSgL6T+C/+EwHj23x8FV7BQse1jEzKmrzYunyOAReg== 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=u5ylQLLM4sATnXCerEivlIQQSSVDPxExF1Vs0NgdY2I=; b=jHWILVlUQvhoeJglkci6xY5KSyE9VXeIn2ZRrsoAQFIz9kZpzUWUw2vsfAGnuvgqlyT+AETWOCgDJhV1DWsfkhCjSu3Ry1YCUP+sktb4IrHDdbxLDdMVn4x59OwGtCuqIRPOupiKqrDQbTasN3La+6snb2KOyNpwgglCuPoi0X6NLURuAEe+aR9foMOUET+X+gMQjp7A2qi81Kz24P2p4ygrZqsipHG1+81LY3MScNeW0ckeNoEThKnMt+eqca2KdXZf3hWIre5xBBvYwqv7UURx2pzjRO4VKV8N3gFJRci/kDSe9R4Xaii9XwPjpnO8MDdfzJ11fS2OPexNyVL43g== Received: from DM4PR12MB5312.namprd12.prod.outlook.com (2603:10b6:5:39d::20) by DM4PR12MB5088.namprd12.prod.outlook.com (2603:10b6:5:38b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.22; Tue, 23 Nov 2021 20:35:26 +0000 Received: from DM4PR12MB5312.namprd12.prod.outlook.com ([fe80::7cf5:9d34:fc6b:b4a4]) by DM4PR12MB5312.namprd12.prod.outlook.com ([fe80::7cf5:9d34:fc6b:b4a4%9]) with mapi id 15.20.4713.019; Tue, 23 Nov 2021 20:35:26 +0000 From: Raslan Darawsheh To: Dariusz Sosnowski , Matan Azrad , Slava Ovsiienko , Dmitry Kozlyuk CC: "dev@dpdk.org" , "stable@dpdk.org" Subject: RE: [PATCH v4] net/mlx5: fix refcount on detached indirect action Thread-Topic: [PATCH v4] net/mlx5: fix refcount on detached indirect action Thread-Index: AQHX4IA6hQ8Fr0v0jU2ZYI/RDfP0SKwRkidw Date: Tue, 23 Nov 2021 20:35:26 +0000 Message-ID: References: <20211122170949.81466-1-dsosnowski@nvidia.com> <20211123153805.192398-1-dsosnowski@nvidia.com> In-Reply-To: <20211123153805.192398-1-dsosnowski@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: d8a93cb0-c452-4f8b-aa90-08d9aec0c832 x-ms-traffictypediagnostic: DM4PR12MB5088: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:288; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: n5WG0UlRLk7F/4kffKQKm1l7LYeWdGcKlXub4w1eRHTPma2VYQNEhazkvVBRn/V9omZMw4c/79HmAF6mOlY8MH8oC/FSUHHu+dwgfiDN/dZD7vx4o1mLpI6MWVWOf7/b/A3D9vwcbHmOvkImsQ5o3MgEabVpsqBE7dQ9sVSM0raJhNCscBn2fcuALITxcwf/JmiGTBVRloNySV58MBJFb5IxSAwE96uJXhAOkNwe5tPGkXs1C3SFhH8uV6FFevgOGu+Rx+6VrIiPI30Ng1c6vL6H6rBcz+zK3bqEjV0a/18x1BLNGM14EM/FfxM8bTx/HsUKQwobP09fDI02ZFtV/coiWpC8iksgRZp0r+0BOspNJYqOZzk7z4vdz9b57TFkLq8EgPGqcEqmMIpA4S2Hys/qcKM9SX2dznXMhujyuKiYDNXm0SInDBdm83ebuyXlPrFM2jNYpefdUEs4jOoRkVWoTmSWO2JG/uL+9cf3xdD0EW2bp9MT/JbogHgqfYUvtL5P/taUWQ9jcepBSVj3vG0vwsq79PfAYkDITNCEIFbC9OUOtvKYKWR3SpgHH/LsfNuNmg/a8dwj5qjKaDbaTIu+XGIpMVqmsLsU+aG4qwJFY7ETbrlz7kE8eYiYUczEcVB9JweuKWnKjkptkqWaaU3yduNAJIyHcEtp3sOKBnDqHBDfx/+GFPvepyKYlQ+6b4osJnDcW8bMMUKt9smlxQ== 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)(52536014)(8936002)(508600001)(38100700002)(5660300002)(110136005)(54906003)(66946007)(83380400001)(7696005)(8676002)(9686003)(6506007)(2906002)(53546011)(186003)(6636002)(71200400001)(66556008)(316002)(64756008)(4326008)(33656002)(26005)(86362001)(450100002)(55016003)(66446008)(66476007)(38070700005)(76116006)(122000001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?TyQmgwT049Tb8Xe07mLVD+kRqRA6NAq7NsShqkANjMy7WOIVj/ODlozdXIuq?= =?us-ascii?Q?xQQkTG226CuLbicwBUYCCQ8V9FRDXTErBiVQl/k28IBC/XLhRn1Djahlnx39?= =?us-ascii?Q?xUkbmRZGAjvzJ4B+K3FzD7FlXMlfgioofns8F/PAR4gkLrBqG5P03z570r8b?= =?us-ascii?Q?yRFZv4HcpOtYTM1P/j8N5DM7UyiszOqIRrYvKXXBdTxrYEohdcCTAfVsSoUj?= =?us-ascii?Q?Gr0fgb6CJokxrOU+NQwM3a6205wwixE/A6lCHi5nueavDKVm9mT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vys1KSuWoS3s37KLnVnX/kAw?= =?us-ascii?Q?L+5+kX2lNV0fsnu4lAeOgBiG8YoSizxyOjCfikTgtwi1Am2QVJ3cILxWgmdS?= =?us-ascii?Q?t7EcRMMQDPNKMQIF1HxUjwJdTvn8AmGy7M/SDBR2qfoa750VaSWE6z5mA23c?= =?us-ascii?Q?qc19RFCvrE7PQBSfsva49jgWiA5eWOuSuuYxkIOHGMdEQeg+YhKkN+11Wjyl?= =?us-ascii?Q?LAyoOxtfLtGmRv7JrGBgC13c2oQR2JDLvrgdRmDltSHLkEj9OzrvmeoTng5h?= =?us-ascii?Q?YICw22hmx7P5eXBji1M6ZiTaPnzBkg6jRMA4YQMaCz9LUANkflhmRxpGjZew?= =?us-ascii?Q?AX44cWpvDR0uvom6p85vhQhHY/BY0NYBtLlBD7qivqHT6qc8pElEo0jIEfsk?= =?us-ascii?Q?JHW0RWdMxfMWcllhxpdHIvyUygOZtmzXuh9g2SVR8nbW+4r5PH/1rEGxii0a?= =?us-ascii?Q?5WccaY05KRr909BYo3KUzYs=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: d8a93cb0-c452-4f8b-aa90-08d9aec0c832 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Nov 2021 20:35:26.3760 (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: yVwzZojuGo7eERuiQAZQqZQ+jO7AIQqdQWE8PeZu0P8yvUDLwRWwP1t7XAVoCYoo+36XaSB1jYMgNUvP5d7tPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5088 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 Hi, > -----Original Message----- > From: Dariusz Sosnowski > Sent: Tuesday, November 23, 2021 5:38 PM > To: Matan Azrad ; Slava Ovsiienko > ; Dmitry Kozlyuk > Cc: dev@dpdk.org; Raslan Darawsheh ; > stable@dpdk.org > Subject: [PATCH v4] net/mlx5: fix refcount on detached indirect action >=20 > This patch fixes segfault which was triggered when port, with indirect ac= tions > created, was closed. Segfault was occurring only when > RTE_LIBRTE_MLX5_DEBUG was defined. It was caused by redundant > decrement of RX queues refcount: >=20 > - refcount was decremented when port was stopped and indirect actions > were detached from RX queues (port stop), > - refcount was decremented when indirect actions objects were destroyed > (port close or destroying of indirect action). >=20 > This patch fixes behavior. Dereferencing RX queues is done if and only if > indirect action is explicitly destroyed by the user or detached on port s= top. > Dereferencing RX queues on action destroy operation depends on an > argument to the wrapper of indirect action destroy operation, introduced = in > this patch. >=20 > Fixes: ec4e11d41d12 ("net/mlx5: preserve indirect actions on restart") > Cc: dkozlyuk@nvidia.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Dariusz Sosnowski > Acked-by: Matan Azrad > --- > v4: > * Simplify dev_started checking. > * Remove redundant passes of deref_rxqs argument. >=20 > v3: > * Fix handling action destroy in between port start and stop. > * Revert moving contents of mlx5_action_handle_destroy >=20 > v2: > * Introduce wrapper over action action destroy operation. > * Fix typos in commit message. >=20 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh