From nobody Fri May 10 09:11:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1646760386; cv=none; d=zohomail.com; s=zohoarc; b=SAP7drpTU/9dbj3JtgQWgcZ58/xfwB6TB3h5euQB+dymm/Np8g3Smt/VfQ1g/MlBN9YswBiZX2ZQe6x01ixM+oWnNaTV+s4zuUdWIr7QB1dL8ssNO4JfzqhKWojzofDsvb6d/VMKiOGGdYxNhpZdZ6ZvpdQb2nxVWN0Xl2VnF+Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646760386; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=UR2pVZnpPTgsKgnQUop4PDy9lard1bkB4YlDY8sgybQ=; b=aMqGfTRKBBWAwk6UfPuU98JWvn6y0pN2CYlAA/bZ009qDvtpfhtsMRreYByH35OHRZy3lvT0GukG08bf+b5NqmSzc9W6WaRx9CJeMXP/DFJA5dJEbzMAeDPjn0rRXeDBhgFaY7v6TQCLSaKv6MXkvcHgbcxi3UgPsAIQeKXnZ2w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1646760386563167.57719782051151; Tue, 8 Mar 2022 09:26:26 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-50-m0pYRtSPMlexiToCnwbr5Q-1; Tue, 08 Mar 2022 12:26:24 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B6DA01C01E8D; Tue, 8 Mar 2022 17:26:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5864840CFD23; Tue, 8 Mar 2022 17:26:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EE9EC194F4B5; Tue, 8 Mar 2022 17:26:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E9515194F4AE for ; Tue, 8 Mar 2022 17:26:19 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B2C477F0CF; Tue, 8 Mar 2022 17:26:19 +0000 (UTC) Received: from himantopus.redhat.com (unknown [10.22.11.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0BB8C7F0CE; Tue, 8 Mar 2022 17:25:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646760386; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=UR2pVZnpPTgsKgnQUop4PDy9lard1bkB4YlDY8sgybQ=; b=jHwQ/uYd4OLOY89ML7sqk5AbTuRkoY2BnIIBxgkoYK+yN9MZ+aC+17Atrsb774Y9hBfygr ssUmp2qghJkOa41pHV9NHineZfmZrQJJn0le5eQEYY7rHdpbtWROGNkTyzvhcajyuxn/4o apcUmwek65U9gAGHeg8MNATL1ltUifY= X-MC-Unique: m0pYRtSPMlexiToCnwbr5Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH v3] qemu: support multiqueue for vdpa net device Date: Tue, 8 Mar 2022 11:25:52 -0600 Message-Id: <20220308172552.167511-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mkletzan@redhat.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1646760388195100001 Content-Type: text/plain; charset="utf-8" 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=3D2024406 Signed-off-by: Jonathon Jongsma Reviewed-by: Martin Kletzander --- Changes in v3: - Do not set the model type in virDomainNetDefParseXML(). Other virtio dev= ices 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 t= reat the vdpa device differently. If we want this behavior to change, it shou= ld 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-lates= t.args create mode 100644 tests/qemuxml2argvdata/net-vdpa-multiqueue.xml create mode 100644 tests/qemuxml2xmloutdata/net-vdpa-multiqueue.xml 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 =3D=3D VIR_DOMAIN_NET_TYPE_BRIDGE || actualType =3D=3D VIR_DOMAIN_NET_TYPE_DIRECT || actualType =3D=3D VIR_DOMAIN_NET_TYPE_ETHERNET || - actualType =3D=3D VIR_DOMAIN_NET_TYPE_VHOSTUSER)) { + actualType =3D=3D VIR_DOMAIN_NET_TYPE_VHOSTUSER || + actualType =3D=3D VIR_DOMAIN_NET_TYPE_VDPA)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("interface %s - multiqueue is not supported f= or network interfaces of type %s"), macstr, virDomainNetTypeToString(actualType)); diff --git a/tests/qemuxml2argvdata/net-vdpa-multiqueue.x86_64-latest.args = b/tests/qemuxml2argvdata/net-vdpa-multiqueue.x86_64-latest.args new file mode 100644 index 0000000000..26ef666036 --- /dev/null +++ b/tests/qemuxml2argvdata/net-vdpa-multiqueue.x86_64-latest.args @@ -0,0 +1,36 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram \ +-accel tcg \ +-cpu qemu64 \ +-m 214 \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-add-fd set=3D0,fd=3D1732,opaque=3Dnet0-vdpa \ +-netdev vhost-vdpa,vhostdev=3D/dev/fdset/0,id=3Dhostnet0 \ +-device '{"driver":"virtio-net-pci","mq":true,"vectors":6,"netdev":"hostne= t0","id":"net0","mac":"52:54:00:95:db:c0","bus":"pci.0","addr":"0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/net-vdpa-multiqueue.xml b/tests/qemuxml= 2argvdata/net-vdpa-multiqueue.xml new file mode 100644 index 0000000000..6e369c1916 --- /dev/null +++ b/tests/qemuxml2argvdata/net-vdpa-multiqueue.xml @@ -0,0 +1,30 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ce475df466..7e1167e60e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1609,6 +1609,7 @@ mymain(void) DO_TEST_FAILURE("net-hostdev-fail", QEMU_CAPS_DEVICE_VFIO_PCI); DO_TEST_CAPS_LATEST("net-vdpa"); + DO_TEST_CAPS_LATEST("net-vdpa-multiqueue"); =20 DO_TEST("hostdev-pci-multifunction", QEMU_CAPS_KVM, diff --git a/tests/qemuxml2xmloutdata/net-vdpa-multiqueue.xml b/tests/qemux= ml2xmloutdata/net-vdpa-multiqueue.xml new file mode 100644 index 0000000000..0876d5df62 --- /dev/null +++ b/tests/qemuxml2xmloutdata/net-vdpa-multiqueue.xml @@ -0,0 +1,36 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + +
+ + + + + + + +
+ + + +