On Fri, May 30, 2025 at 1:19 PM Akihiko Odaki <akihiko.od...@daynix.com> wrote:
>
> virtio_net_pre_load_queues() inspects vdev->guest_features to tell if
> VIRTIO_NET_F_RSS or VIRTIO_NET_F_MQ is enabled to infer the required
> number of queues. This works for VIRTIO_NET_F_MQ but it doesn't for
> VIRTIO_NET_F_RSS because only the lowest 32 bits of vdev->guest_features
> is set at the point and VIRTIO_NET_F_RSS uses bit 60 while
> VIRTIO_NET_F_MQ uses bit 22.
>
> Instead of inferring the required number of queues from
> vdev->guest_features, use the number loaded from the vm state. This
> change also has a nice side effect to remove a duplicate peer queue
> pair change by circumventing virtio_net_set_multiqueue().
>
> Also update the comment in include/hw/virtio/virtio.h to prevent an
> implementation of pre_load_queues() from refering to any fields being
> loaded during migration by accident in the future.
>
> Fixes: 8c49756825da ("virtio-net: Add only one queue pair when realizing")
> Signed-off-by: Akihiko Odaki <akihiko.od...@daynix.com>
> ---
> Changes in v2:
> - Updated a documentation comment of pre_load_queues() for clarity.
> - Link to v1: 
> https://lore.kernel.org/qemu-devel/20250510-n-v1-1-19ee26ac3...@daynix.com

Queued.

Thanks


Reply via email to