net/mlx5: fix CQEs dumping for Tx

Message ID 20230323235140.3351563-1-akozyrev@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: fix CQEs dumping for Tx |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS

Commit Message

Alexander Kozyrev March 23, 2023, 11:51 p.m. UTC
  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")
Cc: stable@dpdk.org

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
---
 drivers/net/mlx5/mlx5_tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Matan Azrad March 27, 2023, 3:01 p.m. UTC | #1
From: Alexander Kozyrev
> 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")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
  
Raslan Darawsheh March 28, 2023, 8:38 a.m. UTC | #2
Hi,

> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@nvidia.com>
> Sent: Friday, March 24, 2023 1:52 AM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>; Slava
> Ovsiienko <viacheslavo@nvidia.com>; Matan Azrad <matan@nvidia.com>
> 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.
> 
> Fixes: 957e45fb7b ("net/mlx5: handle Tx completion with error")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx5/mlx5_tx.c b/drivers/net/mlx5/mlx5_tx.c
index a13c7e937c..14e1487e59 100644
--- a/drivers/net/mlx5/mlx5_tx.c
+++ b/drivers/net/mlx5/mlx5_tx.c
@@ -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)