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=1796060668; b=plxbG7ZhxFMY1JhCNf4oOMlpFLf7MUMXVhMQ4va71Am91AwhOuC2agymE5v8c5YxLKw8 FwW/wXxuA9Wmgi1qSEULUjhYF6BFUMYfnCrWgoNgpNQtJvZJ62hFeQA+hOd6hVkPSa2+n WiFYzOnt29M7rK8Kt4aHETVmYnhwxQOmpyKJGLIts444yT2Pup9RlBPkD3nfNwnPgAo3K jfpjaRbKDn8QUm7fovQs2nOmXDoP/xzaffNtImbSdGEavRRQwWm4HPf8el8pw54G9UM/0 b+TQfcAoK9mgnwePEs5RjJRbeyNDdF8jJiMW5U26b5IThATRfF4O+Eb2QMbWuYpLWPg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796060668; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=3a1Cq17ykGxwJqimZjXwpETB0ByCR0dQ6E0zrdHuy9Q=; b=dSuUsFZpNysDBknvAMwvdKFDGjJZ7BREhfj/SLeUZREBuVxHlplH3wULKUlY6PrZao6w TIhZyanBN728pnYVxKaB6/FcseV9PCpFJEkQk38g+CjSR8RLW/hTJBO4dgXGWVigkLF3I 7Kwwz05iCVob+XSn3ykrlZfRruOQJVV6z4pMAzAHiMuTJw9dxVQ5pe6kussfmmC7Av+PV yjTpAxDT9nUfkJRa5QtHx5b7QWCdeMhuqg8v59JJmwXh58+lEWd1GGPMmAlRrBAcKZ0dm C7KoOr/XhDYwVYgkZ/un/JsYV/yhcmqdVdojQUsqHauqQk8yF4eNiwXF9JjEIwQ+avA== 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=Vfpr2CqE; 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 E3CA5606A31C for ; Mon, 30 Nov 2026 17:44:27 +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=Vfpr2CqE Received: by smtp.kernel.org (Postfix) with ESMTPSA id 339CA1F00896; Mon, 30 Nov 2026 17:44:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796060667; bh=3a1Cq17ykGxwJqimZjXwpETB0ByCR0dQ6E0zrdHuy9Q=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Vfpr2CqEIJ+yDJfcUMSX++raVkA49153TrrPe9j95hzdOZFb9ed7F+sOEqr9TtPvk zB+v9HWJaBsAmn5Qzeeh8AbMpr2idqN58gfVM006hvz3lIfL6qFoIjG8f9dDsSrD3U Q0+3w0p9LCpgs2Jy5xZqgd5MxAaP1i2c3PqTJTD82pQ0KvMvb6ozneFmwfuwFYujWn AN3KUSsdzgP+6DgqGx62pvzXge0MebhwUXWwLM51xAGu3bSi7CNfx/4K4JDI7R9GbV 4I52m3WEiThuxkSOkkyKQq3jCgb3GIwXjZcz43KIGthFmzUlvmtCIvpCLZGluQWRNA +jQ1FH8sTlPCA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH V3 rdma-next 06/21] RDMA/mlx5: Reject QP transport types not enabled by FW capability Reply-To: sashiko-reviews@lists.linux.dev To: "Yishai Hadas" Cc: linux-rdma@vger.kernel.org In-Reply-To: <20261129174146.34295-7-yishaih@nvidia.com> References: <20261129174146.34295-1-yishaih@nvidia.com> <20261129174146.34295-7-yishaih@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 30 Nov 2026 17:44:26 +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 1 potential issue to consider: - [Low] RDMA/mlx5: check_qp_type() uses dev->mdev instead of mdev for rc/uc/ud caps -- commit 907152164d83f67ba2e02d4f5f693e13d2ac393d Author: Yishai Hadas RDMA/mlx5: Reject QP transport types not enabled by FW capability This commit updates check_qp_type() to verify the firmware rc, uc, and ud capability bits before allowing IB_QPT_RC, IB_QPT_UC, and IB_QPT_UD QP creation. > diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5= /qp.c > index 9bbd3c506b9f4..49e3e683b68b3 100644 > --- a/drivers/infiniband/hw/mlx5/qp.c > +++ b/drivers/infiniband/hw/mlx5/qp.c > @@ -2841,15 +2841,24 @@ static int check_qp_type(struct ib_qp *ibqp, stru= ct ib_qp_init_attr *attr, > case IB_QPT_XRC_INI: > if (!MLX5_CAP_GEN(mdev, xrc)) > goto out; > - fallthrough; > + break; > case IB_QPT_RC: > + if (!MLX5_CAP_GEN(dev->mdev, rc)) > + goto out; > + break; > case IB_QPT_UC: > + if (!MLX5_CAP_GEN(dev->mdev, uc)) > + goto out; > + break; > + case IB_QPT_UD: > + if (!MLX5_CAP_GEN(dev->mdev, ud)) > + goto out; > + break; [Severity: Low] Should these new MLX5_CAP_GEN() checks pass the local mdev instead of dev->mdev? check_qp_type() resolves mdev =3D qp_to_mdev(ibqp) at the top of the function, as converted by commit 582902d8df8f ("RDMA/mlx5: Select the QP core device through its PD"), and uses mdev for the dct and xrc capability checks right above. Using dev->mdev here bypasses qp_to_mdev(ibqp). --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261129174146.3429= 5-1-yishaih@nvidia.com?part=3D6