DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix the first segment inline length
@ 2022-11-08 13:45 Alexander Kozyrev
  2022-11-08 18:58 ` Slava Ovsiienko
  2022-11-09  8:26 ` Raslan Darawsheh
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Kozyrev @ 2022-11-08 13:45 UTC (permalink / raw)
  To: dev; +Cc: stable, rasland, viacheslavo, matan, michaelba

Packets can be split into several mbufs with various data sizes.
There is no limitation on how small these segments can be.
But there is a limitation on Tx side for inline configuration:
send WQEs with inline headers less than the required are dropped.
The very first segment must be more than minimal inline eth segment.
Enforce this requirement by merging a few segments in this case.

Fixes: ec837ad0fc7 ("net/mlx5: fix multi-segment inline for the first segments")
Cc: stable@dpdk.org

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
---
 drivers/net/mlx5/mlx5_tx.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
index 6471ebf59f..a44050a1ce 100644
--- a/drivers/net/mlx5/mlx5_tx.h
+++ b/drivers/net/mlx5/mlx5_tx.h
@@ -1994,6 +1994,8 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
 		} else if (mbuf->ol_flags & RTE_MBUF_F_TX_DYNF_NOINLINE ||
 			   nxlen > txq->inlen_send) {
 			return mlx5_tx_packet_multi_send(txq, loc, olx);
+		} else if (nxlen <= MLX5_ESEG_MIN_INLINE_SIZE) {
+			inlen = MLX5_ESEG_MIN_INLINE_SIZE;
 		} else {
 			goto do_first;
 		}
-- 
2.18.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-09  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-08 13:45 [PATCH] net/mlx5: fix the first segment inline length Alexander Kozyrev
2022-11-08 18:58 ` Slava Ovsiienko
2022-11-09  8:26 ` Raslan Darawsheh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).