From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: Tariq Toukan <tariqt@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Saeed Mahameed <saeedm@nvidia.com>, Gal Pressman <gal@nvidia.com>,
Leon Romanovsky <leonro@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org,
Shahar Shitrit <shshitrit@nvidia.com>,
Moshe Shemesh <moshe@nvidia.com>
Subject: Re: [PATCH net-next 3/4] net/mlx5: Expose crr in health buffer
Date: Thu, 27 Feb 2025 06:56:39 +0100 [thread overview]
Message-ID: <Z7/+lxTndCRC6OtE@mev-dev.igk.intel.com> (raw)
In-Reply-To: <20250226122543.147594-4-tariqt@nvidia.com>
On Wed, Feb 26, 2025 at 02:25:42PM +0200, Tariq Toukan wrote:
> From: Shahar Shitrit <shshitrit@nvidia.com>
>
> Expose crr bit in struct health buffer. When set, it indicates that
> the error cannot be recovered without flow involving a cold reset.
> Add its value to the health buffer info log.
>
> Signed-off-by: Shahar Shitrit <shshitrit@nvidia.com>
> Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/health.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
> index 665cbce89175..c7ff646e0865 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
> @@ -96,6 +96,11 @@ static int mlx5_health_get_rfr(u8 rfr_severity)
> return rfr_severity >> MLX5_RFR_BIT_OFFSET;
> }
>
> +static int mlx5_health_get_crr(u8 rfr_severity)
> +{
> + return (rfr_severity >> MLX5_CRR_BIT_OFFSET) & 0x01;
> +}
> +
> static bool sensor_fw_synd_rfr(struct mlx5_core_dev *dev)
> {
> struct mlx5_core_health *health = &dev->priv.health;
> @@ -442,12 +447,15 @@ static void print_health_info(struct mlx5_core_dev *dev)
> mlx5_log(dev, severity, "time %u\n", ioread32be(&h->time));
> mlx5_log(dev, severity, "hw_id 0x%08x\n", ioread32be(&h->hw_id));
> mlx5_log(dev, severity, "rfr %d\n", mlx5_health_get_rfr(rfr_severity));
> + mlx5_log(dev, severity, "crr %d\n", mlx5_health_get_crr(rfr_severity));
> mlx5_log(dev, severity, "severity %d (%s)\n", severity, mlx5_loglevel_str(severity));
> mlx5_log(dev, severity, "irisc_index %d\n", ioread8(&h->irisc_index));
> mlx5_log(dev, severity, "synd 0x%x: %s\n", ioread8(&h->synd),
> hsynd_str(ioread8(&h->synd)));
> mlx5_log(dev, severity, "ext_synd 0x%04x\n", ioread16be(&h->ext_synd));
> mlx5_log(dev, severity, "raw fw_ver 0x%08x\n", ioread32be(&h->fw_ver));
> + if (mlx5_health_get_crr(rfr_severity))
> + mlx5_core_warn(dev, "Cold reset is required\n");
I wonder if it shouldn't be right after the print about crr value to
tell the user that cold reset is required because of that value.
Patch looks fine, thanks.
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> }
>
> static int
> --
> 2.45.0
next prev parent reply other threads:[~2025-02-27 6:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 12:25 [PATCH net-next 0/4] mlx5: Trust lockdown health syndrome Tariq Toukan
2025-02-26 12:25 ` [PATCH net-next 1/4] net/mlx5: Avoid report two health errors on same syndrome Tariq Toukan
2025-02-26 12:57 ` Kalesh Anakkur Purayil
2025-02-26 12:25 ` [PATCH net-next 2/4] net/mlx5: Log health buffer data on any syndrome Tariq Toukan
2025-02-26 12:57 ` Kalesh Anakkur Purayil
2025-02-26 12:25 ` [PATCH net-next 3/4] net/mlx5: Expose crr in health buffer Tariq Toukan
2025-02-27 5:56 ` Michal Swiatkowski [this message]
2025-02-27 10:34 ` Tariq Toukan
2025-02-26 12:25 ` [PATCH net-next 4/4] net/mlx5: Add trust lockdown error to health syndrome print function Tariq Toukan
2025-02-26 12:56 ` Kalesh Anakkur Purayil
2025-02-28 9:00 ` [PATCH net-next 0/4] mlx5: Trust lockdown health syndrome 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=Z7/+lxTndCRC6OtE@mev-dev.igk.intel.com \
--to=michal.swiatkowski@linux.intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=shshitrit@nvidia.com \
--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