From: Dariusz Sosnowski <dsosnowski@nvidia.com>
To: Wenbo Liu <liuwenbo109@gmail.com>
Cc: <rasland@nvidia.com>, <dev@dpdk.org>, <viacheslavo@nvidia.com>,
<bingz@nvidia.com>, <orika@nvidia.com>, <suanmingm@nvidia.com>,
<matan@nvidia.com>
Subject: Re: [PATCH] drivers/net/mlx5: fix mlx5 send packet failed
Date: Tue, 3 Jun 2025 16:49:04 +0200 [thread overview]
Message-ID: <20250603144830.4scggdn33lfmiuqy@ds-vm-debian.local> (raw)
In-Reply-To: <1742899140-2013-1-git-send-email-liuwenbo109@gmail.com>
Hi,
Adding all mlx5 maintainers.
On Tue, Mar 25, 2025 at 06:39:00PM +0800, Wenbo Liu 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 DevX
> mlx5_net: Cannot change the Tx SQ state to RESET Remote I/O error
>
> Signed-off-by: Wenbo Liu <liuwenbo109@gmail.com>
> ---
> drivers/net/mlx5/mlx5_tx.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/mlx5/mlx5_tx.c b/drivers/net/mlx5/mlx5_tx.c
> index 4286876..5cf9873 100644
> --- a/drivers/net/mlx5/mlx5_tx.c
> +++ b/drivers/net/mlx5/mlx5_tx.c
> @@ -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));
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.
> if (unlikely(ret < 0)) {
> /*
> * Some error occurred on queue error
> --
> 1.8.3.1
>
Best regards,
Dariusz Sosnowski
prev parent reply other threads:[~2025-06-03 14:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 10:39 Wenbo Liu
2025-03-25 14:10 ` Stephen Hemminger
2025-06-03 14:49 ` Dariusz Sosnowski [this message]
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=20250603144830.4scggdn33lfmiuqy@ds-vm-debian.local \
--to=dsosnowski@nvidia.com \
--cc=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=liuwenbo109@gmail.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=suanmingm@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).