[libvirt PATCH v2] qemu: support multiqueue for vdpa net device

Martin Kletzander mkletzan at redhat.com
Fri Mar 4 13:55:42 UTC 2022


On Thu, Mar 03, 2022 at 01:43:11PM -0600, Jonathon Jongsma wrote:
>Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2024406
>
>Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
>---
>Changes in v2:
> - remove error message in virDomainNetDefParseXML(). The model is already
>   checked in the post parse validation step.
>
> src/conf/domain_conf.c                        |  2 ++
> src/qemu/qemu_domain.c                        |  3 +-
> .../net-vdpa-multiqueue.x86_64-latest.args    | 36 +++++++++++++++++++
> .../qemuxml2argvdata/net-vdpa-multiqueue.xml  | 29 +++++++++++++++
> tests/qemuxml2argvtest.c                      |  1 +
> .../net-vdpa-multiqueue.xml                   | 36 +++++++++++++++++++
> tests/qemuxml2xmltest.c                       |  1 +
> 7 files changed, 107 insertions(+), 1 deletion(-)
> create mode 100644 tests/qemuxml2argvdata/net-vdpa-multiqueue.x86_64-latest.args
> create mode 100644 tests/qemuxml2argvdata/net-vdpa-multiqueue.xml
> create mode 100644 tests/qemuxml2xmloutdata/net-vdpa-multiqueue.xml
>
>diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>index 34fec887a3..9634c9256e 100644
>--- a/src/conf/domain_conf.c
>+++ b/src/conf/domain_conf.c
>@@ -10552,6 +10552,8 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt,
>             goto error;
>         }
>         def->data.vdpa.devicepath = g_steal_pointer(&dev);
>+        if (!def->model)
>+            def->model = VIR_DOMAIN_NET_MODEL_VIRTIO;
>         break;
>

You also need to check that def->modelstr is not set, otherwise you
might rewrite a legacy model.

Other than that, looking at the commit it should be called "default to
virtio model for vdpa interfaces" as otherwise the functionality is
already there.  The bug could be tested, it only needs to explicitly
mention some type of virtio model.

Anyway, with the modelstr fixed here's my

Reviewed-by: Martin Kletzander <mkletzan at redhat.com>

Have a nice day.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220304/e74995df/attachment-0001.sig>


More information about the libvir-list mailing list