From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.48.31 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796209382; b=hUt6DYwTvjJzQ6oTx9jBMZXxijBvJqZyU7LlDXx+JfzYBXdUkacjLmOlSTs0mM5WU6t+ utrfesdPRZwgQdeYG6/xoqda3d+i8CX5NukblQPu+Bi8YV2+oLeVDGLVuR78RKsB8wzXj +b8PsQSwzXGDnEAwJQxO6ZZL0SHzUeBFp4tOnq7AjcNON4/lfV+5ltfEZ571L6w+taw4M MKKZxDJXRUKrmE5bjkEfZJMRF2smwFuCGZCh74WO+jb09c7I52yqWp6Jr7ucnTMDibz5V vPdw6fdOFGz8WBFOG+nTc5oy+GxfGOOZ4dFZZcIiR0cvlV0eEx70vmXp3LbcdNHL3Tw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796209382; h=DMARC-Filter:DKIM-Signature:Received:Received: X-MS-Exchange-Authentication-Results:Received-SPF:Received:Received: Received:Received:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding: Content-Type:X-NV-OnPremToCloud:X-EOPAttributedMessage: X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id:X-MS-Exchange-SenderADCheck: X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam: X-Microsoft-Antispam-Message-Info:X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-Id: X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=E16LiBF2/8nx/P2gfyRekitHYfvU1NFzWotcpu9U5fM=; b=oOcOFfEkPY5QLw1KWVvbw/2y4woVd/NiffylasU3HXNTdSWri6+3n3RUi1X5V/Y68L3h HtNjk7Hwfc2zZ1L494+xfJ9VlVyvpYCCyWp1iKHt1vKVVsk5dIqQQZ3zeY3D1jRzl7H+h gSDyPEBLIBtMWe8KE54bKHmI/p9MrJpSqX3l0jGz0Q+wU5TGAWx2UNJPaLrbyy1+LvA/H fTNiVX+olmrYi9WOTTKJAXv63dTUuIYzsUVPS1pkRqKhOztteeFmTz3UMa890iGurx3mN yVCPNUI1TILto96cLFzxBJ2XpU1ytYI5D6R0GwUwJuP+f8qxkEkLW9dlCPoH7pN1diQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=WRNGt2C6; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.48.31 Received: from MW6PR02CU001.outbound.protection.outlook.com (mail-westus2azon11012031.outbound.protection.outlook.com [52.101.48.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F503606A323; Wed, 2 Dec 2026 11:03:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2F503606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=WRNGt2C6 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ctg9mzReAFTiQGnAN7MwHJpg057kcTQQ0g8a5bXKhOgfyAwj2rEAHqPEPKk2LAmaZf7DUncqmxIzaA1O8z7VZBCSgHWpEP0I5yUzdhOPSeUbTgokyTGj5WdmCEdATXgqtGKqSVPhXQsQsoIsZfgM5GkK01tvKoQXkR3l2+Nf76qi6SCGPGeyNiMbKwHapv5MSA1Bl0qaP/YX+jvO1UI9xL2AXggRn0ZbExq8RxvXns3wZNfaqNgiPtwbPV93o12IRWA1/bW+7UN2XGQ+dc5MQhXNj+DsSGNlD+YAJrkn16q0eOu5W+UglevvUoSSJ6KyutVXsSEyuZZ6Ia+JINLxIw== 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=E16LiBF2/8nx/P2gfyRekitHYfvU1NFzWotcpu9U5fM=; b=RssII74RPFQYJbKs6Zp2/mFrXfJBWxYVI/HO61X5RItRUaH/ejAGSfFF4ubmSWZ82/BD+QuG63Qmf2KQSovMtOVDf0QYPFnA5cetMgDeiw8gf3y8Iz4oND30TwPeN37jy17CUGZBKvIbiOwBQXF8Qcay6qln/O7dFoJ/Q6wjbiumeZyorXtJg1Yen19x0VsPCnzN7Rd+ZRZpWjYs4Gyk+yD68D+erakU1tJuDcJVUzKLVW+M0DNEuEPbXKCOdIBru522L2ZHCiZ/26177iQYEV84m2XQEtXdA6j+rpHW+sewDR2U1VhzpwkkBOqIY1RmtW9dNK6OO6t3HQgMcpfT9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=lunn.ch smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) 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=E16LiBF2/8nx/P2gfyRekitHYfvU1NFzWotcpu9U5fM=; b=WRNGt2C61EY6p0kIB02CILle1U5Z+MjEr67Tu2hoxoCPfD46LT3tgleB7FxUI7k9KuVB/7lU5mhe8SASQbkun7QHoEvI0loIh7y0+P2T/wjuVUg+4SnnIB3H1ORWTFgNDEkwSWHh8IjIrNFcMdZ+1u/9jymM7FsBWj5LbDPANic38CPsujUgQC/iZq5vAY6tQTdjjULtJXUU2gj3OsQk8PgM647a3tX0myK8vEs7dlTVfH8f97MmqK930bsm1NVfdEd6M+t38saAb44NEnnB8lY5a+3lVSNSjK/dbszx2ZiAd2Fb7Bxc3oNp2Qy/52f5GuSnHzAILgekln3SNIikcg== Received: from BN0PR04CA0210.namprd04.prod.outlook.com (2603:10b6:408:e9::35) by LV8PR12MB9181.namprd12.prod.outlook.com (2603:10b6:408:18d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Wed, 2 Dec 2026 11:02:54 +0000 Received: from BN5PEPF00046987.namprd02.prod.outlook.com (2603:10b6:408:e9:cafe::d) by BN0PR04CA0210.outlook.office365.com (2603:10b6:408:e9::35) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.11 via Frontend Transport; Wed, 2 Dec 2026 11:02:54 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN5PEPF00046987.mail.protection.outlook.com (10.167.245.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.5 via Frontend Transport; Wed, 2 Dec 2026 11:02:54 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Wed, 2 Dec 2026 03:02:31 -0800 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Wed, 2 Dec 2026 03:02:31 -0800 Received: from vdi.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.2562.57 via Frontend Transport; Wed, 2 Dec 2026 03:02:25 -0800 From: Tariq Toukan To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , , Paolo Abeni , Willem de Bruijn CC: Aya Levin , Dragos Tatulea , "Gal Pressman" , Jiri Pirko , Jonathan Corbet , Josef Bacik , Leon Romanovsky , , , Mark Bloch , Randy Dunlap , "Saeed Mahameed" , Saeed Mahameed , "Shuah Khan" , Simon Horman , "Tariq Toukan" , Tariq Toukan Subject: [PATCH net 1/2] net/mlx5e: RX, Drop ICOSQ padding NOPs on UMR allocation failure Date: Wed, 2 Dec 2026 13:02:06 +0200 Message-ID: <20261202110207.3387859-2-tariqt@nvidia.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20261202110207.3387859-1-tariqt@nvidia.com> References: <20261202110207.3387859-1-tariqt@nvidia.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN5PEPF00046987:EE_|LV8PR12MB9181:EE_ X-MS-Office365-Filtering-Correlation-Id: 73005e59-2093-49ed-4f8c-08df5063d0bf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|1800799024|23010399003|376014|7416014|82310400026|261026121527099003|10067099003|11063799006|56012099006|261022115727099003|261021121427099003|261021135927099003|261009223027099003|261021130227099003|261102123227099003|261021123027099003|261021133027099003|261028144727099003|261022105027099003|261026140227099003|261022113327099003|261026135527099003|261022075727099003|261026130827099003|6133799003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: 5ZnJJKvPDIvlkLvNCXoeNPBQ8waPxc7069oKelbOo0VUFmwMqBHtIQHqxDqU/h4EMiGyI05nCA7H/+CXqb4Ut3dQ7l10BD0RA4HnoJUs2D7qqwjeLCyMHn3sDWZbNoamkf5tJAQBOCCDwSVZoFkIIaRlTz5viuqgeBJohIE08ABqrbiqKAEE4U83E5d+8qb+mh117rYyIemvu2EraypXKZ6Nkitx7hofuHogtQTgy8M86X1+ybAE9xWIZ6CV7dXJZBG+XEP7IiP5hn3PJuK2HKeRnwQY7B8kZlyUF0H934v4Vd4cIk6LofzZVULutqNuEF36jKerAk7JHALg6Fqll7xVUqYu77K3xxobiXDupTmFDtp7zYsrFRjf8kyi+3rVckVeIYX3psWhuRysatd0QZd14x8SgSCQZHZJw70fTT5o9GKaC2L+DsZHPb/f4Y6QNbYV6a/AhhPzA+SncbXpnl6zxK0fCUa5VXLFZxUjH91WqrhlFXaDDHqJVprN0wLinFaXaBArJaOvv8Bk2B3m4aXoEZVzSBoAaJ81mq+chwSiKz79MnYNpfEx65uNQaVpwWV7xJmvFVJuBIgY9ddZS7zNOMjdMKdUmFQ2MJhCXvacRTdZ+OrVrpKw60DpMQlVTGHKoh+TwWfM/Juk91ZR0fL8fJr16pJ7JO+K2c9NopVJwsuFAy2XspRo64F1hwlFxAVJbTEnd6ZRWCeRkCENeg== X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(23010399003)(376014)(7416014)(82310400026)(261026121527099003)(10067099003)(11063799006)(56012099006)(261022115727099003)(261021121427099003)(261021135927099003)(261009223027099003)(261021130227099003)(261102123227099003)(261021123027099003)(261021133027099003)(261028144727099003)(261022105027099003)(261026140227099003)(261022113327099003)(261026135527099003)(261022075727099003)(261026130827099003)(6133799003)(18002099003)(22082099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ziPAX0rYQApwqIh3rSXMq89bdIADwIuAa3fAiz7ghLvFWwfOoD20sDk6paD2jDGPUp1p4x7YivrJjqC9tByVZjxct2IhopVIQaxnsGy1nkVtuxGtFROWgef9sRbuaIGPlppS2zM3Pi8kFnalmmtBGqvQD+K7uTYxq+AcPUYK6uEa2X6Biud+8QwRrROf76yohKJ9uH08H40lm0G5WyNIwNvtdfyl650TJHp7Uf8uCuoDR6mUFnEDuHYLqvuJZnGACKVSThAT4Mb4jUmY5ILfAnWEY64S91MrTmgDbh5nS/IaD+/SBmyGZMRnmc6TIP+HOyPQMk7gvBxBe/Y5kP2SJORPYqy74PSm0EHwH/4DqA9d62z+if83iGW87Uia0KgGifO2QcWa9DkGxEUCFTVTIvNcgLFrv9KyZErcO9qmD3WLFttLC62DDa44peVd+eX5 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2026 11:02:54.2287 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73005e59-2093-49ed-4f8c-08df5063d0bf X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN5PEPF00046987.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9181 mlx5e_alloc_rx_mpwqe() takes its ICOSQ slot before it allocates the pages, and mlx5e_icosq_get_next_pi() may pad the SQ with NOPs up to a page boundary on the way. When the allocation fails, the producer counter is not restored, and the NOPs stay with no WQE after them to request their completion. The ICOSQ recovery flow, which waits for the SQ to become empty, can then time out and leave the RQ deactivated. Restore the producer counter when the allocation fails. The NOPs were not submitted yet, as the doorbell is rung only after the refill loop. The XSK flavor allocates its frames before it takes the slot, so it is not affected. The next patch relies on this: it posts a NOP only on an empty ICOSQ, and takes a non-empty one as having a completion to come. Fixes: be5323c8379f ("net/mlx5e: Report and recover from CQE error on ICOSQ") Signed-off-by: Tariq Toukan Reviewed-by: Dragos Tatulea --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c index 1586cb2404c0..3f6b11da486b 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -651,11 +651,12 @@ static int mlx5e_alloc_rx_mpwqe(struct mlx5e_rq *rq, u16 ix) struct mlx5e_umr_wqe *umr_wqe; u32 offset; /* 17-bit value with MTT. */ bool sync_locked; - u16 pi; + u16 pc, pi; int err; int i; sync_locked = mlx5e_icosq_sync_lock(sq); + pc = sq->pc; pi = mlx5e_icosq_get_next_pi(sq, rq->mpwqe.umr_wqebbs); umr_wqe = mlx5_wq_cyc_get_wqe(wq, pi); memcpy(umr_wqe, &rq->mpwqe.umr_wqe, sizeof(struct mlx5e_umr_wqe)); @@ -710,6 +711,10 @@ static int mlx5e_alloc_rx_mpwqe(struct mlx5e_rq *rq, u16 ix) return 0; err_unmap: + /* Drop the padding NOPs of mlx5e_icosq_get_next_pi(), no WQE follows + * them to request their completion. + */ + sq->pc = pc; mlx5e_icosq_sync_unlock(sq, sync_locked); while (--i >= 0) { frag_page--; -- 2.44.0