From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796487008; b=Xscx0P59gA8BCCpYQPN0+RLwN5Ek5ms6Dh/JO00m9tXURKEC5THUSBkn9jwvyyTKDeo9 U/KSsrBw6IKV9TSvgLcC7DUm7GL8Yuljip6QJKHCocQCH/vEXHRIVW7M5vpOJdYGbFRCd wovgwjlqwsW5GU69KZaSAhTxPTPsTNjVJFpd47Umcl+lvSizYQLakn6DWr8KnoGxgEJnN bWKubdtko6Yth5k8MwYgbB5GdQXfHNpLOiqfwfr+tf7qeYu92ROhGcDtI+cn2mdi7lBzy tEEw4RdWOE2qYNs7ZXeY22Aksi4m2xvwR3Wh0YObE2917fp9xhgg3RHusl9xlFvAeuA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796487008; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=6btADdYh5/gaP3I9L9H3bFXWn1SqVJBX0MFd8c3OSE8=; b=htnyjLBld7uc88pkfr0h/f+BUMNuz82zhpoxcMPlmgUVELYzaIA16krgmh6QWr/7/dq2 66cSrgYUfUF+J/BPdIverPAYTYD7iEnnFJ14yzBfJC5UkI6bzeslBOBlyf3BAiS4PAOSW 9+9bq250L6KcTr4tYjYWd12JN2mWehbnQeSvCKju+VmZbLPvOkvdpevK9RBAUGt2Rvb/Z VAnCpORkl1wUv2hJMcIVSXBjhDSg7P0swULGb80w97ov3xw91GfdADekw/8QXbo7Ec9ai CLEsDseFQHmc5hYlyU50m0P6XZZCxaa4YACXrAhGROlB6fHbYHVrNFBww26Gw908cLw== 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=ei1W+vNW; arc=none smtp.remote-ip=100.103.45.18 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 0DA11606A333 for ; Sat, 5 Dec 2026 16:10:08 +0000 (UTC) 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=ei1W+vNW Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8C5D1F00A12; Sat, 5 Dec 2026 16:10:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796487007; bh=6btADdYh5/gaP3I9L9H3bFXWn1SqVJBX0MFd8c3OSE8=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=ei1W+vNWdFkNIrCuQ/3TnJKkjeiXHp+jQh2lhviFo8atnPUJtR55a7cN4NBvJwCmp I+YYTXxvvt+HEg0P7sNgeHzVdcZ1bb1PhznfvpLMnN7Ul5bytVaKJjVs+Ry7uNxMY6 hF9Awt3j4qtCqxZif+UPdUHjD2GjDwBCQUbXETCBj5o6S/QWi3oR3snXSHf4/QmF9B gji/U026GgPXSe7OyRjwXJP6+zUvXpKscmJbDOZTstjFLIFk3cOIghZiLpnUnzz7b9 g78sbxtXPPdTcte9ebIrLTwDUAcDMEFgd5CF7nzR8w+s1nWzlExsUlxiw/rzEkfMOx tXO5kZC3vL4Jg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [RDMA v2 03/13] RDMA/bng_re: Add support verbs Reply-To: sashiko-reviews@lists.linux.dev To: "Siva Reddy Kallam" Cc: linux-rdma@vger.kernel.org In-Reply-To: <20261204155249.1002019-4-siva.kallam@broadcom.com> References: <20261204155249.1002019-1-siva.kallam@broadcom.com> <20261204155249.1002019-4-siva.kallam@broadcom.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 16:10:07 +0000 X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 5 potential issues to consider: - [Medium] RDMA/bng_re: bng_re_query_device() ignores udata instead of ib_no_udata_io() - [Low] RDMA/bng_re: missing MAINTAINERS entry for include/uapi/rdma/bng_re-abi.h - [Low] RDMA/bng_re: commit message lists absent bng_re_process_mad() - [Low] RDMA/bng_re: unlocked plain read of netdev->mtu in bng_re_query_port() - [Low] RDMA/bng_re: unused static const bng_re_dev_ops breaks W=3D1 builds -- commit 0d67aa9f4a9f7c944ce5b1c43677b8883c5379ce Author: Usman Ansari > RDMA/bng_re: Add support verbs > > This patch adds below verbs. > - bng_re_query_device > - bng_re_modify_device > - bng_re_query_fw_str > - bng_re_query_port > - bng_re_get_link_layer > - bng_re_get_port_immutable > - bng_re_process_mad > - bng_re_query_pkey > > Signed-off-by: Usman Ansari > Signed-off-by: Siva Reddy Kallam [Severity: Low] Does the commit message match what this patch actually changes? The list includes bng_re_process_mad, which is neither implemented nor wired into bng_re_dev_ops. The message also omits the new UAPI header include/uapi/rdma/bng_re-abi.h, the RDMA_DRIVER_BNG_RE addition in include/uapi/rdma/ib_user_ioctl_verbs.h, and the rename of max_qp_wqes to max_sq_wqes in bng_sp.c and bng_sp.h. [ ... ] > diff --git a/drivers/infiniband/hw/bng_re/bng_dev.c b/drivers/infiniband/= hw/bng_re/bng_dev.c > index f5b80b1129ad6..bb29c0f0b2bac 100644 > --- a/drivers/infiniband/hw/bng_re/bng_dev.c > +++ b/drivers/infiniband/hw/bng_re/bng_dev.c [ ... ] > @@ -17,11 +18,25 @@ > #include "bng_debugfs.h" > #include "bng_re_mpc_roce.h" > #include "bng_xid.h" > +#include "bng_verbs.h" > =20 > MODULE_AUTHOR("Siva Reddy Kallam "); > MODULE_DESCRIPTION(BNG_RE_DESC); > MODULE_LICENSE("Dual BSD/GPL"); > =20 > +static const struct ib_device_ops bng_re_dev_ops =3D { > + .owner =3D THIS_MODULE, > + .driver_id =3D RDMA_DRIVER_BNG_RE, > + .uverbs_abi_ver =3D BNG_RE_ABI_VERSION, > + .query_device =3D bng_re_query_device, > + .modify_device =3D bng_re_modify_device, > + .get_dev_fw_str =3D bng_re_query_fw_str, > + .query_port =3D bng_re_query_port, > + .get_link_layer =3D bng_re_get_link_layer, > + .get_port_immutable =3D bng_re_get_port_immutable, > + .query_pkey =3D bng_re_query_pkey, > +}; [Severity: Low] Will this unused static const bng_re_dev_ops break W=3D1 builds with CONFIG_WERROR=3Dy? Nothing in bng_dev.c references bng_re_dev_ops until commit "RDMA/bng_re: Register with ib-core" passes it to ib_set_device_ops(), so W=3D1 builds emit -Wunused-const-variable across intermediate patches in the series. Deferring the definition to that commit, or marking it __maybe_unused until then, keeps every patch bisect-clean. [ ... ] > diff --git a/drivers/infiniband/hw/bng_re/bng_verbs.c b/drivers/infiniban= d/hw/bng_re/bng_verbs.c > new file mode 100644 > index 0000000000000..6750dfa4a1680 > --- /dev/null > +++ b/drivers/infiniband/hw/bng_re/bng_verbs.c [ ... ] > +int bng_re_query_device(struct ib_device *ibdev, > + struct ib_device_attr *ib_attr, > + struct ib_udata *udata) > +{ > + struct bng_re_dev *rdev =3D to_bng_re_dev(ibdev, ibdev); > + struct bng_re_dev_attr *dev_attr =3D rdev->dev_attr; [Severity: Medium] Should bng_re_query_device() call ib_no_udata_io(udata) instead of ignoring udata? ib_uverbs_ex_query_device() passes user-supplied driver_udata directly to query_device(). Without ib_no_udata_io(udata), non-zero provider input is silently accepted instead of returning -EOPNOTSUPP, and any provider output buffer is left unzeroed, locking broken udata semantics into ABI version 1. Once all udata-taking ops follow the udata helpers, bng_re_dev_ops should also set .uverbs_robust_udata =3D true per commit 613713f251c8 ("RDMA: Add IB_UVERBS_CORE_SUPPORT_ROBUST_UDATA"). [ ... ] > +int bng_re_query_port(struct ib_device *ibdev, u32 port_num, > + struct ib_port_attr *port_attr) > +{ > + struct bng_re_dev *rdev =3D to_bng_re_dev(ibdev, ibdev); > + struct bng_re_dev_attr *dev_attr =3D rdev->dev_attr; > + int rc; [ ... ] > + port_attr->max_mtu =3D IB_MTU_4096; > + port_attr->active_mtu =3D iboe_get_mtu(rdev->netdev->mtu); [Severity: Low] Can this plain read of rdev->netdev->mtu race with concurrent MTU updates? bng_re_query_port() runs without rtnl_lock(), while __netif_set_mtu() updates dev->mtu via WRITE_ONCE() and expects lockless readers to pair with READ_ONCE(). Using READ_ONCE(rdev->netdev->mtu) avoids a KCSAN data race and potential load tearing. [ ... ] > diff --git a/include/uapi/rdma/bng_re-abi.h b/include/uapi/rdma/bng_re-ab= i.h > new file mode 100644 > index 0000000000000..cea056dc8610d > --- /dev/null > +++ b/include/uapi/rdma/bng_re-abi.h > @@ -0,0 +1,12 @@ > +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-= Clause) */ > +/* Copyright (c) 2025 Broadcom */ > + > +#ifndef __BNG_RE_UVERBS_ABI_H__ > +#define __BNG_RE_UVERBS_ABI_H__ > + > +#include > +#include > + > +#define BNG_RE_ABI_VERSION 1 > + > +#endif /* __BNG_RE_UVERBS_ABI_H__*/ [Severity: Low] Should this new UAPI header also be added to MAINTAINERS? The BROADCOM 800 GIGABIT ROCE DRIVER section in MAINTAINERS only lists drivers/infiniband/hw/bng_re/, so scripts/get_maintainer.pl will not map patches touching include/uapi/rdma/bng_re-abi.h to the driver maintainer. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204155249.1002= 019-1-siva.kallam@broadcom.com?part=3D3