DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: extend debug logs verbosity
@ 2017-08-23  7:10 Shahaf Shuler
  2017-08-24 13:17 ` Nélio Laranjeiro
  0 siblings, 1 reply; 3+ messages in thread
From: Shahaf Shuler @ 2017-08-23  7:10 UTC (permalink / raw)
  To: nelio.laranjeiro, adrien.mazarguil; +Cc: dev, Xueming Li

Extend debug logs verbosity by printing the full completion with error
along with the entire txq in case of error. For the Rx case no logs were
added since such errors are counted and recovered by the Rx data path.

Such prints are essential to understand the root cause for the error.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---

This patch should be applied only after the series:
http://dpdk.org/dev/patchwork/patch/27367/

---
 drivers/net/mlx5/mlx5_rxtx.h | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 7de1d1086..43debb309 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -55,6 +55,7 @@
 #include <rte_mbuf.h>
 #include <rte_mempool.h>
 #include <rte_common.h>
+#include <rte_hexdump.h>
 #ifdef PEDANTIC
 #pragma GCC diagnostic error "-Wpedantic"
 #endif
@@ -419,16 +420,24 @@ check_cqe(volatile struct mlx5_cqe *cqe,
 		if ((syndrome == MLX5_CQE_SYNDROME_LOCAL_LENGTH_ERR) ||
 		    (syndrome == MLX5_CQE_SYNDROME_REMOTE_ABORTED_ERR))
 			return 0;
-		if (!check_cqe_seen(cqe))
+		if (!check_cqe_seen(cqe)) {
 			ERROR("unexpected CQE error %u (0x%02x)"
 			      " syndrome 0x%02x",
 			      op_code, op_code, syndrome);
+			rte_hexdump(stderr, "MLX5 Error CQE:",
+				    (const void *)((uintptr_t)err_cqe),
+				    sizeof(*err_cqe));
+		}
 		return 1;
 	} else if ((op_code != MLX5_CQE_RESP_SEND) &&
 		   (op_code != MLX5_CQE_REQ)) {
-		if (!check_cqe_seen(cqe))
+		if (!check_cqe_seen(cqe)) {
 			ERROR("unexpected CQE opcode %u (0x%02x)",
 			      op_code, op_code);
+			rte_hexdump(stderr, "MLX5 CQE:",
+				    (const void *)((uintptr_t)cqe),
+				    sizeof(*cqe));
+		}
 		return 1;
 	}
 #endif /* NDEBUG */
@@ -483,8 +492,13 @@ mlx5_tx_complete(struct txq *txq)
 #ifndef NDEBUG
 	if ((MLX5_CQE_OPCODE(cqe->op_own) == MLX5_CQE_RESP_ERR) ||
 	    (MLX5_CQE_OPCODE(cqe->op_own) == MLX5_CQE_REQ_ERR)) {
-		if (!check_cqe_seen(cqe))
+		if (!check_cqe_seen(cqe)) {
 			ERROR("unexpected error CQE, TX stopped");
+			rte_hexdump(stderr, "MLX5 TXQ:",
+				    (const void *)((uintptr_t)txq->wqes),
+				    ((1 << txq->wqe_n) *
+				     MLX5_WQE_SIZE));
+		}
 		return;
 	}
 #endif /* NDEBUG */
-- 
2.12.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: extend debug logs verbosity
  2017-08-23  7:10 [dpdk-dev] [PATCH] net/mlx5: extend debug logs verbosity Shahaf Shuler
@ 2017-08-24 13:17 ` Nélio Laranjeiro
  2017-08-28 11:13   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Nélio Laranjeiro @ 2017-08-24 13:17 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: adrien.mazarguil, dev, Xueming Li

On Wed, Aug 23, 2017 at 10:10:58AM +0300, Shahaf Shuler wrote:
> Extend debug logs verbosity by printing the full completion with error
> along with the entire txq in case of error. For the Rx case no logs were
> added since such errors are counted and recovered by the Rx data path.
> 
> Such prints are essential to understand the root cause for the error.
> 
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> ---
> 
> This patch should be applied only after the series:
> http://dpdk.org/dev/patchwork/patch/27367/
> 
> ---
>  drivers/net/mlx5/mlx5_rxtx.h | 20 +++++++++++++++++---
>  1 file changed, 17 insertions(+), 3 deletions(-)

Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

-- 
Nélio Laranjeiro
6WIND

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: extend debug logs verbosity
  2017-08-24 13:17 ` Nélio Laranjeiro
@ 2017-08-28 11:13   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2017-08-28 11:13 UTC (permalink / raw)
  To: Nélio Laranjeiro, Shahaf Shuler; +Cc: adrien.mazarguil, dev, Xueming Li

On 8/24/2017 2:17 PM, Nélio Laranjeiro wrote:
> On Wed, Aug 23, 2017 at 10:10:58AM +0300, Shahaf Shuler wrote:
>> Extend debug logs verbosity by printing the full completion with error
>> along with the entire txq in case of error. For the Rx case no logs were
>> added since such errors are counted and recovered by the Rx data path.
>>
>> Such prints are essential to understand the root cause for the error.
>>
>> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
>> Signed-off-by: Xueming Li <xuemingl@mellanox.com>

> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> 

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-28 11:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23  7:10 [dpdk-dev] [PATCH] net/mlx5: extend debug logs verbosity Shahaf Shuler
2017-08-24 13:17 ` Nélio Laranjeiro
2017-08-28 11:13   ` Ferruh Yigit

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).