From nobody Mon Feb 9 00:56:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1667896229; cv=none; d=zohomail.com; s=zohoarc; b=CNp8jeOcWn01ReDg/yRyU3Cp1oPSx15cqBjVI5hkcAKXWv+lKXf0thqAM5z/4K8kaPaDTdSggMwlUpmE+Fkt1ouVV3yY8Nq/DFuOAexLIkGK+Ot6Fa31TtUtEiDSnU0i6yULEfkmp2TuShYhbAV7cf+D7Ch0KyApfLiyel75CFk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667896229; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8b0Dd5G9/bri4AOrITJrhSNAO6drRKS3GnhmoCSR/OU=; b=Jv/h70mkAkHVtiAksk7fNgc5+8SePASya6+XckzoO9KuufGn+kl2upu6rf6dD22jlaycBbRhkiH5NxJTCZsu5JgBdzwLi5lp5vyU60ruEJmpLeH4cNh7WPOd3fWNmsUAjkEP9JHScfucIhqMOK212vylTuv9tPX+PdpKYR0eqbQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1667896229491313.96271198924876; Tue, 8 Nov 2022 00:30:29 -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-205-i2QPHb-CNTiIXcYQiXU2Gw-1; Tue, 08 Nov 2022 03:30:24 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E90A33814943; Tue, 8 Nov 2022 08:30:19 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D2C87112132D; Tue, 8 Nov 2022 08:30:19 +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 9C9A81946A7F; Tue, 8 Nov 2022 08:30:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E0D3919465A3 for ; Tue, 8 Nov 2022 08:30:11 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CAFD810197; Tue, 8 Nov 2022 08:30:11 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F55035429 for ; Tue, 8 Nov 2022 08:30:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667896228; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=8b0Dd5G9/bri4AOrITJrhSNAO6drRKS3GnhmoCSR/OU=; b=UGHLIVJz4e68W7qbxKyN4pFFX+mwMpvwc9X7vEBSsg0u1QbLQNTxoPH8hpiZL6uB3b5Dcf zYN2QqW1p9l1+Hs1t/EvjeFxpheTopsz6GtmJWy5nRDj71kWNcKHLhCXPmxu3gR1amWbYT icyy1xzolpb96G1rbOK+vaEBC2vc6uw= X-MC-Unique: i2QPHb-CNTiIXcYQiXU2Gw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 31/48] qemu: Assume QEMU_CAPS_VIRTIO_NET_HOST_MTU Date: Tue, 8 Nov 2022 09:29:33 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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: 1667896230854100011 Content-Type: text/plain; charset="utf-8"; x-default="true" Introduced in QEMU's commit of v2.9.0-rc0~162^2~10 the .host_mtu attribute of virtio-net device is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_validate.c | 8 -------- tests/qemuxml2xmltest.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 88f2aa8c49..c01bc6f8b5 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1889,14 +1889,6 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNe= tDef *net, _("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", - _("setting MTU is not supported with this " - "QEMU binary")); - return -1; - } } =20 if (net->mtu && diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index e8261b7e8c..3a117ff137 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -493,7 +493,7 @@ mymain(void) DO_TEST_NOCAPS("watchdog"); DO_TEST("net-bandwidth", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_VNC); DO_TEST("net-bandwidth2", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_VNC); - DO_TEST("net-mtu", QEMU_CAPS_VIRTIO_NET_HOST_MTU); + DO_TEST_NOCAPS("net-mtu"); DO_TEST_NOCAPS("net-coalesce"); DO_TEST_NOCAPS("net-many-models"); DO_TEST("net-vdpa", QEMU_CAPS_NETDEV_VHOST_VDPA); --=20 2.37.4