diff mbox series

net/mlx5: fix single not inline packet elts storing

Message ID 20220811055215.30214-1-viacheslavo@nvidia.com (mailing list archive)
State Superseded
Delegated to: Raslan Darawsheh
Headers show
Series net/mlx5: fix single not inline packet elts storing | expand


Context Check Description
ci/intel-Testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/checkpatch success coding style OK

Commit Message

Slava Ovsiienko Aug. 11, 2022, 5:52 a.m. UTC
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.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
 drivers/net/mlx5/mlx5_tx.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series


diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
index f081921ffc..8e113e3778 100644
--- a/drivers/net/mlx5/mlx5_tx.h
+++ b/drivers/net/mlx5/mlx5_tx.h
@@ -3322,7 +3322,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.
+				txq->elts[txq->elts_head++ & txq->elts_m] =
+							loc->mbuf;
 			/* Update sent data bytes counter. */