From nobody Tue Feb 10 03:44:37 2026 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 1627481632412439.5168035211806; Wed, 28 Jul 2021 07:13:52 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-128-BBDixJV1O8WMz3hEMEYDPA-1; Wed, 28 Jul 2021 10:13:48 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9E5191006C87; Wed, 28 Jul 2021 14:13:42 +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 81ACF136F5; Wed, 28 Jul 2021 14:13:42 +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 4EEB8180BAB2; Wed, 28 Jul 2021 14:13:42 +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 16S8IIV4013777 for ; Wed, 28 Jul 2021 04:18:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6EBAD200E4A9; Wed, 28 Jul 2021 08:18:18 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 69F36200AD0C for ; Wed, 28 Jul 2021 08:18:18 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (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 5226489C7DE for ; Wed, 28 Jul 2021 08:18:18 +0000 (UTC) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-406-uMBQXLHNMGmlxJN5quVsiw-1; Wed, 28 Jul 2021 04:18:15 -0400 Received: by mail-lf1-f44.google.com with SMTP id bp1so2419066lfb.3 for ; Wed, 28 Jul 2021 01:18:15 -0700 (PDT) Received: from navi.cosmonova.net.ua ([95.67.24.131]) by smtp.gmail.com with ESMTPSA id p5sm571964lfd.240.2021.07.28.01.18.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 01:18:13 -0700 (PDT) X-MC-Unique: BBDixJV1O8WMz3hEMEYDPA-1 X-MC-Unique: uMBQXLHNMGmlxJN5quVsiw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7Qst4T0enrLp9cPcgBgdhNhZEXmKH6ojHbel9wiCxHw=; b=eiOqnGcFF6+H7cKUstxJOtessmgDn+ikT3HxhT3s19bypRwGXYPxr9FHdp1T54bZYb ZpzOzAX5CMLNVR/loi3meBL6QDgaicNgzRBepcn42W8AxbBO8eY7uJhowan0MtS8p8/x P1MvFBOHdTvBLKHwO/JhYrUb5P4rU3PLzxDvy03vvXbyfuXYBOT6IcJ3f/DOA0lo5yyH KcCMuxw/0DAzuR/A/NNMAkNfajgZzH/qRivfF0qFawaXmmLK/tq7Xaf96a0noWsaV89c 2+QddIUHoQR4rzJjoM1BIk6fMAzr6L8JDwWbbqjMfVIUEfLuP2uH1/J0lmG9qdsEDXB1 mSCg== X-Gm-Message-State: AOAM5329VFWyULnxu3XmqY2+bpwGN+6jOK6HIzowl0sfbDGMmJvExKgf xqkyuimEz0mrhMYZ0qBl/UuIoiaDGy9/piEe X-Google-Smtp-Source: ABdhPJwEmfgbxF3Wp50xupd6J5+XoG8Ly6yFR+gDPqGMNsWwvxvJ7Yvaxn0vYUBwFpZut1H1DwwQvg== X-Received: by 2002:a19:6709:: with SMTP id b9mr9290656lfc.95.1627460294030; Wed, 28 Jul 2021 01:18:14 -0700 (PDT) From: Andrew Melnychenko To: libvir-list@redhat.com Subject: [RFC PATCH 02/10] qemu_capabilities: Added capabilites for qemu's "rss" and "hash". Date: Wed, 28 Jul 2021 11:17:06 +0300 Message-Id: <20210728081714.715287-3-andrew@daynix.com> In-Reply-To: <20210728081714.715287-1-andrew@daynix.com> References: <20210728081714.715287-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 X-Mailman-Approved-At: Wed, 28 Jul 2021 10:13:24 -0400 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.11 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: 1627481633038100006 Content-Type: text/plain; charset="utf-8" Added qemu's property check for virtio-net. 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. Signed-off-by: Andrew Melnychenko --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_validate.c | 16 ++++++++++++++++ 3 files changed, 19 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 9558938866..7cd6dab259 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -637,6 +637,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "confidential-guest-support", "query-display-options", "s390-pv-guest", + "virtio-net.rss", ); =20 =20 @@ -1421,6 +1422,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_RSS, NULL }, }; =20 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPCIeRootPo= rt[] =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 2b1bb57a49..6b2446fe5f 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -617,6 +617,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPORT, /* -machine confidential-= guest-support */ QEMU_CAPS_QUERY_DISPLAY_OPTIONS, /* 'query-display-options' qmp comman= d present */ QEMU_CAPS_S390_PV_GUEST, /* -object s390-pv-guest,... */ + QEMU_CAPS_VIRTIO_RSS, /* virtio-net rss feature */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index a964c8593d..265938a99f 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1607,6 +1607,22 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNe= tDef *net, } } =20 + if (net->driver.virtio.rss && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_RSS)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("virtio rss is not supported with this " + "QEMU binary")); + return -1; + } + + if (net->driver.virtio.rss_hash_report && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_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.31.1