net/mlx5: fix no-inline Tx flag
diff mbox series

Message ID 20200723095755.14561-1-getelson@mellanox.com
State Superseded, archived
Delegated to: Raslan Darawsheh
Headers show
Series
  • net/mlx5: fix no-inline Tx flag
Related show

Checks

Context Check Description
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/checkpatch warning coding style issues

Commit Message

Gregory Etelson July 23, 2020, 9:57 a.m. UTC
This patch addresses specific configuration:
PMD was explicitly configured to inline TX data info WQE with the
`txq_inline_min' PMD parameter and run-time TX no-inline dynamic
flag was added.

TX processing was broken for packets with length less than TXQ
minimal inline size.

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

Signed-off-by: Gregory Etelson <getelson@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 3 +++
 1 file changed, 3 insertions(+)

Patch
diff mbox series

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 3eb0243603..1b71e94221 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -4739,6 +4739,8 @@  mlx5_tx_burst_single_send(struct mlx5_txq_data *__rte_restrict txq,
 					      txq->inlen_mode) ||
 					    (MLX5_TXOFF_CONFIG(MPW) &&
 					     txq->inlen_mode)) {
+						if (inlen <= txq->inlen_send)
+							goto single_inline;
 						/*
 						 * The hardware requires the
 						 * minimal inline data header.
@@ -4755,6 +4757,7 @@  mlx5_tx_burst_single_send(struct mlx5_txq_data *__rte_restrict txq,
 					}
 					goto single_no_inline;
 				}
+single_inline:
 				/*
 				 * Completely inlined packet data WQE:
 				 * - Control Segment, SEND opcode