From: Tariq Toukan <tariqt@nvidia.com>
To: Alok Tiwari <alok.a.tiwari@oracle.com>,
tariqt@nvidia.com, andrew+netdev@lunn.ch, kuba@kernel.org,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
horms@kernel.org, netdev@vger.kernel.org
Cc: alok.a.tiwarilinux@gmail.com
Subject: Re: [PATCH net-next] mlx4: correct error reporting in mlx4_master_process_vhcr()
Date: Mon, 13 Apr 2026 23:13:07 +0300 [thread overview]
Message-ID: <78b617a1-fe03-4d52-953c-29ce72143bc2@nvidia.com> (raw)
In-Reply-To: <20260409092754.508880-1-alok.a.tiwari@oracle.com>
On 09/04/2026 12:27, Alok Tiwari wrote:
> mlx4_master_process_vhcr() logs vhcr->errno on failures, but this field
> is never populated by the PF path. As a result, all failures are reported
> with errno 0 and err print in status case which is misleading.
>
> Use the actual return value (err) instead, translate it to FW status
> before logging, and report both values.
>
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
> drivers/net/ethernet/mellanox/mlx4/cmd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c
> index de0193d82ec1..bdaf152e6712 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/cmd.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c
> @@ -1782,6 +1782,7 @@ static int mlx4_master_process_vhcr(struct mlx4_dev *dev, int slave,
> }
>
> if (err) {
> + vhcr_cmd->status = mlx4_errno_to_status(err);
> if (!(dev->persist->state & MLX4_DEVICE_STATE_INTERNAL_ERROR)) {
> if (vhcr->op == MLX4_CMD_ALLOC_RES &&
> (vhcr->in_modifier & 0xff) == RES_COUNTER &&
> @@ -1791,9 +1792,8 @@ static int mlx4_master_process_vhcr(struct mlx4_dev *dev, int slave,
> slave, err);
> else
> mlx4_warn(dev, "vhcr command:0x%x slave:%d failed with error:%d, status %d\n",
> - vhcr->op, slave, vhcr->errno, err);
> + vhcr->op, slave, err, vhcr_cmd->status);
> }
> - vhcr_cmd->status = mlx4_errno_to_status(err);
> goto out_status;
> }
>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Thanks.
next prev parent reply other threads:[~2026-04-13 20:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 9:27 [PATCH net-next] mlx4: correct error reporting in mlx4_master_process_vhcr() Alok Tiwari
2026-04-13 20:13 ` Tariq Toukan [this message]
2026-04-13 21:30 ` patchwork-bot+netdevbpf
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=78b617a1-fe03-4d52-953c-29ce72143bc2@nvidia.com \
--to=tariqt@nvidia.com \
--cc=alok.a.tiwari@oracle.com \
--cc=alok.a.tiwarilinux@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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