[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACGkMEttzcr24-cD5AGSvc_79_OJbZ-coLR-N68dMTqJe6V-TA@mail.gmail.com>
Date: Thu, 5 Jun 2025 10:48:38 +0800
From: Jason Wang <jasowang@...hat.com>
To: Dragos Tatulea <dtatulea@...dia.com>
Cc: "Michael S. Tsirkin" <mst@...hat.com>, Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio Pérez <eperezma@...hat.com>,
Cosmin Ratiu <cratiu@...dia.com>, Shahar Shitrit <shshitrit@...dia.com>,
Si-Wei Liu <si-wei.liu@...cle.com>, virtualization@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH vhost] vdpa/mlx5: Fix needs_teardown flag calculation
On Thu, Jun 5, 2025 at 2:48 AM Dragos Tatulea <dtatulea@...dia.com> wrote:
>
> needs_teardown is a device flag that indicates when virtual queues need
> to be recreated. This happens for certain configuration changes: queue
> size and some specific features.
>
> Currently, the needs_teardown state can be incorrectly reset by
> subsequent .set_vq_num() calls. For example, for 1 rx VQ with size 512
> and 1 tx VQ with size 256:
>
> .set_vq_num(0, 512) -> sets needs_teardown to true (rx queue has a
> non-default size)
> .set_vq_num(1, 256) -> sets needs_teardown to false (tx queue has a
> default size)
>
> This change takes into account the previous value of the needs_teardown
> flag when re-calculating it during VQ size configuration.
>
> Fixes: 0fe963d6fc16 ("vdpa/mlx5: Re-create HW VQs under certain conditions")
> Signed-off-by: Dragos Tatulea <dtatulea@...dia.com>
> Reviewed-by: Shahar Shitrit <shshitrit@...dia.com>
> Reviewed-by: Si-Wei Liu <si-wei.liu@...cle.com>
> Tested-by: Si-Wei Liu<si-wei.liu@...cle.com>
> ---
Acked-by: Jason Wang <jasowang@...hat.com>
Thanks
Powered by blists - more mailing lists