[PATCH] vhost: fix misleading log when setting max queue num

Maxime Coquelin maxime.coquelin at redhat.com
Fri Jan 17 10:28:08 CET 2025



On 1/9/25 3:31 PM, Maxime Coquelin wrote:
> rte_vhost_driver_set_max_queue_num API returns early when
> called for a Vhost-user device, as this API is intended to
> limit the maximum number of queue pairs supported by VDUSE
> devices. However, a log mentioning the maximim number of
> queue pairs is being set is emitted unconditionally, which
> may confuse the end user.
> 
> This patch moves this log after the backend type is
> checked, so that it is only called with VDUSE backends.
> The check on the requested value is also moved at the same
> place.
> 
> Fixes: e1808999d36b ("vhost: restrict set max queue pair API to VDUSE")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> ---
>   lib/vhost/socket.c | 16 +++++++++-------
>   1 file changed, 9 insertions(+), 7 deletions(-)
> 

With suggested changes from Kevin:
Applied to next-virtio/for-next-net

Thanks,
Maxime



More information about the dev mailing list