Skip to contentSkip to conversation

net/mlx5: fix CQEs dumping for Tx

PATCH In review Alexander Kozyrev 3 participants 3 messages Mar 23, 2023 – Mar 28, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix CQEs dumping for Tx

The regular CQE size can be 64 bytes or 128 bytes depending on the cache line size. The error CQE is always 64 bytes long. Only 64 bytes are dumped to the log file in case of Tx queue recovery form the error. Use the CQE size, not the error CQE size.

Fixes 957e45fb7b ("net/mlx5: handle Tx completion with error")
---
 drivers/net/mlx5/mlx5_tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/mlx5_tx.c +1 -1
index a13c7e937c..14e1487e59 100644
@@ -107,7 +107,7 @@ mlx5_tx_error_cqe_handle(struct mlx5_txq_data *__rte_restrict txq,
 			mlx5_dump_debug_information(name, "MLX5 Error CQ:",
 						    (const void *)((uintptr_t)
 						    txq->cqes),
-						    sizeof(*err_cqe) *
+						    sizeof(struct mlx5_cqe) *
 						    (1 << txq->cqe_n));
 			mlx5_dump_debug_information(name, "MLX5 Error SQ:",
 						    (const void *)((uintptr_t)
Signature · 1 line
2.18.2
Acked-by on v1 1/1
#1 lore raw

From: Alexander Kozyrev

Quoted 9 lines

The regular CQE size can be 64 bytes or 128 bytes depending on the cache line size. The error CQE is always 64 bytes long.
Only 64 bytes are dumped to the log file in case of Tx queue recovery form the error. Use the CQE size, not the error CQE size.

Fixes 957e45fb7b ("net/mlx5: handle Tx completion with error")
#2 lore raw
In reply to Alexander Kozyrev

Hi,

Quoted 13 lines

-----Original Message-----
From: Alexander Kozyrev <[email protected]>
Sent: Friday, March 24, 2023 1:52 AM
To: [email protected]
Cc: [email protected]; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>
Subject: [PATCH] net/mlx5: fix CQEs dumping for Tx

The regular CQE size can be 64 bytes or 128 bytes depending on the cache line size. The error CQE is always 64 bytes long.
Only 64 bytes are dumped to the log file in case of Tx queue recovery form the error. Use the CQE size, not the error CQE size.

Quoted 4 lines
Fixes 957e45fb7b ("net/mlx5: handle Tx completion with error")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh