DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix inline data size adjustment for Verbs API
@ 2025-07-02  9:34 Shani Peretz
  2025-07-06 14:16 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Shani Peretz @ 2025-07-02  9:34 UTC (permalink / raw)
  To: dev
  Cc: Shani Peretz, Viacheslav Ovsiienko, Dariusz Sosnowski, Bing Zhao,
	Ori Kam, Suanming Mou, Matan Azrad

This fix ensures that when using Verbs for queue creation,
the maximum inline data size is adjusted to prevent rejection
in mlx5_calc_send_wqe() from the rdma_core library.
The adjustment is achieved by reducing the Ethernet minimal inline
size and adding the data minimal inline size,
there for decreasing the maximum inline data size to fit within
acceptable limits.

Fixes: 0c2f7837c673 ("net/mlx5: mitigate Tx queue parameter adjustment")

Signed-off-by: Shani Peretz <shperetz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_txq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 1948a700f1..0981091acd 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -1009,6 +1009,8 @@ txq_adjust_params(struct mlx5_txq_ctrl *txq_ctrl)
 			"txq_inline_mpw requirements (%u) are not satisfied (%u) on port %u",
 			txq_ctrl->txq.inlen_empw, max_inline, priv->dev_data->port_id);
 	}
+	MLX5_ASSERT(max_inline >= (MLX5_ESEG_MIN_INLINE_SIZE - MLX5_DSEG_MIN_INLINE_SIZE));
+	max_inline -= MLX5_ESEG_MIN_INLINE_SIZE - MLX5_DSEG_MIN_INLINE_SIZE;
 	if (txq_ctrl->txq.tso_en && max_inline < MLX5_MAX_TSO_HEADER) {
 		DRV_LOG(WARNING,
 			"tso header inline requirements (%u) are not satisfied (%u) on port %u",
-- 
2.34.1


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

* Re: [PATCH] net/mlx5: fix inline data size adjustment for Verbs API
  2025-07-02  9:34 [PATCH] net/mlx5: fix inline data size adjustment for Verbs API Shani Peretz
@ 2025-07-06 14:16 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2025-07-06 14:16 UTC (permalink / raw)
  To: Shani Peretz, dev
  Cc: Viacheslav Ovsiienko, Dariusz Sosnowski, Bing Zhao, Ori Kam,
	Suanming Mou, Matan Azrad

Hi,


On 02/07/2025 12:34 PM, Shani Peretz wrote:
> This fix ensures that when using Verbs for queue creation,
> the maximum inline data size is adjusted to prevent rejection
> in mlx5_calc_send_wqe() from the rdma_core library.
> The adjustment is achieved by reducing the Ethernet minimal inline
> size and adding the data minimal inline size,
> there for decreasing the maximum inline data size to fit within
> acceptable limits.
> 
> Fixes: 0c2f7837c673 ("net/mlx5: mitigate Tx queue parameter adjustment")
> 
> Signed-off-by: Shani Peretz <shperetz@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards
Raslan Darawsheh


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

end of thread, other threads:[~2025-07-06 14:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-02  9:34 [PATCH] net/mlx5: fix inline data size adjustment for Verbs API Shani Peretz
2025-07-06 14:16 ` 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).