patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 20.11 1/2] net/mlx5: fix TSO multi-segment inline length
@ 2021-07-12 11:41 Ali Alnubani
  2021-07-12 11:41 ` [dpdk-stable] [PATCH 20.11 2/2] net/mlx5: fix multi-segment inline for the first segments Ali Alnubani
  0 siblings, 1 reply; 2+ messages in thread
From: Ali Alnubani @ 2021-07-12 11:41 UTC (permalink / raw)
  To: stable; +Cc: Viacheslav Ovsiienko

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-12 11:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 11:41 [dpdk-stable] [PATCH 20.11 1/2] net/mlx5: fix TSO multi-segment inline length Ali Alnubani
2021-07-12 11:41 ` [dpdk-stable] [PATCH 20.11 2/2] net/mlx5: fix multi-segment inline for the first segments Ali Alnubani

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).