From nobody Mon Feb 9 10:25:41 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 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 --- 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