From: Ali Alnubani <alialnu@oss.nvidia.com>
To: <stable@dpdk.org>
Cc: Viacheslav Ovsiienko <viacheslavo@oss.nvidia.com>
Subject: [dpdk-stable] [PATCH 20.11 1/2] net/mlx5: fix TSO multi-segment inline length
Date: Mon, 12 Jul 2021 14:41:34 +0300 [thread overview]
Message-ID: <20210712114135.424311-1-alialnu@nvidia.com> (raw)
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
[ upstream commit 52e1ece50aaf526b900120283284834b0a59e3ce ]
The inline data length for TSO ethernet segment should be
calculated from the TSO header instead of the inline size
configured by txq_inline_min devarg or reported by the NIC.
It is imposed by the nature of TSO offload - inline header
is being duplicated to every output TCP packet.
Fixes: cacb44a09962 ("net/mlx5: add no-inline Tx flag")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index c765314068..752357e342 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -2743,7 +2743,8 @@ mlx5_tx_eseg_mdat(struct mlx5_txq_data *__rte_restrict txq,
* Copying may be interrupted inside the routine
* if run into no inline hint flag.
*/
- copy = tlen >= txq->inlen_mode ? 0 : (txq->inlen_mode - tlen);
+ copy = tso ? inlen : txq->inlen_mode;
+ copy = tlen >= copy ? 0 : (copy - tlen);
copy = mlx5_tx_mseg_memcpy(pdst, loc, part, copy, olx);
tlen += copy;
if (likely(inlen <= tlen) || copy < part) {
--
2.25.1
next reply other threads:[~2021-07-12 11:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-12 11:41 Ali Alnubani [this message]
2021-07-12 11:41 ` [dpdk-stable] [PATCH 20.11 2/2] net/mlx5: fix multi-segment inline for the first segments Ali Alnubani
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=20210712114135.424311-1-alialnu@nvidia.com \
--to=alialnu@oss.nvidia.com \
--cc=stable@dpdk.org \
--cc=viacheslavo@oss.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).