DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Minggang Li(Gavin)" <gavinl@nvidia.com>
To: <matan@nvidia.com>, <viacheslavo@nvidia.com>, <orika@nvidia.com>,
	<thomas@monjalon.net>, Dariusz Sosnowski <dsosnowski@nvidia.com>,
	Bing Zhao <bingz@nvidia.com>, Suanming Mou <suanmingm@nvidia.com>
Cc: <dev@dpdk.org>, <rasland@nvidia.com>, Alex Vesker <valex@nvidia.com>
Subject: [PATCH V3 3/3] net/mlx5/hws: print CQE error syndrome and more information
Date: Tue, 24 Sep 2024 13:52:58 +0300	[thread overview]
Message-ID: <20240924105258.58037-4-gavinl@nvidia.com> (raw)
In-Reply-To: <20240924105258.58037-1-gavinl@nvidia.com>

Print CQE error syndrome and more information in case of queue error.

Signed-off-by: Minggang Li(Gavin) <gavinl@nvidia.com>
Acked-by: Alex Vesker <valex@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_send.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c b/drivers/net/mlx5/hws/mlx5dr_send.c
index 3022c50260..e9abf3dddb 100644
--- a/drivers/net/mlx5/hws/mlx5dr_send.c
+++ b/drivers/net/mlx5/hws/mlx5dr_send.c
@@ -598,8 +598,15 @@ static void mlx5dr_send_engine_poll_cq(struct mlx5dr_send_engine *queue,
 	    cqe_owner != sw_own)
 		return;
 
-	if (unlikely(cqe_opcode != MLX5_CQE_REQ))
+	if (unlikely(cqe_opcode != MLX5_CQE_REQ)) {
+		struct mlx5_err_cqe *err_cqe = (struct mlx5_err_cqe *)cqe;
+
+		DR_LOG(ERR, "CQE ERR:0x%x, Vendor_ERR:0x%x, OP:0x%x, QPN:0x%x, WQE_CNT:0x%x",
+			err_cqe->syndrome, err_cqe->vendor_err_synd, cqe_opcode,
+			(rte_be_to_cpu_32(err_cqe->s_wqe_opcode_qpn) & 0xffffff),
+			rte_be_to_cpu_16(err_cqe->wqe_counter));
 		queue->err = true;
+	}
 
 	rte_io_rmb();
 
-- 
2.34.1


  parent reply	other threads:[~2024-09-24 10:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 10:21 [PATCH 0/3] Error report improvement and fix Gavin Li
2024-09-06 10:21 ` [PATCH 1/3] net/mlx5: set rte errno if malloc failed Gavin Li
2024-09-06 10:21 ` [PATCH 2/3] net/mlx5/hws: add log for failing to create rule in HWS Gavin Li
2024-09-06 10:21 ` [PATCH 3/3] net/mlx5/hws: print CQE error syndrome and more information Gavin Li
2024-09-10  7:58   ` [PATCH V1 0/3] Error report improvement and fix Gavin Li
2024-09-10  7:58     ` [PATCH V1 1/3] net/mlx5: set rte errno if malloc failed Gavin Li
2024-09-10  7:58     ` [PATCH V1 2/3] net/mlx5/hws: add log for failing to create rule in HWS Gavin Li
2024-09-10  7:58     ` [PATCH V1 3/3] net/mlx5/hws: print CQE error syndrome and more information Gavin Li
2024-09-24  5:59       ` [PATCH V2 0/3] Error report improvement and fix Minggang Li(Gavin)
2024-09-24  5:59         ` [PATCH V2 1/3] net/mlx5: set rte errno if malloc failed Minggang Li(Gavin)
2024-09-24  5:59         ` [PATCH V2 2/3] net/mlx5/hws: add log for failing to create rule in HWS Minggang Li(Gavin)
2024-09-24  5:59         ` [PATCH V2 3/3] net/mlx5/hws: print CQE error syndrome and more information Minggang Li(Gavin)
2024-09-24 10:52           ` [PATCH V3 0/3] Error report improvement and fix Minggang Li(Gavin)
2024-09-24 10:52             ` [PATCH V3 1/3] net/mlx5: set rte errno if malloc failed Minggang Li(Gavin)
2024-09-24 10:52             ` [PATCH V3 2/3] net/mlx5/hws: add log for failing to create rule in HWS Minggang Li(Gavin)
2024-09-24 10:52             ` Minggang Li(Gavin) [this message]
2024-09-25  8:23             ` [PATCH V3 0/3] Error report improvement and fix Raslan Darawsheh

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=20240924105258.58037-4-gavinl@nvidia.com \
    --to=gavinl@nvidia.com \
    --cc=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=suanmingm@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=valex@nvidia.com \
    --cc=viacheslavo@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;
as well as URLs for NNTP newsgroup(s).