Skip to contentSkip to conversation

net/mlx5: fix TSO multi-segment inline length

PATCH In review Viacheslav Ovsiienko 2 participants 2 messages Jun 20, 2021 – Jun 30, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix TSO multi-segment inline length

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")
---
 drivers/net/mlx5/mlx5_tx.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/mlx5/mlx5_tx.h +2 -1
index 7d3ff8407c..e8b1c0f108 100644
@@ -1338,7 +1338,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) {
Signature · 1 line
2.18.1
#1 lore raw

Hi,

Quoted 14 lines

-----Original Message-----
From: Slava Ovsiienko <[email protected]>
Sent: Sunday, June 20, 2021 9:30 AM
To: [email protected]
Cc: Raslan Darawsheh <[email protected]>; Matan Azrad <[email protected]>; [email protected]
Subject: [PATCH] net/mlx5: fix TSO multi-segment inline length

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.

Quoted 4 lines
Fixes cacb44a09962 ("net/mlx5: add no-inline Tx flag")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh