On Tue, Mar 08, 2022 at 11:25:52AM -0600, Jonathon Jongsma wrote:
The vdpa device supports multiqueue, so remove the restriction from qemuDomainValidateActualNetDef() that prevents us from using this functionality. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2024406 Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx> --- Changes in v3: - Do not set the model type in virDomainNetDefParseXML(). Other virtio devices require the model to be explicitly set to 'virtio' in the xml definition in order to parse the virtio driver options, and it doesn't make sense to treat the vdpa device differently. If we want this behavior to change, it should probably be changed so that it applies to all devices that default to a virtio device model. Changes in v2: - remove error message in virDomainNetDefParseXML(). The model is already checked in the post parse validation step. src/qemu/qemu_domain.c | 3 +- .../net-vdpa-multiqueue.x86_64-latest.args | 36 +++++++++++++++++++ .../qemuxml2argvdata/net-vdpa-multiqueue.xml | 30 ++++++++++++++++ tests/qemuxml2argvtest.c | 1 + .../net-vdpa-multiqueue.xml | 36 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 6 files changed, 106 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
The XMLs could be identical with the output one being a symlink to the input one, but that's nitpicking and/or can be done later.
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index acc76c1cd6..6b61fefb8f 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4523,7 +4523,8 @@ qemuDomainValidateActualNetDef(const virDomainNetDef *net, actualType == VIR_DOMAIN_NET_TYPE_BRIDGE || actualType == VIR_DOMAIN_NET_TYPE_DIRECT || actualType == VIR_DOMAIN_NET_TYPE_ETHERNET || - actualType == VIR_DOMAIN_NET_TYPE_VHOSTUSER)) { + actualType == VIR_DOMAIN_NET_TYPE_VHOSTUSER || + actualType == VIR_DOMAIN_NET_TYPE_VDPA)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("interface %s - multiqueue is not supported for network interfaces of type %s"), macstr, virDomainNetTypeToString(actualType));
Also the comment on top of this condition could be changed to account for the change, but it was already invalid before, so... =) Anyway, thanks for the patience with my reviews. Reviewed-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature