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 33BFA4606A; Sun, 19 Jan 2025 12:42:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A7B3F402CC; Sun, 19 Jan 2025 12:42:13 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2065.outbound.protection.outlook.com [40.107.96.65]) by mails.dpdk.org (Postfix) with ESMTP id AFBD6402A3; Sun, 19 Jan 2025 12:42:12 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VmlLgGbKjUXKpwABW08uS0zZvEsCpnlze9D9MawoVrmQHa/h4zh+u/VY+pzPIRJF797YNMuHYJZo/G3hQzURoLwinrJry0FbN6xuN7jjv2ctpPJzzUI71tIhv0N0q2fz4qGBI/Zz82U1K4TefxOr7zF//+X6FI5CFHE13M+433kwj4TMk98xQP/vJe235eLSgEhFWUOIreS4lWjUM5yMK/SajHOOFbMhMqm1eBv3YsOnCG4hawaVmQa+MhY4w0barY+nM8IGdP7aOIT81jgewjFw4qTqTE+XY0Q8Na+lUALcxksuTrJOEwLY1l0L8wJ8/cx9MC2WzWM8fv3puNxB2g== 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=nwq8zKZgVa7dYFrbv0RNl+CAsbbWWkr054KORakblVg=; b=EVeWiCSWVPSoqw+hV03YXTlK2Vn8D/W2ujiNZg3T4fkHSqXuRdRcvQq6DmMuLDgyq5ojlegIcEAV9Chh/bUU1Cc7WLSwOf0vLrnRixYj6wbakhTqyBFB11IXXPnj+AjYQJm9KuEklf2b/qitLGEqZZ/ZSH5H258sJI9bNFIxzpmU09q9w3b5p2ag+vkL/82q8bmFDWU8nv6KKlusgL+Zjr/tic/WKS83YZ9aeKHlX2UmMc0i7O42V0YD5Zd58xU5Tw0QSU1dSzKA4Xpx+lWWcj7GhAgQv+GwFAQMT2MRnL0mw97mojbIbm7FtF1I6zvGM4DDQ3kcVjzzFbYUyDjpNw== 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=nwq8zKZgVa7dYFrbv0RNl+CAsbbWWkr054KORakblVg=; b=mJjjtEVGTqvbtcRhGY1mrVyJNpBPW/wkJBo18e+Y3wO3yBRHld5LuZBLQn2CnhkYDrSQAMToeMlcdQX9hSqMeyPwVOvaBd+oyO8b0u/fLUdx7LCF9oncQCu6FEGChisQikMkbjJrRF9E3MY1fWM5M5ZhJUc9BdpqfV6UA8s9RmvPdiamiGp0fnI1qax7a//q34RzLJGEmv5kWtNvvvG9dzn6Fbjaa9lb4PJl9ku8aC3QHkHinHc4KMOSxdk9K6ZMkyxTh55bKTstKiU5lKb3qrZgZ5aZ7XYroOo8d3o2zKpJL84Ajb+x+B9+gd3WId/7RQ236LSOPfcI3o66zUA+lg== Received: from CH3PR12MB8460.namprd12.prod.outlook.com (2603:10b6:610:156::15) by CH2PR12MB4149.namprd12.prod.outlook.com (2603:10b6:610:7c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.20; Sun, 19 Jan 2025 11:42:09 +0000 Received: from CH3PR12MB8460.namprd12.prod.outlook.com ([fe80::2e9d:7265:3b84:59b5]) by CH3PR12MB8460.namprd12.prod.outlook.com ([fe80::2e9d:7265:3b84:59b5%7]) with mapi id 15.20.8356.014; Sun, 19 Jan 2025 11:42:09 +0000 From: Raslan Darawsheh To: Gavin Hu , "dev@dpdk.org" CC: "stable@dpdk.org" , Dariusz Sosnowski , Slava Ovsiienko , Bing Zhao , Ori Kam , Suanming Mou , Matan Azrad , Alexander Kozyrev Subject: Re: [PATCH] net/mlx5: do not poll CQEs when no available elts Thread-Topic: [PATCH] net/mlx5: do not poll CQEs when no available elts Thread-Index: AQHbR3oR9fHGBPpsWEeOLdNcW3iEJLMeP05a Date: Sun, 19 Jan 2025 11:42:09 +0000 Message-ID: References: <20241206005811.948293-1-gahu@nvidia.com> In-Reply-To: <20241206005811.948293-1-gahu@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_|CH2PR12MB4149:EE_ x-ms-office365-filtering-correlation-id: 4cb9470b-95c9-4a50-fdcf-08dd387e4ec7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|376014|1800799024|38070700018|7053199007; x-microsoft-antispam-message-info: =?iso-8859-1?Q?kGxYemqejAEQByCSBmZUkM1daMtqGHEQ+k/BD1h/56rb84eMkDxsTUJO9+?= =?iso-8859-1?Q?ojWeGDTLE0crSt7r01rQSiku+3g4DtHiU51qHWhICgDprbhGNxyEKGVg29?= =?iso-8859-1?Q?IGEuSDKwcNA6QoWyYSNoLhn1Ib6BvUlHQelJxcIbO6dfniW/8MHlQZepcT?= =?iso-8859-1?Q?Q0qBm8ZecQnJ04DJ2EWnKPgIwS9WFxh3XC9Bvj8Kb7peimL9veFnyCf3VD?= =?iso-8859-1?Q?JOTIP5dsLc582I5RTr4HCSUH1lHlnYTpNYXRAeLantB91fIo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cqnkTrByRL78SoUiMNWXi3RG4WNBoSzG3A7mEE?= =?iso-8859-1?Q?tWB2j4uTtBYCkdT6fL9Hyu2BpjAN9nge3K3lUOQwSrlpQCZWmshJUlEVg3?= =?iso-8859-1?Q?OMOA+kxGEP00IFFJZ63cxYtwKXTT2osvjVhc/GEC93unaTwz9xzDhNj9q4?= =?iso-8859-1?Q?RZfruyVbNVeD2zrxFXIc0Vw0GYHtLbSSvHAUylt/3szU6vKl/uweDAy48W?= =?iso-8859-1?Q?ai9ZznR1BY5vlgaRRFDaSq8t0B9szRJ2o2Uj5pD+2Q8Eivxy9p7Ik/hH8O?= =?iso-8859-1?Q?mk5QLsccHxgl9ermyAhZAbp7/NwseMJ9wHmCssON+9bOgKODG1zf3Yf9uS?= =?iso-8859-1?Q?VXODyOKA3Nsa6b1Rv/c+mh?= 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)(366016)(376014)(1800799024)(38070700018)(7053199007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?cGz9b7qHi+gT7IW/uBPXCipeRuB8YWq12bleFlFW7mhCafpRCIHznwCzml?= =?iso-8859-1?Q?4dSbU0n2VHV7e9RsdKYW31iFud3QJaN/9YBs/pavwK13z+qTyZmRHbFeb1?= =?iso-8859-1?Q?+xGq84lmnQMpVSNKohAUF3UTFrpbmzt6X2qXKP+1PpGTxaTs01PNXKTRfo?= =?iso-8859-1?Q?sjCCimR3yPUnguzMsAETNiKUZwmzzqBLHcCIbECHIozXWGK1AfkJ5icE8b?= =?iso-8859-1?Q?r8iD3kADshyq31CDgPZMmOrIrMiq1ewLJVZNUNpOabzmf8XCnO7/euk3m+?= =?iso-8859-1?Q?z5GLhSl8jUfguXkzC4UnqrZ+/YFx0ys1lNt0c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oqaU65g3rbpyNvPL6qI6p+j2Y6e88LBzjSwIGjCcqWZfjOFBZBLDSv6?= =?iso-8859-1?Q?OLii4UUsi1jCYxPNblpuoFlOymqPDb1N9fNPn4A2VshFmmfX/Eswrl3P1t?= =?iso-8859-1?Q?VET003KQjX2S3o5RnRARnWMz2gg69t/xdrqrpWqfR0S1Wj4nZoSalJtV6Z?= =?iso-8859-1?Q?4yyYaXmv60q9d/xOCJBU57Pqse5ZcoBOHUspyQfOlLDndGZP2uX0LPgH/T?= =?iso-8859-1?Q?Y6lvDq5PHWuT+KFdShkN7fl27d9wjyzv1+BmWymfeiSztjZPpgXx89TdTn?= =?iso-8859-1?Q?nn2rxRjsM4y3gxa2K1ZWjzvNVnbz7+2g3z3IWGdvJKLSBUJTSVuScup+Sh?= =?iso-8859-1?Q?o7rXuOS/llD4STgoqnss6zMAKK69koPT7WV+687Jzqm6tP5UZuDea3kIFV?= =?iso-8859-1?Q?rlNaG6i2J6ysQ=3D?= 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: 4cb9470b-95c9-4a50-fdcf-08dd387e4ec7 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jan 2025 11:42:09.4987 (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: Q8HBNs2o8s4fRjsZ1gVYUHS0ZNmp7IBYaV67pu7QiNDx40tvDtQ+SmvA/hIrAAziy9//ix9eRZFCehpkZtxuBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4149 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: Gavin Hu =0A= Sent: Friday, December 6, 2024 2:58 AM=0A= To: dev@dpdk.org=0A= Cc: stable@dpdk.org; Dariusz Sosnowski; Slava Ovsiienko; Bing Zhao; Ori Kam= ; Suanming Mou; Matan Azrad; Alexander Kozyrev=0A= Subject: [PATCH] net/mlx5: do not poll CQEs when no available elts=0A= =0A= In certain situations, the receive queue (rxq) fails to replenish its=0A= internal ring with memory buffers (mbufs) from the pool. This can happen=0A= when the pool has a limited number of mbufs allocated, and the user=0A= application holds incoming packets for an extended period, resulting in a= =0A= delayed release of mbufs. Consequently, the pool becomes depleted,=0A= preventing the rxq from replenishing from it.=0A= =0A= There was a bug in the behavior of the vectorized rxq_cq_process_v routine,= =0A= which handled completion queue entries (CQEs) in batches of four. This=0A= routine consistently accessed four mbufs from the internal queue ring,=0A= regardless of whether they had been replenished. As a result, it could=0A= access mbufs that no longer belonged to the poll mode driver (PMD).=0A= =0A= The fix involves checking if there are four replenished mbufs available=0A= before allowing rxq_cq_process_v to handle the batch. Once replenishment=0A= succeeds during the polling process, the routine will resume its operation.= =0A= =0A= Fixes: 1ded26239aa0 ("net/mlx5: refactor vectorized Rx")=0A= Cc: stable@dpdk.org=0A= =0A= Reported-by: Changqi Dingluo =0A= Signed-off-by: Gavin Hu =0A= =0A= Patch applied to next-net-mlx,=0A= =0A= Kindest regards,=0A= Raslan Darawsheh=0A= =0A=