net/mlx5: fix the first segment inline length
Checks
Commit Message
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(+)
Comments
> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@nvidia.com>
> Sent: Tuesday, November 8, 2022 15:45
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Matan Azrad <matan@nvidia.com>; Michael Baum
> <michaelba@nvidia.com>
> Subject: [PATCH] net/mlx5: fix the first segment inline length
>
> 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>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Hi,
> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@nvidia.com>
> Sent: Tuesday, November 8, 2022 3:45 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>; Slava
> Ovsiienko <viacheslavo@nvidia.com>; Matan Azrad <matan@nvidia.com>;
> Michael Baum <michaelba@nvidia.com>
> Subject: [PATCH] net/mlx5: fix the first segment inline length
>
> 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>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
@@ -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;
}