Article View: linux.kernel.netdev
Article #12572Re: [PATCH rdma-next 07/23] RDMA/mlx5: Derive mlx5_ib_adversarial_mode global from mlx5_core adversarial API
From: netdev-bot+sashiko
Date: Sat, 07 Nov 2026 20:24
Date: Sat, 07 Nov 2026 20:24
48 lines
9733 bytes
9733 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message does not describe the code correctly.
--
RDMA/mlx5: Derive mlx5_ib_adversarial_mode global from mlx5_core adversarial API
This commit adds a global bool mlx5_ib_adversarial_mode to the mlx5_ib
driver. mlx5_ib_init() sets it from mlx5_is_adversarial(). The flag is
declared extern in mlx5_ib.h so that other files in the driver can read it.
> Use the mlx5_core mlx5_is_adversarial() exported API to set a
> module-level static bool mlx5_ib_adversarial_mode at init time,
> instead of a per-device bit field. This avoids propagating the flag
> through every mlx5_ib_dev pointer and makes the module-wide policy
> clear at the call sites.
[Severity: Low]
Is "static" the right word here? The patch adds a non-static global in
drivers/infiniband/hw/mlx5/main.c:
bool mlx5_ib_adversarial_mode;
and makes it visible to the rest of the driver in
drivers/infiniband/hw/mlx5/mlx5_ib.h:
extern bool mlx5_ib_adversarial_mode;
Later in the series the variable stays non-static, and umr.c and cq.c
read it. That is why it can't be static.
The text "instead of a per-device bit field" also seems to point at
something that isn't in the tree. No adversarial field exists under
drivers/infiniband/ before this patch, and the patch only adds lines. Is
this a leftover from an earlier, unmerged version of the series?
Could the message instead say that the patch adds a driver-wide global,
shared through mlx5_ib.h, that caches mlx5_is_adversarial() in
mlx5_ib_init()?
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261103163949.1554-1-yishaih%40nvidia.com
Technical Details
Message-ID:
<179408308880.994134.16800694809832426795@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358504-linux-kernel-netdev=dewy.ruReferences:
<20261103163949.1554-8-yishaih@nvidia.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358504-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH rdma-next 07/23] RDMA/mlx5: Derive mlx5_ib_adversarial_mode global from mlx5_core adversarial API Date: Sat, 07 Nov 2026 20:24:48 +0000 Organization: Usenet Network Message-ID: <179408308880.994134.16800694809832426795@kernel.org> References: <20261103163949.1554-8-yishaih@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="4186544"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ZKCnxw3FPg8XG7BU14+pn085iy4= sha256:fDjWwgAFTHAage4obPeL9wthrHro58iosHyr04MoMj0= sha1:/vxRkcNOcmDJd4RWglQ7B+/4vDY= sha256:MFHNfAldYMHyYmm2aZsk6gkRJpDSuiPimAkKBiEIaSw= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 6A6D91134A6; Sat, 7 Nov 2026 23:27:41 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tbAkm5I0xXQt; Sat, 7 Nov 2026 23:27:38 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-358504-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id C50AC1134A0; Sat, 7 Nov 2026 23:27:29 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id AC5BB46AA9; Sat, 7 Nov 2026 20:24:51 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794083091; b=h+FBP85P5rpk0yu/215bjoGfSLMu89db+0FX620a0HFZj3Ui9WKSJlhUgqNQ9Dv+xS+V dPuq4tk3mTKaNJy98xoc6+fsEZyRTNaR9vDJ7qElPDjFr+27BQyvFoT8fK0Awq/cPBvF9 4oVmsC9Znlr+F8M9HEDZvVQW1EDN+UPevL4s1mCUGvDEklFXDmL+nQnTtciysI5NYzDvu grZVFPW4h4pEFfL5IX46tapsGgbV7UvbV7zyQDdvZfJkJ4RuClF8G4xDZiovzPIXgyBhO Yzrzio+Y+nDADGkIKfKJXHmu0M29oWrVk/8wpbqBxoZETjUxGpaWQVpImh4DagxAeng== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794083091; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=pu1pe8eDqY/kb7H7Vv4RY02+044IW1jA59qA22PzvKc=; b=NXNpXZLwNoNXBJ/YnbycjgniKLvMfdPJ7adY7oAPenjv9YCn+kD0i0jztAfEh+94VrMZ DFEXNK9N2BGsUmLutN6eUjE4nkaNXR52/2P7a5j98Muc4OmqzjiQb7Q9Pwl5c59l/6fZH jh7bfuGU6fCumTO2xJqjGP5ELvq4GKdDbASXOYHcoLeGe5pMoI6AQhcYNJXBlfO7ssMUM kZF+iW3LXaf5zI1yZQfEc7FUBND0CHH696kUOBb2H6vyjQVLAddF4uUL3qFdKYYI9tUEd RDnUrnbQ79wNHGgcktZZ6rn8AhNqMQ0usAhb+0TwkV0kcL5hQ3AcFF9t6n530EOvBNQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VhjjRP9d; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81896606A334; Sat, 7 Nov 2026 20:24:51 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VhjjRP9d X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794083090; b=sjAiIHj0huegilVTHLmTm4Yvz857GwOL2h0yqdl7CfMeY7kg/E2zTKm7DwRlUj7GexkM zdLH96SQTFX3YDGodpUj3xk6F7l2oD94lfBJyjNWUjIYxnbwEaMf2vqHX8eaaV9oVuF1V wKHiUNyRVwxvFsT6hc3lhMfH1V+DUFUlqS8V7cpCAKs5ntYzEsog4koC6g+f/+mgeq7Z8 nFI4m/Yi8eMqKoQynG+aWOSHP9dEcMlHfIMIhunNT+ZKIm8iF+bBt837Z8AqVroSNDLs3 bGtMBV6yRFfcqsXYaWE4pqhGh1vz8zd7fcBa+8yzkda3qWxZNakPq9OU8Zcuv0ZcA8w== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794083090; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=pu1pe8eDqY/kb7H7Vv4RY02+044IW1jA59qA22PzvKc=; b=NPCLSfDu+NSzW+VBiAxI6jEPX5X9Mr6nxxIhuAsEvsDj4AKHHe3Nm/+CSvVoriCNnQ0y kGOiS0aSNnKeCo3llC1kLjn6XBgwmXJYVHfW62gSBb+9A7CNwohozWehqQkgsgDFNSjG7 ZZ8ufwI1FHy9Cc2SB1+sxpBXVd/mZ7MLnWcgCO8IPDLOPbM5cjSTDX5mftN4T+QHgzAyM GXKl+cJfNhh2JIrwbb3UNUmlAMbqn5fpqeMG3gDOFuBw3xRBRykx46jf6G4qZedP2rsU4 QhK/hkBkimm2/My4oELnREeUbIi8kWV9PXsdehBJLZQlZeeM+Fu8F0ghgmFdUE5th/g== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VhjjRP9d; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60EBB606A32D; Sat, 7 Nov 2026 20:24:50 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 380ED1F008A2; Sat, 7 Nov 2026 20:24:49 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794083090; bh=pu1pe8eDqY/kb7H7Vv4RY02+044IW1jA59qA22PzvKc=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=VhjjRP9dGGaEv7BFSz7CCOWiHyrewdkdgJ7gVkdyEu6o0q3M4p418xJ6QHnh7wEWC osVPntetU/XFdGL6FuIlN0zPvHRgBWlcdQn7jPjQDiupCemKRF51EB631cPiTX8IR+ iNPMeARl2bzFieS8wD0hfB/3c+VzJLYKfzYtRaXAz0ts07iKoVBXuFvCOd9d9WQLaS 7CoD9cUA+K7ZG/A+V84DcuKLzE/l47noY1MtmG9G4SjkUzIiAr/1v82UfdX9Hy4HjM BOcCDnSiuAnUvzFrlvEv3CReW/GmRmcIfnmNV2Ydm9Yr1M2GSGzq6FBgT2rQi2VdjV 73gwQXQNFRmoA== X-Cc: jgg@ziepe.ca, leon@kernel.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, saeedm@nvidia.com, tariqt@nvidia.com, mbloch@nvidia.com, kuba@kernel.org, pabeni@redhat.com, edumazet@kernel.org, davem@davemloft.net, andrew+netdev@lunn.ch, dtatulea@nvidia.com, moshe@nvidia.com, maorg@nvidia.com X-In-Reply-To: <20261103163949.1554-8-yishaih@nvidia.com> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list