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 1682345895; Thu, 29 Aug 2024 11:00:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 06026427DD; Thu, 29 Aug 2024 11:00:16 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2062.outbound.protection.outlook.com [40.107.244.62]) by mails.dpdk.org (Postfix) with ESMTP id 1925842830 for ; Thu, 29 Aug 2024 11:00:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AR222Gx2vCAKLKtXs+0BogTSmLWAzf6nJ5hybRRim2pArndkSgKgqHTG9tl0PQ8ux+1s1BbcUpUcOxC8N/TYdC3d4w9ybzfWnbUoh9rjAjvhTm7UmgUtYZ9hpmIICAz3m8DRJfeSo59cqJqfghGKZm/O4sYvxnXYk8VlmVpc5ET/OHU15m6N7iKMJFxAqyTIF9l2m6IRBbOQivQJj5ig0zOfAmLyKhbBYcWhQgIchYPApf4nfXc+j5AW07JCpj0J1VAE5Dz8rbH/nB7+eAcgUnTjriVmvlhrzGRUSb+PD4gHLHFtFddKLZJpyUbMh3GZc7FumjZkpq1ZQzxIV4VWlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=sGPOBYiQz1DrYvSvrHni+8iaLw7F2yCDvr++S7YhQr4=; b=iR+3elm/GrlcuBRhtmk/64tYUesxpmgQWHCgBTtgXQ1i64LWmbqF4WIIDBtSADdVWOhzfMkdzW9vq4d8nInmrHMxFSuE8mhmJVWX0HUW44vZLiDm4Wq6Gpa3uuIOHEl+2tOqdgJcLBfUr3EyMwyP0ihXqz//z4WSScwGZg/chsEEsR+1zSdMIQLztxl/Y2Sqee+dTeWjru9O9RtdfxH4oN+c3U7shIAcNg57ztEJHHryFhV5pZz+znDDpJBfplS7YD49sGaKO6hCaebPfFio9T0xXcQIkRo6248x+zvB/GEbAdMibtOn15wvtXJj2d/X58jEx04Ymi/hiJPcs3kpAQ== 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=sGPOBYiQz1DrYvSvrHni+8iaLw7F2yCDvr++S7YhQr4=; b=eiRDghPshAoeaTO/7pIokvYA+3DzjebUFQhAzd9A72a1mroOlo82ImlSTjVjr4Ur7U4P6XaoJlUs50UaGyiwjO/Yvsa9bMTk26KCdxxUIb9MsPiwtQJWD8cw8g1wKcktW+oU5ogme1aQQ4XnqhD+HPIxxDQnSP+1D4jwvI9zCzWpBxW2lMYvCPeJ7Sl0oEyL8DANSYvR2J02OmCXUcM/c/7bMecyDpR8+u7Z5OVcg87cez17pjAyCPo5g5ZVg4gQTUXefnVc9PtSXrpytUnA6dIKoiZM7fl59PoElKbm1t/d7iP06wACkMqPiJigvbeXhoOcpyhq3QfnJDHejZ2zXQ== Received: from CH3PR12MB8460.namprd12.prod.outlook.com (2603:10b6:610:156::15) by MN0PR12MB6125.namprd12.prod.outlook.com (2603:10b6:208:3c7::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.28; Thu, 29 Aug 2024 09:00:11 +0000 Received: from CH3PR12MB8460.namprd12.prod.outlook.com ([fe80::2e9d:7265:3b84:59b5]) by CH3PR12MB8460.namprd12.prod.outlook.com ([fe80::2e9d:7265:3b84:59b5%6]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 09:00:10 +0000 From: Raslan Darawsheh To: Bing Zhao , Dariusz Sosnowski , Slava Ovsiienko , "dev@dpdk.org" CC: Ori Kam , Suanming Mou , Matan Azrad Subject: Re: [PATCH v2] net/mlx5: workaround list management of Rx queue control Thread-Topic: [PATCH v2] net/mlx5: workaround list management of Rx queue control Thread-Index: AQHa3PGDy5rAApACpE+whV5899kuAbI+Ka9U Date: Thu, 29 Aug 2024 09:00:10 +0000 Message-ID: References: <20240723110528.1088674-1-bingz@nvidia.com> <20240723111411.1088810-1-bingz@nvidia.com> In-Reply-To: <20240723111411.1088810-1-bingz@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CH3PR12MB8460:EE_|MN0PR12MB6125:EE_ x-ms-office365-filtering-correlation-id: c90fba56-2c25-46ac-3487-08dcc808fcb4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|366016|376014|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?Q?mrelTha7anmgnLlwy1+8nkpmEGY5txoe94HtiOMi8gC2YGdYc0V3KLRFFS?= =?iso-8859-1?Q?i08piAu+6fixqUycqS4Xw18vVk3aPnPu2q3wP1J9KBTxNuolss6MIlTPdt?= =?iso-8859-1?Q?IP3jIj7YSJBHGsrsZY3bd7hVvFx8X1RQsW1zacDHfvQIfk5J16igczhzqy?= =?iso-8859-1?Q?aLbvmlH3czZkf4sb86oKBOu75M1af7TKgUJttF84FX+FTE3ZreGOSdF77n?= =?iso-8859-1?Q?re/WVRnjmzg4dMHVShchzhP5QpLCwlt8luBFw/+7BQKSCh1IpbokbZk7hb?= =?iso-8859-1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3A01goprFUKUXVvMsyaGjxkrCDtVN?= =?iso-8859-1?Q?nm++7z6pamNnWCUqRLJTQxCBY3W5zDuVcyB/Safggn5/hlAilsEorQsclB?= =?iso-8859-1?Q?F1CI0izTEP/aRGfcVPqXeXDCSUFG7ZsSb8MxRTHvNQW0AtLDEVb/p8v4OU?= =?iso-8859-1?Q?LFyc/WLR7czlJTW93/WTVYXkBg/SD7Ig7jDa5n0OCr4eJVjzGDLJoEc7+r?= =?iso-8859-1?Q?Ueq/As71tiwscaNv4xL3RFgrVRJaPEVaIszbD/JwTZ16F6WvJGuQqSObxG?= =?iso-8859-1?Q?atwmfz2KIZQXAbg1UPHNfMsRPPE4agcOGqFN9A=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH3PR12MB8460.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?dFMsdDHy6OcKpaVQhy2xHO4T7cR+WezSu2kLZotmbSr3Vt58ymIwLgQcSa?= =?iso-8859-1?Q?5FMGhTqWbPyZgxH/kQdaG9Zo6AlLmIYFYb95+duBgPL1pdhrSZVWarQTtn?= =?iso-8859-1?Q?v5Lv/+WBuU0mTlsVnEa+UISe9W2xuboZyCQ2zQCouxVt+9n37FMgRQM6Hp?= =?iso-8859-1?Q?qpH+9wsQj/FhL3VNXBKVXzqMIZCq0Zmef71oPomL5m2Apgs7jttEerWche?= =?iso-8859-1?Q?675kh/aT+jT5oB1AAzECImn/okM8ORlyYiC6/h8cnOroTmZop7CA2QGQt+?= =?iso-8859-1?Q?Yfv+rZyb74iFA8igH9VmguX2OSKMmHbDwTo1T/vfwxQJEy8V0oeXNVQQwE?= =?iso-8859-1?Q?NtaEoDd+tGzaAAO/m0XPYf5xT7RDp8vvS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7pVOwqupWSyVYcn50vn0KIKbUqMMXecQRZFcUqvNBGtQxUTiwTMTp7?= =?iso-8859-1?Q?/MN6K6yPCsAv/2hxPsOY28hDfvOpDg3zD/63wVY/gaDMq2HSefDHkZpLYs?= =?iso-8859-1?Q?2Z+6hsyHU+DqQ7FGLFXYGAbmmZsQ2aW6VX5lijPX95M9m7NQBlkPo8TamF?= =?iso-8859-1?Q?zri7L1ibu4MExJx/4ApZ0B5jXO/LabWWkW4Qlshsp55NG4gVV++7TQslcX?= =?iso-8859-1?Q?CBo0M9Fc3mMh2DemGCqA7o7qkYBl9YOgsSk4ldNFrUwQRmKejFcQeQkWQi?= =?iso-8859-1?Q?uzfrnmrvoBnxmsgrLKgZtAQBgirSzf+Ic9GDNkygqb4tmziGVWEuz9geWZ?= =?iso-8859-1?Q?zzEPQHWeOAkh9Xvo1jaUl6p5UuFn3p11Mf?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH3PR12MB8460.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c90fba56-2c25-46ac-3487-08dcc808fcb4 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Aug 2024 09:00:10.4465 (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: HIkhEDGPI5L2NIS/ax+O6oWPC58/YuMaK5EQRf1u2KTNvz1889s+r5s1+Wf9Kuf23mleQ48Bjt/XbRcQ0rlOyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6125 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,=0A= =0A= From: Bing Zhao =0A= Sent: Tuesday, July 23, 2024 2:14 PM=0A= To: Dariusz Sosnowski; Slava Ovsiienko; dev@dpdk.org; Raslan Darawsheh=0A= Cc: Ori Kam; Suanming Mou; Matan Azrad=0A= Subject: [PATCH v2] net/mlx5: workaround list management of Rx queue contro= l=0A= =0A= The LIST_REMOVE macro only removes the entry from the list and=0A= updates list itself. The pointers of this entry are not reset to=0A= NULL to prevent the accessing for the 2nd time.=0A= =0A= In the previous fix for the memory accessing, the "rxq_ctrl" was=0A= removed from the list in a device private data when the "refcnt" was=0A= decreased to 0. Under only shared or non-shared queues scenarios,=0A= this was safe since all the "rxq_ctrl" entries were freed or kept.=0A= =0A= There is one case that shared and non-shared Rx queues are configured=0A= simultaneously, for example, a hairpin Rx queue cannot be shared.=0A= When closing the port that allocated the shared Rx queues'=0A= "rxq_ctrl", if the next entry is hairpin "rxq_ctrl", the hairpin=0A= "rxq_ctrl" will be freed directly with other resources. When trying=0A= to close the another port sharing the "rxq_ctrl", the LIST_REMOVE=0A= will be called again and cause some UFA issue. If the memory is no=0A= longer mapped, there will be a SIGSEGV.=0A= =0A= Adding a flag in the Rx queue private structure to remove the=0A= "rxq_ctrl" from the list only on the port/queue that allocated it.=0A= =0A= Fixes: bcc220cb57d7 ("net/mlx5: fix shared Rx queue list management")=0A= =0A= Signed-off-by: Bing Zhao =0A= Acked-by: Viacheslav Ovsiienko =0A= ---=0A= v2: fix CI code style warning=0A= ---=0A= =0A= Patch applied to next-net-mlx,=0A= =0A= =0A= Kindest regards,=0A= Raslan Darawsheh=0A=