[PATCH] net/mlx5: fix the queue length checking

Slava Ovsiienko viacheslavo at nvidia.com
Wed Jul 9 08:56:39 CEST 2025


> -----Original Message-----
> From: Bing Zhao <bingz at nvidia.com>
> Sent: Wednesday, July 9, 2025 7:00 AM
> To: Slava Ovsiienko <viacheslavo at nvidia.com>; dev at dpdk.org; Raslan
> Darawsheh <rasland at nvidia.com>
> Cc: Ori Kam <orika at nvidia.com>; Dariusz Sosnowski
> <dsosnowski at nvidia.com>; Suanming Mou <suanmingm at nvidia.com>;
> Matan Azrad <matan at nvidia.com>; NBU-Contact-Thomas Monjalon
> (EXTERNAL) <thomas at monjalon.net>
> Subject: [PATCH] net/mlx5: fix the queue length checking
> 
> In the new consecutive memory mode of Tx queues allocation, the needed
> WQ length is calculated via txq_calc_wqebb_cnt(). This function is used both
> in Verbs and Devx modes, but in the Devx queue creation, the actual length is
> re-calculated / adjusted for the Devx API. The queue parameters
> 'max_inline_data' and 'inlen_send' are used separately for the length
> calculation for different modes and the counts calculated are different as a
> result.
> 
> So passing the mode as a bool input to adjust the calculation in different
> modes will solve the mismatch. In the meanwhile, since the memory and MR
> are allocated successfully before creating a SQ / CQ.
> So the error is not critical and a warning message is enough, the saved length
> can be used to create the queue.
> 
> Fixes: d94177339289 ("net/mlx5: use consecutive memory for Tx queue
> creation")
> 
> Signed-off-by: Bing Zhao <bingz at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>



More information about the dev mailing list