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 E7DF0A0C4C; Tue, 23 Nov 2021 14:26:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 094C041159; Tue, 23 Nov 2021 14:26:33 +0100 (CET) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam08on2049.outbound.protection.outlook.com [40.107.100.49]) by mails.dpdk.org (Postfix) with ESMTP id 1467B41145; Tue, 23 Nov 2021 14:26:31 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mebrC9NUJZAWtxaIfVhGQP+d3APOKreouaIIEdsgTPaDK6qnpqvBn9ABkkDSQEzElPv1NCnSTnwK199JXJBHNJprTn8HYr3iH1AVmwhGfehVz4ijhGAA10FmtFGAb7xcUTj+XXD4XVn92EdnDNftWJIa9YpONklE3R1NoWzTcmass+pfb9XcYhSMmZdEpzFprlGh0DmQjGIugBbOtI8sL1KRQ/iZJwnnYoFPtcFESVuJo68jMWy7Fs1uQ4AEjXz6QNIFyUR0jKm0hzJ3MAyyhfuP3jUew0NqKdVgvlP+lcgalBLvLqQd96KZhiBVZ3Z6GRU/BUCDxi0vWgFRPUTopQ== 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=g0qBUCr98Q8IHhHK8RrM2xSjCBAb83ljLs/+/oOeTDg=; b=g5J11RjXIEoBXVQCqcXOTA4wSw9zWhWywrYRSDOr7hJtEEBWQFCQwLxEPvVcAoKS313JDSVVpjgplCMEILx9bDWtOhnM0HVPyVlCccRWtqHpMMolxq7cKHs9J4jUKnPdbEkVgRi9ywF3Ae4nyk38yl3HizgjOEszfxKXY+IoXOUE8312ANBvWv0ivZOwEyHu8hyWOUVFJeinkWddGX8Rw5Sq9tngdnXMlbsIqLK97AaslFPLwiNH3LMNcA2i+uU0S2cYRMAzea6bn1RiAOB56gXKTmW3yBvM9p6N/YHJu5PPl3sl0nVDoa7Ac1HtNU5jPnXjuTcMx+QJYvK8BMbjPg== 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=g0qBUCr98Q8IHhHK8RrM2xSjCBAb83ljLs/+/oOeTDg=; b=qTPqAyPM4g/SOQm12tfrYIPC43HfLLC0ObclQNdvQSY7A0TqxXCHesZ9E3V3CtTyNUnrRbSzgQcfvqmsa3nM+wrJnBKUl54dnQhuBcwazc3Ca1Ha5OB670+uh8IUb1WY+LwdsdTSgRmZnUlvDMBFXh2OMQdDv1UGUpsq3ffiV5+923jLpIGPcdX+6LiUWgl70/JQCVc78X1RTxkkfGJ2upNlqFDikkFS/hViMzcjuNqKNaqjccj1TPg2F+8zpyFzfc4LZTaIYW4KsiEGC7uUbgJm2acDgVJWd/VCXT9G+kfpXbcpahr9dRLtadUhyJtQkyKVeFEjwtIXd2fVq8n0+g== Received: from DM6PR12MB3753.namprd12.prod.outlook.com (2603:10b6:5:1c7::18) by DM6PR12MB3945.namprd12.prod.outlook.com (2603:10b6:5:1c2::27) 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 13:26:29 +0000 Received: from DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::8dc4:eba4:b43b:7d59]) by DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::8dc4:eba4:b43b:7d59%5]) with mapi id 15.20.4713.025; Tue, 23 Nov 2021 13:26:29 +0000 From: Slava Ovsiienko To: Dariusz Sosnowski , Matan Azrad , Dmitry Kozlyuk CC: Raslan Darawsheh , "dev@dpdk.org" , "stable@dpdk.org" Subject: RE: [PATCH v3] net/mlx5: fix refcount on detached indirect action Thread-Topic: [PATCH v3] net/mlx5: fix refcount on detached indirect action Thread-Index: AQHX38PwaKQjVmjH1kKOx7z9OsBhzKwRG8qg Date: Tue, 23 Nov 2021 13:26:29 +0000 Message-ID: References: <20211122141708.61680-1-dsosnowski@nvidia.com> <20211122170949.81466-1-dsosnowski@nvidia.com> In-Reply-To: <20211122170949.81466-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: c474668f-7a07-462f-06d4-08d9ae84dba7 x-ms-traffictypediagnostic: DM6PR12MB3945: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2657; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pUfk1QcNx0qDQAQCd0JP7dMr6grn8tu/l8PKlmQFhQTnlXy/VTnaqhKSUYYCaMogcjXO6jBe+snpjwPqo1jnhG8KOdx4gbB7FxuL2ZQvVR8VZEFTvDTWuGqOpRvFEeSxhVF6JJIPQIScesTAJq1+8AWEFUeBT/TyTqdOGLegwaefegGucO0Kpv8D9p2Oy7Drbgxu0CrjY2XD5WOfiUgeBf96VYSjLledFpbWTQCWBfoWLKggmCr7b+rcIPiZEhwlInpJ/1O562jZ7ahxRg3jtYOEw1l00y91ZlhQ5QybSTAk92/ZOuCoN0hQuSFSF7CGHPZb2ffB1fKXVHEDBCzo9iCuLplanxh50fNFPAVYr6CnCKv7ayzxnzlZwDBu2OCBnc6ncce7sCULE8L85s108CgP+rIsV7JJOP8Uhihx9tdPGNon61MlG+TWutJkTnYxzxHJaa/7K6jXEynfq2hcZ0FJ3Qb/h+rTEOb5qX3xA7WhV15yF+dPzptTXDVwXOYzAcSLxBYeaHBoz2Dm5nTwGHnrEVKnqv+nUgRyWO/LvQn8Z4DVwfCpgAtIq7wUxdjG4mIAVyxZYHbd04+IjtKFNc22fhtFnYuOPtY96pDE/mwwVkFFfrTxH6skNiglYdT8TSZefUvZoKKkGr5G9+fIiuJbFxuL42Gwd+MTtPDtI0CvsSu/Cfx+eWLiocEsnjGfIswDuf6Iub4UDxCh3re+pw== 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:(4636009)(366004)(4326008)(38070700005)(26005)(38100700002)(55016003)(7696005)(508600001)(186003)(122000001)(5660300002)(71200400001)(450100002)(2906002)(6506007)(53546011)(83380400001)(54906003)(33656002)(316002)(9686003)(8936002)(52536014)(86362001)(66446008)(64756008)(8676002)(66946007)(66556008)(66476007)(110136005)(76116006)(6636002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mojjZQdmu8Brw6lzMqR/0PpnGOMhK7iRz032d8JEBIi0LznG/IKAVS7s8QhO?= =?us-ascii?Q?7RXHERISqExEmtHZySfqjhGMYjhVKn0c6iXU5lELtQXgqF/t6g8039RpWWet?= =?us-ascii?Q?8sN2K5oTKr27Cenuo+aF6upN1f2giSKs9oFwGcFSU0e2CZhGhg9UZ5QP6JNp?= =?us-ascii?Q?/A7G7aFJoR7cGUCTQ4DSy8VT/c/eTn2a31v0O/3rxY9esKgxkyMLSVHK0u3M?= =?us-ascii?Q?EAlRRRGCPfDOPvfjRgVzUQUtf/7R32ySX7KRL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m7sqiG0SDuOyeWCJkmfQA0d/TN2t3+8PR6Fk2YALgxFlkDP6s483KrYUV?= =?us-ascii?Q?Tgen+8CaQGvRcb08U/2xEY9tDpzvGSdEmj6ICp3jsujokskqbauLV9AZ76Ch?= =?us-ascii?Q?z7g00OMywSfUntS+yvIL50JGyVa4UriViWW+EWjVVHxAFvRDpluWtfcJbpQr?= =?us-ascii?Q?HmZkxTllWg/Lrbd5NWCjcTgB1v6aNFAlrePiV2pyF/vqe/PkOtmNWGIyZx1d?= =?us-ascii?Q?Vw4Di+p7KEirP6f6gkVi0P289lbe9/IyO0OstInNEzPxJ5Wc3rQNj8jzhp8X?= =?us-ascii?Q?6Wp/eHp9tbyUxBhsuNUecTLAGc7NdlTHJVY6sbQbJLYqlrFDwP8C0mG2S3D8?= =?us-ascii?Q?/vmyOIBA1eSiUAU/cI9R4bvG/pgZVCus/J+bSinSdJYSfZPMgMKndmkx0dko?= =?us-ascii?Q?d8rM2hQr4GAaICLfJdHtvDHnEZ7CtwjHlKdYpsq6N3Ap32PVc9LJrDoKajYw?= =?us-ascii?Q?zw=3D=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: DM6PR12MB3753.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c474668f-7a07-462f-06d4-08d9ae84dba7 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Nov 2021 13:26:29.2209 (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: AruaxA0kCc/ayVV0qurboqF/gpas7+9VbIvWza2sglW2WC7v8NCTgQXilSUfi3sqAxSUVJJcUXDdAtOfWhXODw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3945 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: Dariusz Sosnowski > Sent: Monday, November 22, 2021 19:10 > To: Matan Azrad ; Slava Ovsiienko > ; Dmitry Kozlyuk > Cc: Raslan Darawsheh ; dev@dpdk.org; > stable@dpdk.org > Subject: [PATCH v3] 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 wer= e > 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: Viacheslav Ovsiienko