From: sashiko-bot@kernel.org
To: "Tariq Toukan" <tariqt@nvidia.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] net/mlx5e: Add DCB_CAP_DCBX_LLD_MANAGED support in setdcbx
Date: Mon, 12 Oct 2026 11:29:45 +0000 [thread overview]
Message-ID: <sashiko-outbox-168016@kernel.org> (raw)
In-Reply-To: <20261011112900.802150-3-tariqt@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] net/mlx5e: DCBX capabilities update silently ignored and LLD_MANAGED missing on boot
--
commit 64b98b95142563c858de976f308b2006891e9c00
Author: Alexei Lazar <alazar@nvidia.com>
net/mlx5e: Add DCB_CAP_DCBX_LLD_MANAGED support in setdcbx
Add support for DCB_CAP_DCBX_LLD_MANAGED, which indicates that DCBX
negotiation is performed by the firmware/LLD agent rather than the host.
When DCB_CAP_DCBX_LLD_MANAGED is requested, switch to
firmware-controlled DCBX mode.
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
> index 4eef929f5ae9b..68deedb6f82ec 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
> @@ -439,9 +439,6 @@ static u8 mlx5e_dcbnl_setdcbx(struct net_device *dev, u8 mode)
> struct mlx5e_dcbx *dcbx = &priv->dcbx;
> enum mlx5_dcbx_oper_mode target_mode;
>
> - if (mode & DCB_CAP_DCBX_LLD_MANAGED)
> - return 1;
> -
[Severity: Medium]
If a user issues a setdcbx request to modify capabilities (like CEE/IEEE)
but keeps the same DCB_CAP_DCBX_HOST bit, target_mode won't change. Will
this cause the function to return 0 early and skip the dcbx->cap update?
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c:mlx5e_dcbnl_setdcbx() {
target_mode = new_is_host ? MLX5E_DCBX_PARAM_VER_OPER_HOST :
MLX5E_DCBX_PARAM_VER_OPER_AUTO;
if (dcbx->mode == target_mode)
return 0;
...
dcbx->cap = mode;
}
This appears to be a functional regression introduced when the switch-to-host
and switch-to-auto logic was folded into one path.
Additionally, since DCB_CAP_DCBX_LLD_MANAGED is now supported, does the
initialization logic need to be updated to report it in AUTO mode on boot?
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c:mlx5e_dcbnl_initialize() {
priv->dcbx.cap = DCB_CAP_DCBX_VER_CEE |
DCB_CAP_DCBX_VER_IEEE;
if (priv->dcbx.mode == MLX5E_DCBX_PARAM_VER_OPER_HOST)
priv->dcbx.cap |= DCB_CAP_DCBX_HOST;
...
}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261011112900.802150-1-tariqt@nvidia.com?part=2
next prev parent reply other threads:[~2026-10-12 11:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 11:28 [PATCH net-next 0/2] net/mlx5e: Align setdcbx with DCBX capability flags Tariq Toukan
2026-10-11 11:28 ` [PATCH net-next 1/2] net/mlx5e: Select DCBX HOST/AUTO from capability flags in setdcbx Tariq Toukan
2026-10-12 11:29 ` sashiko-bot
2026-10-12 12:10 ` netdev-bot+sashiko
2026-10-11 11:29 ` [PATCH net-next 2/2] net/mlx5e: Add DCB_CAP_DCBX_LLD_MANAGED support " Tariq Toukan
2026-10-12 11:29 ` sashiko-bot [this message]
2026-10-12 12:10 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-168016@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tariqt@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox