Netdev List
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Tariq Toukan <tariqt@nvidia.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
	Akiva Goldberger <agoldberger@nvidia.com>,
	Alexei Lazar <alazar@nvidia.com>, Alex Vesker <valex@nvidia.com>,
	Cosmin Ratiu <cratiu@nvidia.com>,
	Dragos Tatulea <dtatulea@nvidia.com>,
	Erez Shitrit <erezsh@nvidia.com>, Feng Liu <feliu@nvidia.com>,
	Gal Pressman <gal@nvidia.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Kees Cook <kees@kernel.org>, Leon Romanovsky <leon@kernel.org>,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	Mark Bloch <mbloch@nvidia.com>, Moshe Shemesh <moshe@nvidia.com>,
	Parav Pandit <parav@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>, Shay Drory <shayd@nvidia.com>,
	Vlad Dogaru <vdogaru@nvidia.com>,
	Yevgeny Kliteynik <kliteyn@nvidia.com>
Subject: Re: [PATCH net-next V2 1/5] net/mlx5: HWS, Print more details for bad completion
Date: Tue, 11 Aug 2026 16:25:38 +0100	[thread overview]
Message-ID: <20260811152538.GG51943@horms.kernel.org> (raw)
In-Reply-To: <20260810092630.3137666-2-tariqt@nvidia.com>

On Mon, Aug 10, 2026 at 12:26:26PM +0300, Tariq Toukan wrote:
> From: Yevgeny Kliteynik <kliteyn@nvidia.com>
> 
> When polling for completion returned completion with error,
> parse some more details: QP number and WQE count.
> Also, extract all the long value-to-string if conditions
> to a short value-to-string functions: do it for rule
> resize state, rule status, and syndrome.
> 
> Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
> Reviewed-by: Erez Shitrit <erezsh@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

Overall this series looks good to me.
But the AI-generated review of this patch, pasted below, does seem relevant.

...

> @@ -423,6 +445,15 @@ static void hws_send_engine_dump_error_cqe(struct mlx5hws_send_engine *queue,
>  			    "    rule 0x%08llx:  |--- syndrome = 0x%x\n",
>  			    HWS_PTR_TO_ID(rule),
>  			    err_cqe->syndrome);
> +		mlx5hws_err(ctx,
> +			    "    rule 0x%08llx:  |--- QPN = 0x%x\n",
> +			    HWS_PTR_TO_ID(rule),
> +			    be32_to_cpu(err_cqe->s_wqe_opcode_qpn) &
> +					0xffffff);

AI-generated review text:

  Is this new QPN line printing something that the same function already
  dumps a few lines later?

  At the tail of hws_send_engine_dump_error_cqe() there is already:

	mlx5hws_err(ctx,
		    "    rule 0x%08llx:  |------------ qpn = 0x%06x\n",
		    HWS_PTR_TO_ID(rule),
		    be32_to_cpu(cqe->sop_drop_qpn) & 0xffffff);

  err_cqe is just a cast of the same cqe pointer, and both fields land on
  the same four bytes of the 64 byte CQE (include/linux/mlx5/device.h):

	struct mlx5_err_cqe {
		u8	rsvd0[32];	/* 0..31  */
		__be32	srqn;		/* 32..35 */
		u8	rsvd1[18];	/* 36..53 */
		u8	vendor_err_synd;/* 54     */
		u8	syndrome;	/* 55     */
		__be32	s_wqe_opcode_qpn;/* 56..59 */
		...
	};
	struct mlx5_cqe64 {
		...
		__be32	byte_cnt;	/* 44..47 */
		__be32	timestamp_h;	/* 48..51 */
		__be32	timestamp_l;	/* 52..55 */
		__be32	sop_drop_qpn;	/* 56..59 */
		...
	};

  Same offset, same 0xffffff mask, so a single dump now reports the QP
  number twice, once as "QPN = 0x%x" and once as "qpn = 0x%06x", with
  different labels and widths.

  Would it make sense to drop the new QPN line, or at least align its label
  and width with the existing one, given the one-shot
  queue->error_cqe_printed guard is there to keep this dump compact?

Source: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260810092630.3137666-1-tariqt%40nvidia.com

> +		mlx5hws_err(ctx,
> +			    "    rule 0x%08llx:  |--- WQE_CNT = 0x%04x\n",
> +			    HWS_PTR_TO_ID(rule),
> +			    (u32)be16_to_cpu(err_cqe->wqe_counter));
>  	}
>  
>  	mlx5hws_err(ctx,

...

  reply	other threads:[~2026-08-11 15:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10  9:26 [PATCH net-next V2 0/5] net/mlx5: HWS misc enhancements Tariq Toukan
2026-08-10  9:26 ` [PATCH net-next V2 1/5] net/mlx5: HWS, Print more details for bad completion Tariq Toukan
2026-08-11 15:25   ` Simon Horman [this message]
2026-08-10  9:26 ` [PATCH net-next V2 2/5] net/mlx5: HWS, Log syndrome on STC modify failure Tariq Toukan
2026-08-10  9:26 ` [PATCH net-next V2 3/5] net/mlx5: HWS, Set the num of queues only when alloc succeeded Tariq Toukan
2026-08-10  9:26 ` [PATCH net-next V2 4/5] net/mlx5: HWS, Remove redundant MLX5_SET in RTC creation Tariq Toukan
2026-08-10  9:26 ` [PATCH net-next V2 5/5] net/mlx5: HWS, Remove redundant FW command when reading caps Tariq Toukan

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=20260811152538.GG51943@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=agoldberger@nvidia.com \
    --cc=alazar@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=cratiu@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dtatulea@nvidia.com \
    --cc=edumazet@google.com \
    --cc=erezsh@nvidia.com \
    --cc=feliu@nvidia.com \
    --cc=gal@nvidia.com \
    --cc=jacob.e.keller@intel.com \
    --cc=kees@kernel.org \
    --cc=kliteyn@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=moshe@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=parav@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=shayd@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=valex@nvidia.com \
    --cc=vdogaru@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