Skip to content

Commit

Permalink
net/mlx5: fix single not inline packet storing
Browse files Browse the repository at this point in the history
[ upstream commit 166f185 ]

The mlx5 PMD can inline packet data into transmitting descriptor (WQE)
and free mbuf immediately as data no longer needed, for non-inline
packets the mbuf pointer should be stored in elts array for coming
freeing on send completion. There was an optimization on storing
pointers in batch and there was missed storing mbuf for single
packet if non-inline was explicitly requested by flag.

Fixes: cacb44a ("net/mlx5: add no-inline Tx flag")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
  • Loading branch information
viacheslavo authored and kevintraynor committed Oct 11, 2022
1 parent b5e5d92 commit 517c250
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/mlx5/mlx5_tx.h
Expand Up @@ -3270,7 +3270,9 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data *__rte_restrict txq,
* if no inlining is configured, this is done
* by calling routine in a batch copy.
*/
MLX5_ASSERT(!MLX5_TXOFF_CONFIG(INLINE));
if (MLX5_TXOFF_CONFIG(INLINE))
txq->elts[txq->elts_head++ & txq->elts_m] =
loc->mbuf;
--loc->elts_free;
#ifdef MLX5_PMD_SOFT_COUNTERS
/* Update sent data bytes counter. */
Expand Down

0 comments on commit 517c250

Please sign in to comment.