From nobody Fri Apr 19 12:33:06 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; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com 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 1641762490652616.0376939448348; Sun, 9 Jan 2022 13:08:10 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-480-__Cl5mfBPLOLxnzYq6CaWg-1; Sun, 09 Jan 2022 16:08:05 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EEFF2180830C; Sun, 9 Jan 2022 21:08:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9FDE9519CA; Sun, 9 Jan 2022 21:08:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2696B1809CB8; Sun, 9 Jan 2022 21:07:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 209L7roT003632 for ; Sun, 9 Jan 2022 16:07:53 -0500 Received: by smtp.corp.redhat.com (Postfix) id B2A40C08095; Sun, 9 Jan 2022 21:07:53 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast09.extmail.prod.ext.rdu2.redhat.com [10.11.55.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AE668C08092 for ; Sun, 9 Jan 2022 21:07:53 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 93ABE2BD19E7 for ; Sun, 9 Jan 2022 21:07:53 +0000 (UTC) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-481-rxA2M76UPECsnPlKoQ6Ssg-1; Sun, 09 Jan 2022 16:07:51 -0500 Received: by mail-lf1-f50.google.com with SMTP id j11so37491801lfg.3 for ; Sun, 09 Jan 2022 13:07:51 -0800 (PST) Received: from navi.cosmonova.net.ua ([95.67.24.131]) by smtp.gmail.com with ESMTPSA id o6sm767689lfk.232.2022.01.09.13.07.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 13:07:49 -0800 (PST) X-MC-Unique: __Cl5mfBPLOLxnzYq6CaWg-1 X-MC-Unique: rxA2M76UPECsnPlKoQ6Ssg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Nc3i1GcjkIwMUt2dGBm5JwoEUbQNe8LFw2QJsGeNOok=; b=MkpDLcxWzbL0BsBr7WIISbLHrrdD4DXwMO+Qj0997KVES2fFjlcXCX5u/2+D1aMxCj XKhT+LNnToWjlrAqqV8EHlWJuvJOW0xqjyVr/OwjjGQVZH3/YFe0F9cm4JM0J5d/gYmJ XaJSgZfxOcFAz13UcYFe8aPOeA0NSk42XF0qHYjzlymS04g2O3i542laSD++XqvZonBR QU+MhqjpYtKFBVmGUK5eTtZIPw2AY7RJ48TRgo3uwWFLvXYEi94W8lKRtmzSYIpwsmHt 0dDJaGCADB0AddC6Ej4cKZURd3TDGGv9ye79H7JuSVLDyn3hJBGZs+aZM39pOCcd6c9T uQFw== X-Gm-Message-State: AOAM530oxcOJ2r+rNC8X8xiKclElJNAeOi7C/f9gbd5h45J+BfK1FTKj 8x7OdGohJQ3fPuPUYVk/78WBlhUrNk73qlY4 X-Google-Smtp-Source: ABdhPJxy2O9MWKRkbvec67yBZLh9oyku+9+uZwVm1fSo3nw+l8kQm/oLa9Vo7BR5DMgh7nSCz3NClg== X-Received: by 2002:a19:e611:: with SMTP id d17mr33830066lfh.415.1641762469830; Sun, 09 Jan 2022 13:07:49 -0800 (PST) From: Andrew Melnychenko To: libvir-list@redhat.com Subject: [PATCH v2 1/4] domain_conf: Added configs for RSS and Hash report. Date: Sun, 9 Jan 2022 23:07:35 +0200 Message-Id: <20220109210738.2867080-2-andrew@daynix.com> In-Reply-To: <20220109210738.2867080-1-andrew@daynix.com> References: <20220109210738.2867080-1-andrew@daynix.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-loop: libvir-list@redhat.com Cc: yan@daynix.com, yuri.benditovich@daynix.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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-ZM-MESSAGEID: 1641762491843100003 Content-Type: text/plain; charset="utf-8" Added "rss" and "rss_hash_report" configuration that should be used with qemu virtio RSS. Both options are triswitches. Used as "driver" options and affects only NIC with model type "virtio". In other patches - options should turn on virtio-net RSS and hash propertie= s. Signed-off-by: Andrew Melnychenko Reviewed-by: Michal Privoznik --- docs/formatdomain.rst | 18 ++++++++++++++++++ docs/schemas/domaincommon.rng | 10 ++++++++++ src/conf/domain_conf.c | 31 ++++++++++++++++++++++++++++++- src/conf/domain_conf.h | 2 ++ 4 files changed, 60 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index d4f30bb8af..ce3e8a5dbf 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -5305,6 +5305,24 @@ following attributes are available for the ``"virtio= "`` NIC driver: only for ``vhostuser`` type. :since:`Since 3.7.0 (QEMU and KVM only)` **In general you should leave this option alone, unless you are very ce= rtain you know what you are doing.** +``rss`` + The ``rss`` option enables in-qemu/ebpf RSS for virtio NIC. RSS works w= ith + virtio and tap backends only. Virtio NIC will be launched with "rss" + property. For now "in-qemu" RSS is supported by libvirt. + QEMU may load eBPF RSS if it has CAP_SYS_ADMIN permissions, which is + not supported by default in libvirt. + **In general you should leave this option alone, unless you are very ce= rtain + you know what you are doing. Proper RSS configuration depends from vcpu, + tap, and vhost settings.** +``rss_hash_report`` + The ``rss_hash_report`` option enables in-qemu RSS hash report for virt= io + NIC. Virtio NIC will be launched with a "hash" property. Network packet= s provided + to VM will contain a hash of the packet in the virt header. Usually ena= bled + alongside with ``rss``. Without ``rss`` option, the hash report doesn't= affect + steering itself but provides vnet header with a calculated hash. + **In general you should leave this option alone, unless you are very ce= rtain + you know what you are doing. Proper RSS configuration depends from vcpu, + tap, and vhost settings.** virtio options For virtio interfaces, `Virtio-specific options <#elementsVirtio>`__ ca= n also be set. ( :since:`Since 3.5.0` ) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 7fa5c2b8b5..9b5b94fc6c 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -3595,6 +3595,16 @@ + + + + + + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 716c6d2240..762987e8a9 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -10271,6 +10271,8 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt, g_autofree char *vhost_path =3D NULL; g_autofree char *tap =3D NULL; g_autofree char *vhost =3D NULL; + g_autofree char *virtio_rss =3D NULL; + g_autofree char *virtio_rss_hash_report =3D NULL; const char *prefix =3D xmlopt ? xmlopt->config.netPrefix : NULL; =20 if (!(def =3D virDomainNetDefNew(xmlopt))) @@ -10412,6 +10414,8 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt, queues =3D virXMLPropString(driver_node, "queues"); rx_queue_size =3D virXMLPropString(driver_node, "rx_queue_size"); tx_queue_size =3D virXMLPropString(driver_node, "tx_queue_size"); + virtio_rss =3D virXMLPropString(driver_node, "rss"); + virtio_rss_hash_report =3D virXMLPropString(driver_node, "rss_hash_rep= ort"); =20 if ((filterref_node =3D virXPathNode("./filterref", ctxt))) { filter =3D virXMLPropString(filterref_node, "filter"); @@ -10822,7 +10826,24 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt, } def->driver.virtio.tx_queue_size =3D q; } - + if (virtio_rss) { + if ((val =3D virTristateSwitchTypeFromString(virtio_rss)) <=3D= 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("'rss' attribute must be 'on'/'off'/'default': %= s"), + virtio_rss); + goto error; + } + def->driver.virtio.rss =3D val; + } + if (virtio_rss_hash_report) { + if ((val =3D virTristateSwitchTypeFromString(virtio_rss_hash_r= eport)) <=3D 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("'rss_hash_report' attribute must be 'on'/'off'/= 'default': %s"), + virtio_rss_hash_report); + goto error; + } + def->driver.virtio.rss_hash_report =3D val; + } if ((tmpNode =3D virXPathNode("./driver/host", ctxt))) { if (virXMLPropTristateSwitch(tmpNode, "csum", VIR_XML_PROP_NON= E, &def->driver.virtio.host.csum) < = 0) @@ -24751,6 +24772,14 @@ virDomainVirtioNetDriverFormat(virBuffer *buf, if (def->driver.virtio.tx_queue_size) virBufferAsprintf(buf, " tx_queue_size=3D'%u'", def->driver.virtio.tx_queue_size); + if (def->driver.virtio.rss !=3D VIR_TRISTATE_SWITCH_ABSENT) { + virBufferAsprintf(buf, " rss=3D'%s'", + virTristateSwitchTypeToString(def->driver.virtio= .rss)); + } + if (def->driver.virtio.rss_hash_report !=3D VIR_TRISTATE_SWITCH_ABSENT= ) { + virBufferAsprintf(buf, " rss_hash_report=3D'%s'", + virTristateSwitchTypeToString(def->driver.virtio= .rss_hash_report)); + } =20 virDomainVirtioOptionsFormat(buf, def->virtio); } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 144ba4dd12..64ebff012e 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1055,6 +1055,8 @@ struct _virDomainNetDef { virTristateSwitch ecn; virTristateSwitch ufo; } guest; + virTristateSwitch rss; + virTristateSwitch rss_hash_report; } virtio; } driver; struct { --=20 2.34.1 From nobody Fri Apr 19 12:33:06 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; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com 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 1641762518951731.6218485806509; Sun, 9 Jan 2022 13:08:38 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-336-Lidj1tTzMwyHZbgi2iNPlw-1; Sun, 09 Jan 2022 16:08:36 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BC00A8042E2; Sun, 9 Jan 2022 21:08:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9D4165BE34; Sun, 9 Jan 2022 21:08:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6A47A4CA9B; Sun, 9 Jan 2022 21:08:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 209L7xaG003689 for ; Sun, 9 Jan 2022 16:07:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6ADDD46D1E8; Sun, 9 Jan 2022 21:07:59 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast10.extmail.prod.ext.rdu2.redhat.com [10.11.55.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 66E7C46D208 for ; Sun, 9 Jan 2022 21:07:59 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 457701C04B5A for ; Sun, 9 Jan 2022 21:07:54 +0000 (UTC) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-340-MPI6OhKaN9eMDD9vJ46uyw-1; Sun, 09 Jan 2022 16:07:52 -0500 Received: by mail-lf1-f45.google.com with SMTP id u13so37389477lff.12 for ; Sun, 09 Jan 2022 13:07:52 -0800 (PST) Received: from navi.cosmonova.net.ua ([95.67.24.131]) by smtp.gmail.com with ESMTPSA id o6sm767689lfk.232.2022.01.09.13.07.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 13:07:50 -0800 (PST) X-MC-Unique: Lidj1tTzMwyHZbgi2iNPlw-1 X-MC-Unique: MPI6OhKaN9eMDD9vJ46uyw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wLKvnapjTiJNOUxXQ3xm2mZyXz851IYu+ySVaA7Gxug=; b=UMozheTlOhXETkW3GA4S5bwjdjPwGkEiUu1cf8CIzO8xEPIFgBiweAPciyZJfalfPh Cj26w7pKa/7PKeirZyR5v4VlJA0zAwWlkxp3I7J3QH+UcSI4rKIb2Lr7FkS27W5Gl+s1 LK/D/YhNCMcTzaFeIPeeobNM+uh3T1AN0lEDWfqhyareul/boXVIUORunEQ/5maeS+wn yqU/P1cH+TC43jRpB5SFG6G0ZqTWOczKelPVQEbGSTHDpsU/J4RitmMloH9TZZ4apPdy aPiyzMRW1tIrfZxVB06asw1NLkGrqEtXKuSQP/NGQwTvZ4lDZ8pSH0TZbHDw4h6UCY/i 4U8w== X-Gm-Message-State: AOAM533hry1Me+EfjoBnH8DQI8NfHfKoW/FI9mbyZjFy5hUi4XnmkI6d D0jL+7hwEUuxuj6TrH5OS2ZGyfcqTqe9z8Rb X-Google-Smtp-Source: ABdhPJyjlUSipqTtVMt9qdhQ1eaafspjn/8s471AdcbR+LKZ5BrwtFnm55U2y0/SETCMK7UtGLCfeQ== X-Received: by 2002:a05:651c:4d3:: with SMTP id e19mr54936307lji.467.1641762470610; Sun, 09 Jan 2022 13:07:50 -0800 (PST) From: Andrew Melnychenko To: libvir-list@redhat.com Subject: [PATCH v2 2/4] qemu_capabilities: Added capabilites for qemu's "rss" and "hash". Date: Sun, 9 Jan 2022 23:07:36 +0200 Message-Id: <20220109210738.2867080-3-andrew@daynix.com> In-Reply-To: <20220109210738.2867080-1-andrew@daynix.com> References: <20220109210738.2867080-1-andrew@daynix.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-loop: libvir-list@redhat.com Cc: yan@daynix.com, yuri.benditovich@daynix.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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-ZM-MESSAGEID: 1641762519542100001 Content-Type: text/plain; charset="utf-8" And added capability QEMU_CAPS_VIRTIO_RSS. With "rss" and "rss_hash_report" from domain config, qemu should enable "rss" and "hash" for virtio-net. Added caps tests for qemu 5.2+. Signed-off-by: Andrew Melnychenko Reviewed-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 + 15 files changed, 16 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 4f63322a9e..8cfbd77977 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -653,6 +653,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "query-dirty-rate", /* QEMU_CAPS_QUERY_DIRTY_RATE */ "rbd-encryption", /* QEMU_CAPS_RBD_ENCRYPTION */ "sev-guest-kernel-hashes", /* QEMU_CAPS_SEV_GUEST_KERNEL_HAS= HES */ + "virtio-net.rss", /* QEMU_CAPS_VIRTIO_NET_RSS */ ); =20 =20 @@ -1410,6 +1411,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCaps= DevicePropsVirtioNet[] =3D { { "failover", QEMU_CAPS_VIRTIO_NET_FAILOVER, NULL }, { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL }, { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL }, + { "rss", QEMU_CAPS_VIRTIO_NET_RSS, NULL }, }; =20 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPCIeRootPo= rt[] =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index aaac20a834..a6771a8feb 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -632,6 +632,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_QUERY_DIRTY_RATE, /* accepts query-dirty-rate */ QEMU_CAPS_RBD_ENCRYPTION, /* Ceph RBD encryption support */ QEMU_CAPS_SEV_GUEST_KERNEL_HASHES, /* sev-guest.kernel-hashes=3D */ + QEMU_CAPS_VIRTIO_NET_RSS, /* virtio-net rss feature */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.1.0.x86_64.xml index 578e16e8b0..24d40c5635 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -224,6 +224,7 @@ + 5001000 0 43100242 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.2.0.aarch64.xml index b943eaedaf..149781aea7 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -184,6 +184,7 @@ + 5002000 0 61700243 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.2.0.ppc64.xml index ec64e1cacf..3a08a306a5 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -190,6 +190,7 @@ + 5002000 0 42900243 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml b/tests/qemu= capabilitiesdata/caps_5.2.0.riscv64.xml index a11d15f91a..1d47c11a2b 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml @@ -174,6 +174,7 @@ + 5002000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_5.2.0.s390x.xml index 552e1d43c9..ea9f7c0fc1 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -141,6 +141,7 @@ + 5002000 0 39100243 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.2.0.x86_64.xml index bcc262551a..1df20ab526 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -227,6 +227,7 @@ + 5002000 0 43100243 diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_6.0.0.aarch64.xml index 0fefe64537..c96c604957 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml @@ -192,6 +192,7 @@ + 6000000 0 61700242 diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_6.0.0.s390x.xml index 61685066b8..fc9eb589fe 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml @@ -149,6 +149,7 @@ + 6000000 0 39100242 diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.0.0.x86_64.xml index 1b394198f1..425dfb12c1 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -235,6 +235,7 @@ + 6000000 0 43100242 diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.1.0.x86_64.xml index 1f4f49eb34..6fe35a867b 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -239,6 +239,7 @@ + 6001000 0 43100243 diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_6.2.0.aarch64.xml index 9662214cd8..9cc2e58e7b 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -204,6 +204,7 @@ + 6001050 0 61700244 diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_6.2.0.ppc64.xml index 94528ba13a..c177ab0aae 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml @@ -200,6 +200,7 @@ + 6001050 0 42900244 diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.2.0.x86_64.xml index b7d6effa94..50a4fa13f9 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -241,6 +241,7 @@ + 6002000 0 43100244 --=20 2.34.1 From nobody Fri Apr 19 12:33:06 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; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com 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 1641762490284793.5579501728542; Sun, 9 Jan 2022 13:08:10 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-482-J2YKDWXkPJa4NprI7oFuXg-1; Sun, 09 Jan 2022 16:08:05 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1ADFA2F2C; Sun, 9 Jan 2022 21:08:01 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B0E914E2CF; Sun, 9 Jan 2022 21:08:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4378A1809CBA; Sun, 9 Jan 2022 21:07:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 209L7sFq003638 for ; Sun, 9 Jan 2022 16:07:54 -0500 Received: by smtp.corp.redhat.com (Postfix) id 489A6C23DC2; Sun, 9 Jan 2022 21:07:54 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3A338C08092 for ; Sun, 9 Jan 2022 21:07:54 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1C578811E85 for ; Sun, 9 Jan 2022 21:07:54 +0000 (UTC) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-367-2jJjA9C7MD2h2crk55v03Q-2; Sun, 09 Jan 2022 16:07:52 -0500 Received: by mail-lf1-f52.google.com with SMTP id i31so37392686lfv.10 for ; Sun, 09 Jan 2022 13:07:51 -0800 (PST) Received: from navi.cosmonova.net.ua ([95.67.24.131]) by smtp.gmail.com with ESMTPSA id o6sm767689lfk.232.2022.01.09.13.07.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 13:07:51 -0800 (PST) X-MC-Unique: J2YKDWXkPJa4NprI7oFuXg-1 X-MC-Unique: 2jJjA9C7MD2h2crk55v03Q-2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0I1RpKdxZqQpnVZpNzHC+r9US6M1BvGoHV+13MYH1JU=; b=Xuf7cur6h+1xdl/YR74pZJmR28E5zSNIydMFaMZHz3E/CCUhiDsgyMQvIFYQOgUcw3 z88YA/epy9Ql0lkKHIh6FjmtG3qKr2t6NTRZRuYVWVIAi9jzKx8V9XsNd0q4NbvIBnuM lmIt5NHNiXSnAsosqJWdNyqmt9T/HaqBAVNcJuuIOOCmz+oDzapafcYJmFOTJjY9Hhpu lT2ebYGPzfi9Qxi1FCi6x76nH5xQmmYfpo11Sb2Gq3E0dHZaHjRlG6XlFVEhz11Lbnvg Y9FUgjvuXEmn6VLbmejH7IhwCWCVpgJ/t6AXU69lozPMjPeAYral8AQYJJjoEehoo8DZ 78rA== X-Gm-Message-State: AOAM531M3EuGgDhLCpOSQ4V2EE3V0ELaVNU8inSCRymOhwDD2QZfFoo8 bFsfOm4DRXY7dj768WUZTCX1qT4vUd02TNw2 X-Google-Smtp-Source: ABdhPJwgPjJiW+WWJ8oifqKhM1qDufCmEtSYbGLreD1KSSlCPQt0o2XXKSChHNDiEzoMUhjhOaJyPA== X-Received: by 2002:a05:6512:2216:: with SMTP id h22mr61957243lfu.148.1641762471429; Sun, 09 Jan 2022 13:07:51 -0800 (PST) From: Andrew Melnychenko To: libvir-list@redhat.com Subject: [PATCH v2 3/4] qemu_command: Added "rss" and "hash" properties. Date: Sun, 9 Jan 2022 23:07:37 +0200 Message-Id: <20220109210738.2867080-4-andrew@daynix.com> In-Reply-To: <20220109210738.2867080-1-andrew@daynix.com> References: <20220109210738.2867080-1-andrew@daynix.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-loop: libvir-list@redhat.com Cc: yan@daynix.com, yuri.benditovich@daynix.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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-ZM-MESSAGEID: 1641762491820100001 Content-Type: text/plain; charset="utf-8" Libvirt will create an NIC device command line with enabled "rss"/"hash". If domain config contains "rss" and/or "rss_hash_report" options for driver. Also if the qemu has device capabilities for RSS. Signed-off-by: Andrew Melnychenko Reviewed-by: Michal Privoznik --- src/qemu/qemu_command.c | 2 ++ src/qemu/qemu_validate.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d822533ccb..dfe6eefd1e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4168,6 +4168,8 @@ qemuBuildNicDevProps(virDomainDef *def, "P:vectors", vectors, "p:rx_queue_size", net->driver.virtio.rx= _queue_size, "p:tx_queue_size", net->driver.virtio.tx= _queue_size, + "T:rss", net->driver.virtio.rss, + "T:hash", net->driver.virtio.rss_hash_re= port, "p:host_mtu", net->mtu, "T:failover", failover, NULL) < 0) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 3a69733f81..155bb4a550 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1743,6 +1743,20 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNe= tDef *net, } } =20 + if (net->driver.virtio.rss && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_RSS)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("virtio rss is not supported with this QEMU b= inary")); + return -1; + } + + if (net->driver.virtio.rss_hash_report && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_RSS)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("virtio rss hash report is not supported with= this QEMU binary")); + return -1; + } + if (net->mtu && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_HOST_MTU)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", --=20 2.34.1 From nobody Fri Apr 19 12:33:06 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; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com 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 1641762513376876.104413372635; Sun, 9 Jan 2022 13:08:33 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-66-jc7D3iNOM1yEHZiMIHqVig-1; Sun, 09 Jan 2022 16:08:30 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8CE6B801B04; Sun, 9 Jan 2022 21:08:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F1FC1037F3F; Sun, 9 Jan 2022 21:08:25 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 10E8F1806D2B; Sun, 9 Jan 2022 21:08:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 209L7uxO003653 for ; Sun, 9 Jan 2022 16:07:56 -0500 Received: by smtp.corp.redhat.com (Postfix) id 447342166B25; Sun, 9 Jan 2022 21:07:56 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast07.extmail.prod.ext.rdu2.redhat.com [10.11.55.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3FA822166B2F for ; Sun, 9 Jan 2022 21:07:56 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 258663C02B64 for ; Sun, 9 Jan 2022 21:07:56 +0000 (UTC) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-394-W5IHOAVuO_a3YCnerzr02A-1; Sun, 09 Jan 2022 16:07:54 -0500 Received: by mail-lf1-f49.google.com with SMTP id o12so37541817lfk.1 for ; Sun, 09 Jan 2022 13:07:53 -0800 (PST) Received: from navi.cosmonova.net.ua ([95.67.24.131]) by smtp.gmail.com with ESMTPSA id o6sm767689lfk.232.2022.01.09.13.07.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 13:07:51 -0800 (PST) X-MC-Unique: jc7D3iNOM1yEHZiMIHqVig-1 X-MC-Unique: W5IHOAVuO_a3YCnerzr02A-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8vLWzEZLKDfCvCoZ8ECoRI1pZ7mdNmA0KhK6cx+0gHE=; b=QBWrkxAtJOfJ2Rq29366qa1KZ0FTOPZ+idkvGJxnB9XgDW7LKWAmfyDDuFHJqA8JEr ze1zsq6GLY5CsiQd9t15b/a7UzTrb5HYu0SNApDAut50rbeeZYKhy2v3kkfZQDz0KRk9 29SXBqAlb4/OOGFKWrEevRcL97y67OhpvMy6aSXFXMN63QJM/4bytu8WUZTuWMnnDovh PFXGv1afq1Y/Y8jiC++5IFf3hnLq/zVNAfNADd+ntDiqYm9abQDmF3hsL/INW4ZaArTa Jv7IZQUS9SOuRtWgyp5FCuvPtR5FOvRJ0G+GzfZhMzR1nXF7fRrOKfpai/ZJKC3gU1pV KhRw== X-Gm-Message-State: AOAM530CeB2rCgmbQLhcX5fxwILfBNYQYucR4OD4wu9/2qUtGXle6Eb6 FnGpB3CUwneSiuWB7+kAouhNuP9FT1egR5sn X-Google-Smtp-Source: ABdhPJwOsb+B/d4hY17KHMlyy/VnnmzovcjyOmLO8vXlNE4Th0s9gPoPOy4Ga3jZf3ltzrIS/hwQvg== X-Received: by 2002:a2e:7c06:: with SMTP id x6mr55988003ljc.138.1641762472327; Sun, 09 Jan 2022 13:07:52 -0800 (PST) From: Andrew Melnychenko To: libvir-list@redhat.com Subject: [PATCH v2 4/4] test: Added xml2argv and xml2xml tests. Date: Sun, 9 Jan 2022 23:07:38 +0200 Message-Id: <20220109210738.2867080-5-andrew@daynix.com> In-Reply-To: <20220109210738.2867080-1-andrew@daynix.com> References: <20220109210738.2867080-1-andrew@daynix.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: yan@daynix.com, yuri.benditovich@daynix.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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-ZM-MESSAGEID: 1641762515074100001 Content-Type: text/plain; charset="utf-8" Added rss, hash and rss+hash xml2argv tests. virtio-options tests was used for xml2xml test. Signed-off-by: Andrew Melnychenko Reviewed-by: Michal Privoznik --- .../net-virtio-rss.x86_64-latest.args | 43 +++++++++++++++++++ tests/qemuxml2argvdata/net-virtio-rss.xml | 39 +++++++++++++++++ .../virtio-options.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/virtio-options.xml | 2 +- tests/qemuxml2argvtest.c | 2 + 5 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 tests/qemuxml2argvdata/net-virtio-rss.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-virtio-rss.xml diff --git a/tests/qemuxml2argvdata/net-virtio-rss.x86_64-latest.args b/tes= ts/qemuxml2argvdata/net-virtio-rss.x86_64-latest.args new file mode 100644 index 0000000000..af35b2cc5a --- /dev/null +++ b/tests/qemuxml2argvdata/net-virtio-rss.x86_64-latest.args @@ -0,0 +1,43 @@ +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-i386 \ +-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"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","no= de-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw= ","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-form= at","id":"ide0-0-0","bootindex":1}' \ +-netdev user,id=3Dhostnet0 \ +-device '{"driver":"virtio-net-pci","rss":true,"netdev":"hostnet0","id":"n= et0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \ +-netdev user,id=3Dhostnet1 \ +-device '{"driver":"virtio-net-pci","hash":true,"netdev":"hostnet1","id":"= net1","mac":"00:11:22:33:44:66","bus":"pci.0","addr":"0x3"}' \ +-netdev user,id=3Dhostnet2 \ +-device '{"driver":"virtio-net-pci","rss":false,"hash":true,"netdev":"host= net2","id":"net2","mac":"00:11:22:33:44:77","bus":"pci.0","addr":"0x4"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x5"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/net-virtio-rss.xml b/tests/qemuxml2argv= data/net-virtio-rss.xml new file mode 100644 index 0000000000..98e761962d --- /dev/null +++ b/tests/qemuxml2argvdata/net-virtio-rss.xml @@ -0,0 +1,39 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i386 + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/qemuxml2argvdata/virtio-options.x86_64-latest.args b/tes= ts/qemuxml2argvdata/virtio-options.x86_64-latest.args index 48f6b23c0d..ff21b4bf4a 100644 --- a/tests/qemuxml2argvdata/virtio-options.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-options.x86_64-latest.args @@ -38,7 +38,7 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -fsdev local,security_model=3Dmapped,writeout=3Dimmediate,id=3Dfsdev-fs1,p= ath=3D/export/fs2 \ -device '{"driver":"virtio-9p-pci","iommu_platform":true,"ats":true,"packe= d":true,"page-per-vq":true,"id":"fs1","fsdev":"fsdev-fs1","mount_tag":"fs2"= ,"bus":"pci.0","addr":"0x4"}' \ -netdev user,id=3Dhostnet0 \ --device '{"driver":"virtio-net-pci","iommu_platform":true,"ats":true,"pack= ed":true,"page-per-vq":true,"netdev":"hostnet0","id":"net0","mac":"52:54:56= :58:5a:5c","bus":"pci.0","addr":"0x6"}' \ +-device '{"driver":"virtio-net-pci","iommu_platform":true,"ats":true,"pack= ed":true,"page-per-vq":true,"rss":true,"hash":true,"netdev":"hostnet0","id"= :"net0","mac":"52:54:56:58:5a:5c","bus":"pci.0","addr":"0x6"}' \ -device '{"driver":"virtio-mouse-pci","iommu_platform":true,"ats":true,"pa= cked":true,"page-per-vq":true,"id":"input0","bus":"pci.0","addr":"0xe"}' \ -device '{"driver":"virtio-keyboard-pci","iommu_platform":true,"ats":true,= "packed":true,"page-per-vq":true,"id":"input1","bus":"pci.0","addr":"0x10"}= ' \ -device '{"driver":"virtio-tablet-pci","iommu_platform":true,"ats":true,"p= acked":true,"page-per-vq":true,"id":"input2","bus":"pci.0","addr":"0x11"}' \ diff --git a/tests/qemuxml2argvdata/virtio-options.xml b/tests/qemuxml2argv= data/virtio-options.xml index 59e293d8e9..486bc453a1 100644 --- a/tests/qemuxml2argvdata/virtio-options.xml +++ b/tests/qemuxml2argvdata/virtio-options.xml @@ -53,7 +53,7 @@ - +
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 6c67b36d5c..5227f76dce 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3500,6 +3500,8 @@ mymain(void) =20 DO_TEST_CAPS_LATEST("devices-acpi-index"); =20 + DO_TEST_CAPS_LATEST("net-virtio-rss"); + if (getenv("LIBVIRT_SKIP_CLEANUP") =3D=3D NULL) virFileDeleteTree(fakerootdir); =20 --=20 2.34.1