drivers/net/mlx5: fix mlx5 send packet failed
PATCH 1/1 drivers/net/mlx5: fix mlx5 send packet failed
Test Environment: ARM architecture, OpenEuler operating system
CPU: HUAWEI Kunpeng 920 5220, BIOS Vendor ID: HiSilicon
Network Card: Mellanox Technologies MT27800 Family [ConnectX-5] DPDK program sending self-encapsulated packets with MAC, IP, and UDP headers continuously prints the following errors and ceases packet transmission
mlx5_common: Failed to modify SQ using DevXmlx5_net: Cannot change the Tx SQ state to RESET Remote I/O error
--- drivers/net/mlx5/mlx5_tx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/mlx5/mlx5_tx.c +5 -1
@@ -186,6 +186,7 @@volatile struct mlx5_cqe *last_cqe =NULL ;bool ring_doorbell = false;int ret; +int offset =0 ; do { volatile struct mlx5_cqe *cqe;
@@ -205,8 +206,11 @@* here, before we might perform SQ reset. */ rte_wmb (); +#if (RTE_CACHE_LINE_SIZE ==128 ) + offset =64 ; +#endif ret =mlx5_tx_error_cqe_handle - (txq, (volatile struct mlx5_error_cqe *)cqe); + (txq, (volatile struct mlx5_err_cqe *)(((char *)cqe) + offset));if (unlikely (ret <0 )) {/* * Some error occurred on queue error
Signature · 1 line
1.8.3.1
Quoted 10 lines · On Tue, 25 Mar 2025 18:39:00 +0800 Wenbo Liu <[email protected]> wrote:
Test Environment: ARM architecture, OpenEuler operating system
CPU: HUAWEI Kunpeng 920 5220, BIOS Vendor ID: HiSilicon
Network Card: Mellanox Technologies MT27800 Family [ConnectX-5] DPDK program sending self-encapsulated packets with MAC, IP, and UDP headers continuously prints the following errors and ceases packet transmission
mlx5_common: Failed to modify SQ using DevXmlx5_net: Cannot change the Tx SQ state to RESET Remote I/O errorSigned-off-by Wenbo Liu <[email protected]>
Patch has compile failures in CI and coding indent issue reported by checkpatch.
Hi,
Adding all mlx5 maintainers.
Quoted 27 lines · Wenbo Liu
Test Environment: ARM architecture, OpenEuler operating system
CPU: HUAWEI Kunpeng 920 5220, BIOS Vendor ID: HiSilicon
Network Card: Mellanox Technologies MT27800 Family [ConnectX-5] DPDK program sending self-encapsulated packets with MAC, IP, and UDP headers continuously prints the following errors and ceases packet transmission
mlx5_common: Failed to modify SQ using DevXmlx5_net: Cannot change the Tx SQ state to RESET Remote I/O errorSigned-off-by Wenbo Liu <[email protected]>--- drivers/net/mlx5/mlx5_tx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/net/mlx5/mlx5_tx.c +1
-0@@ -186,6 +186,7 @@volatile struct mlx5_cqe *last_cqe =NULL ;bool ring_doorbell = false;int ret; +int offset =0 ; do { volatile struct mlx5_cqe *cqe;
drivers/net/mlx5/mlx5_tx.c line 213
Quoted 9 lines
drivers/net/mlx5/mlx5_tx.c +4
-1@@ -205,8 +206,11 @@* here, before we might perform SQ reset. */ rte_wmb (); +#if (RTE_CACHE_LINE_SIZE ==128 ) + offset =64 ; +#endif ret =mlx5_tx_error_cqe_handle - (txq, (volatile struct mlx5_error_cqe *)cqe); + (txq, (volatile struct mlx5_err_cqe *)(((char *)cqe) + offset));
Could you please elaborate what exactly that changes? I think I'm missing something.mlx5_error_cqe, used here originally, takes into account the possibility of cache line being 128B
(https://github.com/DPDK/dpdk/blob/main/drivers/common/mlx5/mlx5_prm.h#L427)
and this achieves the equivalent to the above diff.
Quoted 6 lines
drivers/net/mlx5/mlx5_tx.c +0
-0if (unlikely (ret <0 )) {/* * Some error occurred on queue error Signature · 1 line
1.8.3.1
Best regards,
Dariusz Sosnowski