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=40.93.194.47 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795963498; b=pOa8663kzlJE5qtBqw/j84UudhW1mjvV90gYOKSVR/DntIeqJfFwNdze0iXdo/eOwjBL iS2f9liIR/GheW5dIvrpAzLDUOG4Zm9Tzr2m2xjAtIsRXCmBLbcx0FdIjltslPaHOzWVK EM53e1BJuXViQ6Slue+YWSY9t1vFDbsIfP1vJ7ma+/KtyRsGMGuNPFUy6BCFQ7WBbz5K0 t45Rhx/eyilMH9m1J8eFoyaib5Q0XTdphWklZvu5k7MW2a2lq4EyOOkAU8UOUANURBMTB S4PtBNEvEvdrEVBCsJgc31CBCfdJ6sZv/9gFRDUvb0UN2iSJS4YKGjUHTYU+XSRa8yQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795963498; h=DMARC-Filter:DKIM-Signature:Received:Received:Message-ID:Date: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-ClientProxiedBy:MIME-Version: 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-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=z3aBN8DUgvx3YRdeXZp5U+udtXy5i+t9SHhvdL1YrpY=; b=ca56c75pG1eyQhLGZB3H3EkC7cf2WVToohBmQ9hY7zcrK4OCumJK3RzfoQ/oPDW1WMER 2LZ2cQmLSIKIzi7fTwQmMyozLq+lVQDacTFXANlyf9Uua7+63IH7NG3q6ys4vSgIhMtwF TBjPjlJuQWH7c/X6m5fN7G90xRx4w1pKQ4t4wzjSia8CjA4KTeD4bcSA3TAA+Jo9OU8p6 mqcN2kW6KKpm6JwmidAHzlki4HIMI83HOZHJ55IES2ehzHyfK5uK0MQxlO4lp7FVO8S12 rylPs4vgu5rCMBz0oOn0BRlOENAaGmHFdxWz4lGTbTNmra4Uhl2Fv7ygxbeB3xJG5Jg== 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=j2dBlnGL; arc=pass header.oldest-pass=0 smtp.remote-ip=40.93.194.47 Received: from SN4PR0501CU005.outbound.protection.outlook.com (mail-southcentralusazon11011047.outbound.protection.outlook.com [40.93.194.47]) (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 05724606A31C; Sun, 29 Nov 2026 14:44:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 05724606A31C 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=j2dBlnGL ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=zW36PHv1mxHs5GS+3Kcq5QKziwg/QssxOUxLJFo7L0KOU6uoOYdHPLlB9JT/byFfvjRx7G6mhtvIao5qymBvG+UkBExjZ1vKMjUo/KoQq1uA4H8eTuTn/xWcuV+Vp+E9W2RIM6Y54tjB8WIIJIum4kIruM5/WEEgg7oWft9gXxSypDw5MbJvfKZV4fZlV8Sz5MHB0Ok9h0cx66v4ZtGJvWueHmupfq4D9dunOVpEQHFqV0A3bCGP1bot42nHeGI8JGZPshYkLUVW4erf00UIjH/q+ljhLJc5VHjJCKYkX8L4gWIfLOSyv6ZxjQppfWzAxBiMIVsLFMev21JRbVNLhA== 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=z3aBN8DUgvx3YRdeXZp5U+udtXy5i+t9SHhvdL1YrpY=; b=fjHfDQoIU74DNmYPb6H/tAvrwimtnCm68r42IRzC+Hy6nzNQZ0ZqAK3HfeGddJRSAie+NQDVy2RANLEHSi0oqdeaQRqqGkxq9djya5YTttvWy2d6uaU/cP4dUnAxvDE1SZl+ueTAhA4c6JPMs8etv1kOXCIONX5jCXw4li+k49LIFZNsZSlpa0tA8SK+qZSNGLpUIZ2JBJO8N0j/uzQF6xFv8GOXSnSjTmS/iWwYudMzL9UMgZQYcRqzUKPMVg1Lj1J0LrkFblC9INTYMZ3nosYLYeW1OrGbMOGR8kuXaV3AkFIuU7zceuRVWJkvKBOX3GPTV/J39Eo57pKO5TXHqA== 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=z3aBN8DUgvx3YRdeXZp5U+udtXy5i+t9SHhvdL1YrpY=; b=j2dBlnGLhdvBtgacT/BMlfTRN5Pg1+BRj5x5GVVf7YRjiFiKsl+5KDUqcN3V7VuR614boH8iDBU++l/lxeXM23m9e2++ChY8oTj12DAzY7XQ8/OJngAy2CrPjH9hJV46J80okOH9pisEtHC5CSX1hfhp0EHhHFVqMb7cV0qQ9gIudl+rhw1R/zv4e07M9/cnrCGKtdEVXqnatS+DurF4tCA2znB00p0IMqJ1l26ppZNKhDhCDdb2R2xYC6oWcwsdVOcgjZbcpzMznC/IyGxt8iP8lkIH0orPnoC5YeF1rHb+LpGh4iI3KHrOyquf/QkpX7CdhusC+078Yh/ytI+XVg== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BL0PR12MB5505.namprd12.prod.outlook.com (2603:10b6:208:1ce::7) by LV5PR12MB9828.namprd12.prod.outlook.com (2603:10b6:408:304::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.11; Sun, 29 Nov 2026 14:44:55 +0000 Received: from BL0PR12MB5505.namprd12.prod.outlook.com ([fe80::9329:96cf:507a:eb21]) by BL0PR12MB5505.namprd12.prod.outlook.com ([fe80::9329:96cf:507a:eb21%5]) with mapi id 15.21.0662.007; Sun, 29 Nov 2026 14:44:55 +0000 Message-ID: <014e88d9-63b0-4fcf-86ed-3b664e2ac737@nvidia.com> Date: Sun, 29 Nov 2026 16:44:50 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next V3 2/5] net/mlx5: nodnic: Implement data path To: netdev-bot+sashiko@kernel.org, tariqt@nvidia.com Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, cjubran@nvidia.com, gal@nvidia.com, linux-kernel@vger.kernel.org, horms@kernel.org References: <20261126182448.707782-3-tariqt@nvidia.com> <179580622112.3135.1797108162011344544@kernel.org> Content-Language: en-US From: Shahar Shitrit In-Reply-To: <179580622112.3135.1797108162011344544@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: TLZP290CA0015.ISRP290.PROD.OUTLOOK.COM (2603:1096:950:9::11) To BL0PR12MB5505.namprd12.prod.outlook.com (2603:10b6:208:1ce::7) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL0PR12MB5505:EE_|LV5PR12MB9828:EE_ X-MS-Office365-Filtering-Correlation-Id: a01da826-3dd1-4464-51fc-08df4e27556b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|23010399003|366016|1800799024|10067099003|56012099006|11063799006|5023799004|261021123027099003|261021135927099003|261026121527099003|261022113327099003|261026140227099003|261022105027099003|261009223027099003|261021121427099003|261022075727099003|261028144727099003|261102123227099003|18002099003|22082099003|4143699003|3023799007; X-Microsoft-Antispam-Message-Info: m3I5l7Pm9RZQIAqBn4M2TiePFw2A3QqQDFrEkFz33U66f0nuz+5mYAfHkqUgiPssh85u0JwVeIcZRMpfkmBXH+qZadwMsXPVl0+61KtjbQDrvK8JB5ci/PVOMBcyzCl8pCsfNLZxvS/Ov/kd9Tn1Ad7pKaaxAFo6YYqhxhAT4oU5g1lv4YIlFgVOV/6xdHKpjWNoZlRpmF2SmDs4JnM0HAaGS4EZ91TLWL2Eu6gLztdko7ubhb6IW9IWEDkrqKbiLflcsWP85poO2TAQI1SWkZf9hoOZ8O1+EDS2M8I/K+9OHT4PSW4GoBEv21mdv8LZy3cxJ0vMr/Kfgs66q77Nki+gO4OW2SiY4zqKP+9jxVuG8YjLBnLcp3dUWPJjFjMYWC1u2spu+4JHFvpwiHou6IcvbyXkCk5KjUzd8kuQ5QfWbGeS+fNScF9r8bigtFrfa1amzgkhdz5NpkTTNTUDI+fUwTPvgqPUrTsAhaIroGMi+97rcVaWDygpzQsBMdHIAJgeF4F/nA7vOleJibdHm2ri20llbq9ba/1nwSx16HY8YWU1eqtLs+qZNfY4LJzXW4jNZcqoirOJN/cDsM37gKigY7dbCRVtXMpR+n4J0FyL1ecoMvrohhT/zw5f3BLHSJY5VL8J+8sDg8oRN2p43k6J/YpgaRvN76g+qSRqMhE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR12MB5505.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(23010399003)(366016)(1800799024)(10067099003)(56012099006)(11063799006)(5023799004)(261021123027099003)(261021135927099003)(261026121527099003)(261022113327099003)(261026140227099003)(261022105027099003)(261009223027099003)(261021121427099003)(261022075727099003)(261028144727099003)(261102123227099003)(18002099003)(22082099003)(4143699003)(3023799007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RnR0M01aS005bU5jUG44MVI4ZzNWWXVMU3BBOUwrc0EyclhxM1ZscnZHcmdQ?= =?utf-8?B?V0hRQ21rMndiRDlDNjFCb2EySHJMRlp3VnVteWZRVk01UitGQmNzbmJ0anZz?= =?utf-8?B?SDRzQUpSeTcrc2dNVSs0T0lYZmhPSy9FcUk5Ni9nMlNGbWdkS0lnTFJaaCt1?= =?utf-8?B?aHQyQXdCVVlUL0xTUkZLdjZ5emtsbndrZ2RDSFFRMVJaTE1FWG5ZRmxmR2ZC?= =?utf-8?B?NUphMDhwZW92WVl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kyd1U4T3d3UHh4emttV3N1RnJnaVlOUDhZTExHQ05jUk5IUTVBZmRlSkg3?= =?utf-8?B?elhkS3h4ekJzdWVQdjM1WVFtL1NJVVM5b2pWelYrQ0wwazZsTSthUWhEa2ZJ?= =?utf-8?B?d3RPWCtKd29PZCt0WnFjeVpGdnlSVm5MSGdGRHF1Z3RsM1hXWnJvbnZjcENs?= =?utf-8?B?SW1lVGp1TW9XY1dOVjZYOWxNVTNHdVVHOXhWYUlMTDRNOHEvNmhNZ0xNMUtH?= =?utf-8?B?cW1WTm9LRzhCOVdzU3ZDanh4N0JyaGRPa1ROWDkrQ3pjYkhuRXlyUT09?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: a01da826-3dd1-4464-51fc-08df4e27556b X-MS-Exchange-CrossTenant-AuthSource: BL0PR12MB5505.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2026 14:44:55.4773 (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: oZ5Ep2wcEotou0kYXxe4ZWmiMCj2nk+I0xKumSzDLOF23ZydBR9HW9f2ESeJRxRM5Z9YIm1tnNVavKIn7R2bjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV5PR12MB9828 On 27/11/2026 21:03, netdev-bot+sashiko@kernel.org wrote: > Thank you for your contribution! Sashiko AI review found 5 potential > issue(s) to consider. > > Critical: 0 · High: 0 · Medium: 2 · Low: 3 > > If you believe none of the issues are legitimate, please reply to each > issue of Medium severity or higher and explain why the AI is wrong. > If any of them are legitimate and you plan to respin, please let patchwork > know by including "pw-bot: cr" as a separate line at the end of your reply > (one such reply per series is enough). > > - [Medium] With budget == 0 (netpoll), mlx5_nodnic_napi_poll() > (drivers/net/ethernet/mellanox/mlx5/nodnic/en.c) runs `if… > - [Medium] Error CQEs (OPCODE_CQ_SEND_ERR 0xD / OPCODE_CQ_RECV_ERR 0xE) > are treated as single-WQE failures. > - [Low] The commit message describes only the TX/RX descriptor paths, > NAPI and checksum offload. > - [Low] In mlx5_nodnic_check_features() > (drivers/net/ethernet/mellanox/mlx5/nodnic/en.c), the comment… > - [Low] mlx5_nodnic_activate_queues() (en_cfg.c) calls > napi_enable_locked(&cq->napi), then mlx5_nodnic_arm_cq(cq) from… > > -- > > net/mlx5: nodnic: Implement data path > > This commit implements the TX and RX data paths for mlx5_nodnic. It adds > WQE posting with a BlueFlame doorbell, page pool backed RX, and a NAPI > poll on a shared CQ that dispatches both TX and RX completions. It also > wires up ndo_start_xmit and ndo_features_check and enables checksum > offload. > >> Implement NAPI polling and CQE dispatch for TX and RX completions, >> including RX WQE reposting and CQ re-arming. >> Wire up ndo_start_xmit and ndo_features_check, and enable TX/RX >> checksum offload support. > > [Severity: Low] > This isn't a bug, but the commit message leaves out some port lifecycle > changes. This is the first patch that calls mlx5_nodnic_enable_port() and > mlx5_nodnic_disable_port(), from ndo_open/ndo_stop. In the parent commit > they were defined but never called. > > The patch also makes three related changes: > > - mlx5_nodnic_disable_port() now returns int instead of void. > - A new mlx5_nodnic_quiesce_port() calls pci_clear_master() on the whole > function when the VSC port disable fails. > - mlx5_nodnic_enable_port() is relied on to restore bus mastering on the > next open. > > Could the commit message describe these port enable/disable and bus > mastering changes? > >> diff --git a/drivers/net/ethernet/mellanox/mlx5/nodnic/en.c b/drivers/net/ethernet/mellanox/mlx5/nodnic/en.c >> new file mode 100644 >> index 0000000000000..6400e100bcb10 >> --- /dev/null >> +++ b/drivers/net/ethernet/mellanox/mlx5/nodnic/en.c > > [ ... ] > >> +static void mlx5_nodnic_handle_err_cqe(struct mlx5_nodnic_cq *cq, >> + struct mlx5_cqe64 *cqe64, >> + int napi_budget) >> +{ > > [ ... ] > >> + if (opcode == OPCODE_CQ_SEND_ERR) { >> + struct mlx5_nodnic_sq *sq = &priv->sq; >> + u16 sq_pi = mlx5_nodnic_sq_get_pi(sq, wqe_counter); >> + >> + mlx5_nodnic_complete_send_wqe(sq, &sq->wqe_info[sq_pi], >> + napi_budget); >> + } else { >> + struct mlx5_nodnic_rq *rq = &priv->rq; >> + u16 ci = wqe_counter & (rq->ring.num_entries - 1); >> + >> + mlx5_nodnic_release_rx_wqe(rq, ci); >> + } >> +} > > [Severity: Medium] > If the device moves the SQ or RQ into an error state after a completion > error, does anything recover it? > > mlx5_nodnic_handle_err_cqe() prints the CQE and then completes or > releases only the one slot. It records no queue error state and > schedules no recovery. The syndrome table includes WR_FLUSH_ERR. Under > mlx5 semantics that syndrome only appears once a queue is already in > the error state and flushing. > > On the TX side, mlx5_nodnic_complete_send_wqe() credits flush > completions as if they were successful sends. The txq keeps waking and > xmit keeps posting into the errored SQ while the carrier stays up. > > If the SQ stops completing instead, the txq stays stopped forever. > mlx5_nodnic_netdev_ops has no ndo_tx_timeout, so the watchdog never > fires. > > On the RX side, mlx5_nodnic_napi_poll() refills every freed slot on > each poll, with no queue health check: > > if (!mlx5_nodnic_rq_post_wqes(priv)) > return budget; > > Wouldn't each reposted WQE come straight back as a RECV_ERR CQE that > counts toward rx_work_done? That would keep NAPI and the IRQ busy > without ever receiving a packet, until a manual ifdown/ifup. > > mlx5e recovers from MLX5_CQE_REQ_ERR by moving the SQ through > ERR->RST->RDY. The health monitoring patch later in this series only > polls firmware health. > > Is the nodnic firmware guaranteed not to put the queue into an error > state here, or does this need a recovery path? We don't implement error recovery in this series. On an error CQE the driver only logs it and releases the slot. > > [ ... ] > >> +int mlx5_nodnic_napi_poll(struct napi_struct *napi, int budget) >> +{ > > [ ... ] > >> + while (true) { >> + cqe = mlx5_nodnic_cq_get_cqe(cq); >> + if (!cqe) >> + break; >> + >> + /* RX and TX share the CQ. With budget == 0 (netpoll) only TX >> + * completions may be processed, leave RX CQEs in place. >> + */ >> + if (unlikely(!budget) && mlx5_nodnic_cqe_is_rx(cqe)) >> + break; > > [Severity: Medium] > With budget == 0, can an RX CQE at the head of the shared CQ block every > TX completion behind it? > > The CQ is consumed strictly in order, so this break leaves cq->cc on the > RX CQE. The send CQEs after it are never reached, > mlx5_nodnic_sq_publish_cc() has nothing to publish, and sq->cc does not > advance. > > During a panic with netconsole, NAPI and softirq can't run. Any inbound > frame that lands at the head, such as a broadcast ARP, stops TX reclaim > permanently. The failure would go like this: > > - BQL or the SQ ring fills. > - mlx5_nodnic_xmit() sees no room. > - __netpoll_send_skb() retries netpoll_poll_dev() until it gives up. > - The skb is queued on npinfo->txq for a workqueue that won't run. > > Wouldn't the rest of the panic output be lost? > > bnxt handles budget 0 on its shared completion ring by discarding RX > completions with bnxt_force_rx_discard(), so it can reach the TX > completions behind them. Would something similar work here? SQ and RQ use a shared CQ by design, consumed in order, so a head-of-line RX CQE can delay TX completions under netpoll. Known limitation for now. > > [ ... ] > >> +netdev_features_t >> +mlx5_nodnic_check_features(struct sk_buff *skb, struct net_device *netdev, >> + netdev_features_t features) >> +{ >> + features = vlan_features_check(skb, features); >> + >> + /* Validate if the tunneled packet is being offloaded by HW */ >> + if (skb->encapsulation && (features & NETIF_F_CSUM_MASK)) >> + return features & ~NETIF_F_CSUM_MASK; > > [Severity: Low] > This isn't a bug, but this comment appears to be copied from > mlx5e_features_check(). There it is followed by a call to > mlx5e_tunnel_features_check(). > > Here nothing is validated. Checksum offload is cleared for every > encapsulated skb. That behaviour is correct, since > mlx5_nodnic_tx_build_wqe_eseg() only sets outer L3/L4 checksum flags. > > Could the comment say that tunnel checksum offload isn't supported? Will fix the comment. > >> diff --git a/drivers/net/ethernet/mellanox/mlx5/nodnic/en_cfg.c b/drivers/net/ethernet/mellanox/mlx5/nodnic/en_cfg.c >> index 79cd2527966c4..243c720b73b63 100644 >> --- a/drivers/net/ethernet/mellanox/mlx5/nodnic/en_cfg.c >> +++ b/drivers/net/ethernet/mellanox/mlx5/nodnic/en_cfg.c > > [ ... ] > >> +static int mlx5_nodnic_activate_queues(struct mlx5_nodnic_core_dev *dev) >> +{ > > [ ... ] > >> + mlx5_nodnic_activate_sq(dev); >> + >> + napi_enable_locked(&cq->napi); >> + mlx5_nodnic_arm_cq(cq); >> + napi_schedule(&cq->napi); > > [Severity: Low] > Is the mlx5_nodnic_arm_cq() call here needed? > > Once napi_enable_locked() has run, a busy-poll socket still holding the > napi_id from a previous session can run mlx5_nodnic_napi_poll() on > another CPU. That poll updates cq->cc and may call mlx5_nodnic_arm_cq() > itself after napi_complete_done(). > > Meanwhile this process-context arm reads cq->cc and cq->arm_sn. It then > writes cq->dbr.db[1] and the CQ doorbell, and nothing serializes the > two arms. mlx5_nodnic_cq_irq_handler() also increments cq->arm_sn. > > include/linux/mlx5/doorbell.h notes that mlx5_write64() is not atomic on > 32-bit and needs external locking. > > The practical effect looks limited to a stale arm or a spurious > interrupt. napi_schedule() follows right away, and the poll re-arms when > it completes. Could this arm be dropped, or moved before > napi_enable_locked()? >