Skip to content

Commit

Permalink
net/mlx5: fix TSO multi-segment inline length
Browse files Browse the repository at this point in the history
[ upstream commit 52e1ece ]

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: cacb44a ("net/mlx5: add no-inline Tx flag")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
  • Loading branch information
viacheslavo authored and bluca committed Jul 12, 2021
1 parent d7ecda5 commit 4a3fe74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/mlx5/mlx5_rxtx.c
Expand Up @@ -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) {
Expand Down

0 comments on commit 4a3fe74

Please sign in to comment.