[libvirt PATCH] qemu: fix hotplug for multiqueue vdpa net device

Ján Tomko jtomko at redhat.com
Wed Mar 30 09:42:41 UTC 2022


On a Tuesday in 2022, Jonathon Jongsma wrote:
>While commit a5e659f0 removed the restriction against multiple queues
>for the vdpa net device, there were some missing pieces. Configuring a
>device statically and then starting the domain worked as expected, but
>hotplugging a device didn't have the expected multiqueue support
>enabled. Add the missing bits.
>
>Consider the following device xml:
>    <interface type="vdpa">
>      <mac address="00:11:22:33:44:03" />
>      <source dev="/dev/vhost-vdpa-0" />
>      <model type="virtio" />
>      <driver queues='2' />
>    </interface>
>
>Without this patch, hotplugging the above XML description resulted in
>the following:
>    {"execute":"netdev_add","arguments":{"type":"vhost-vdpa","vhostdev":"/dev/fdset/0","id":"hostnet1"},"id":"libvirt-392"}
>    {"execute":"device_add","arguments":{"driver":"virtio-net-pci","netdev":"hostnet1","id":"net1","mac":"00:11:22:33:44:03","bus":"pci.5","addr":"0x0"},"id":"libvirt-393"}
>
>With the patch, hotplugging results in the following:
>    {"execute":"netdev_add","arguments":{"type":"vhost-vdpa","vhostdev":"/dev/fdset/0","queues":2,"id":"hostnet1"},"id":"libvirt-392"}
>    {"execute":"device_add","arguments":{"driver":"virtio-net-pci","mq":true,"vectors":6,"netdev":"hostnet1","id":"net1","mac":"00:11:22:33:44:03","bus":"pci.5","addr":"0x0"},"id":"libvirt-393"}
>
>Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2024406
>
>Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
>---
> src/qemu/qemu_command.c                                       | 4 ++++
> src/qemu/qemu_hotplug.c                                       | 3 +++
> tests/qemuxml2argvdata/net-vdpa-multiqueue.x86_64-latest.args | 2 +-
> 3 files changed, 8 insertions(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220330/900052a7/attachment.sig>


More information about the libvir-list mailing list