From nobody Fri Dec 19 06:01:16 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1602708310; cv=none; d=zohomail.com; s=zohoarc; b=k5ku2foP+Gbb7S5Q30TbGL/H7RanZrwvTQ0pX+9mkC0e+vXdbUF3fWz1tLoVsip0PAhYmpSaPF/Z6K/9Qg4iZ7uaGvNZq0TA4MVd+oIjWi/DoAdzadwnPfJ5VjRAHlrSAgeTN7YWne8DflmpVVXZVh0KFYp1LjI7JtgMWVXcq2w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602708310; h=Content-Type:Content-Transfer-Encoding:Cc: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=YbkeYcP+DAaM2I+vrtsrWZa2dz4nbHdQ62yGl7rpMhk=; b=hN0KGqgXXid7MXCXE+1/CFVPS0wa38FGgL/giP90hqQ3nmm8CgtsscTMxpjwZmGhmMdNzSga+rIbB9jss1kil1y4gSYJoqvmDE842jNUzpv9wL3QKq1/xdrRR33foBwzx7vZYOK2KD0RlNPyChjIjW/QoMiOcOXN/EYPGyze2L0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1602708310370950.2408711434473; Wed, 14 Oct 2020 13:45:10 -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-557-lWmA6l2JPCCiypcYLu8LOg-1; Wed, 14 Oct 2020 16:44:48 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BE31F5708F; Wed, 14 Oct 2020 20:44:41 +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 948321992D; Wed, 14 Oct 2020 20:44:41 +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 615BA181A899; Wed, 14 Oct 2020 20:44:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09EKhZWV028668 for ; Wed, 14 Oct 2020 16:43:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id A48421067DB4; Wed, 14 Oct 2020 20:43:35 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A05F910921B9 for ; Wed, 14 Oct 2020 20:43:35 +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-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7A40B1021F73 for ; Wed, 14 Oct 2020 20:43:35 +0000 (UTC) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-278-49Oy1sTWOpagnrPjpz6TGg-1; Wed, 14 Oct 2020 16:43:33 -0400 Received: by mail-io1-f43.google.com with SMTP id q25so963151ioh.4 for ; Wed, 14 Oct 2020 13:43:33 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:5a9b:54fc:df2a:8a5e:989b]) by smtp.gmail.com with ESMTPSA id i4sm492202ilc.27.2020.10.14.13.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 13:43:31 -0700 (PDT) X-MC-Unique: lWmA6l2JPCCiypcYLu8LOg-1 X-MC-Unique: 49Oy1sTWOpagnrPjpz6TGg-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=YbkeYcP+DAaM2I+vrtsrWZa2dz4nbHdQ62yGl7rpMhk=; b=FHaKks8gck71CUxxTIwq5Xn4EK2l8/6Rf7+DgS8nhtNeeqEx3/myXelwgWJqYz4nDw xeUY8i4A4ZdaYoEwO6GFxQ6nQJBAr5ZsjI1J7s+AFEsDqznS5q90ot1FCWfYvWXhVDVK bBKKNGMSeevIFrHsVyTJfQdcb/ZWWdhF/j2rQcSHzSrhiJM5G34f0q6VacXmnXkN8IEC NKRM6fJ31glQ/jh05oxUxt8hSJGY2wMXn8jyy/9OlUYubJ1YwBgjHG3ExQ3py7PjkGM5 AJvfW/l/wUMH9mJ6ii4sUWsJ7Ziob2eA0QRo4qNXucCF67AHiuHf5lAwwDV5MTNCV7OH luuQ== X-Gm-Message-State: AOAM5316v0LJ0cnpcPoPl9GHz6mD6CuMeAb5XFuGJmpptsFUdNZJjtWQ ikb9xMPDunnI8OGiDhSBNeOBi+5EIJ8= X-Google-Smtp-Source: ABdhPJyquFw+YP8jGhCKKK63ynXxYJAABq9cXbHdf3GU/tVSfDWp7Th9loYH+ziU8ZP6caOJG0fd5g== X-Received: by 2002:a6b:6b09:: with SMTP id g9mr917221ioc.203.1602708212123; Wed, 14 Oct 2020 13:43:32 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 07/24] qemu_command.c: move QEMU_CAPS_VIRTIO_TX_ALG check to qemu_validate.c Date: Wed, 14 Oct 2020 17:42:50 -0300 Message-Id: <20201014204307.631746-8-danielhb413@gmail.com> In-Reply-To: <20201014204307.631746-1-danielhb413@gmail.com> References: <20201014204307.631746-1-danielhb413@gmail.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.3 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza 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.23 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 Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_command.c | 4 ---- src/qemu/qemu_validate.c | 8 ++++++++ tests/qemuxml2xmltest.c | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 06ac175b67..1629fac659 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3330,10 +3330,6 @@ qemuBuildNicDevStr(virDomainDefPtr def, net->driver.virtio.txmode); return NULL; } - } else { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("virtio-net-pci 'tx' option not supported in = this QEMU binary")); - return NULL; } } if (usingVirtio) { diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index beaa1aedce..c874a05f5b 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1253,6 +1253,14 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNe= tDef *net, } =20 if (virDomainNetIsVirtioModel(net)) { + if (net->driver.virtio.txmode && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_TX_ALG)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("virtio-net-pci 'tx' option not supported in " + "this QEMU binary")); + return -1; + } + if (net->driver.virtio.rx_queue_size & (net->driver.virtio.rx_queu= e_size - 1)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("rx_queue_size has to be a power of two")); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index f4a5aa18f7..c1b70025b1 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -467,7 +467,7 @@ mymain(void) DO_TEST("net-user", NONE); DO_TEST("net-user-addr", NONE); DO_TEST("net-virtio", NONE); - DO_TEST("net-virtio-device", NONE); + DO_TEST("net-virtio-device", QEMU_CAPS_VIRTIO_TX_ALG); DO_TEST("net-virtio-disable-offloads", NONE); DO_TEST("net-eth", NONE); DO_TEST("net-eth-ifname", NONE); @@ -795,7 +795,7 @@ mymain(void) DO_TEST("numad-auto-memory-vcpu-no-cpuset-and-placement", NONE); DO_TEST("numad-auto-memory-vcpu-cpuset", NONE); DO_TEST("usb-ich9-ehci-addr", NONE); - DO_TEST("disk-copy_on_read", NONE); + DO_TEST("disk-copy_on_read", QEMU_CAPS_VIRTIO_TX_ALG); DO_TEST_CAPS_LATEST("tpm-passthrough"); DO_TEST_CAPS_LATEST("tpm-passthrough-crb"); DO_TEST_CAPS_LATEST("tpm-emulator"); --=20 2.26.2