From nobody Mon Feb 9 16:35:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.151.124 as permitted sender) client-ip=170.10.151.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.151.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=1633623332; cv=none; d=zohomail.com; s=zohoarc; b=PJcARJ/hs/UodqNHguMAr8pUHqsGlReLkMrFgJ1lmV9+uYWkOb8um+o6Cu5hBVj1/Wd8yhL5vmBcz4vt9EXRUUN0ya5IiWox+dp3cAgid0FCzNZ7bFr0Y9ei/JSZ2sDAtp2nUiPcn5cd31c1vdL6ES0Hq5L/9M8hRmtqpZZjxdE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633623332; 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=0Fd+OHgzuVhOvfr/GABNicApvmnuwu2X8r+Fd49E4vA=; b=BNEkObkxejPH2WCrASZwRD+gg2KxF+6//N2vkuOQQk6gznL5GhWF/W2YEaOD/aONG8dNRHyMUhxB/PNf4IRMk0dr0tri2xMTwW39YidWxvk6fC63N4MvN1ZswJSiaHctdciTTpulI/almnR+Aprjqjf813tbO1JUUVzKfi0X6CI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.151.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 (usb-smtp-delivery-124.mimecast.com [170.10.151.124]) by mx.zohomail.com with SMTPS id 1633623332808573.9943565105209; Thu, 7 Oct 2021 09:15:32 -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-2-VgZhKvJYM1C2VmVJRaAyuw-1; Thu, 07 Oct 2021 12:15:29 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 27EAF36C00C; Thu, 7 Oct 2021 15:57:39 +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 4E549FAF32; Thu, 7 Oct 2021 15:55:57 +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 1BE404EA2A; Thu, 7 Oct 2021 15:55:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 197FL36I024428 for ; Thu, 7 Oct 2021 11:21:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id D9FBD5D6D5; Thu, 7 Oct 2021 15:21:03 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4115B5D6BA for ; Thu, 7 Oct 2021 15:21:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633623331; 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=0Fd+OHgzuVhOvfr/GABNicApvmnuwu2X8r+Fd49E4vA=; b=EQZsLh40R/XQx5PrQ4tggIosIuFZMztXHn+uOsFk+ihM/+Z7igkwrhQlPOwipGSg/cKkSB l4Dqqe8seZ6ThFnJwGASbxCQinB/aEE0yQvltu2AcbhY0CKsSw6F5GIFmkcvYfu3zhJq5w QA55CkxRTx7hYpRmuPiEiLoHuGOm8dc= X-MC-Unique: VgZhKvJYM1C2VmVJRaAyuw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 082/103] qemuBuildNicDevProps: Move formatting of bootindex Date: Thu, 7 Oct 2021 17:18:10 +0200 Message-Id: <220819b2e690ff4ac035188c6a62afe738eb036f.1633619630.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.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.16 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-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633623333610100001 Content-Type: text/plain; charset="utf-8" Move the bootindex before the address so that the code is simpler. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 6 +----- tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args | 2 +- tests/qemuxml2argvdata/boot-complex.args | 2 +- tests/qemuxml2argvdata/boot-order.args | 2 +- tests/qemuxml2argvdata/controller-order.args | 2 +- .../machine-loadparm-multiple-disks-nets-s390.args | 2 +- tests/qemuxml2argvdata/machine-loadparm-net-s390.args | 2 +- 7 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 54f50c9a5e..2d47528d53 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3956,6 +3956,7 @@ qemuBuildNicDevProps(virDomainDef *def, "f:netdev", g_strdup_printf("host%s", net->i= nfo.alias), "s:id", net->info.alias, "s:mac", macaddr, + "p:bootindex", net->info.effectiveBootIndex, NULL) < 0) return NULL; @@ -3965,11 +3966,6 @@ qemuBuildNicDevProps(virDomainDef *def, if (qemuBuildRomProps(props, &net->info) < 0) return NULL; - if (virJSONValueObjectAdd(props, - "p:bootindex", net->info.effectiveBootIndex, - NULL) < 0) - return NULL; - return g_steal_pointer(&props); } diff --git a/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args b/tes= ts/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args index 49d918e393..ce3b68bf18 100644 --- a/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args +++ b/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args @@ -29,6 +29,6 @@ QEMU_AUDIO_DRV=3Dnone \ -device ioh3420,port=3D0x8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,multifuncti= on=3Don,addr=3D0x1 \ -device ioh3420,port=3D0x9,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,multifuncti= on=3Don,addr=3D0x1.0x1 \ -netdev user,id=3Dhostnet0 \ --device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:73:34:53= ,bus=3Dpci.1,addr=3D0x0,bootindex=3D1 \ +-device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:73:34:53= ,bootindex=3D1,bus=3Dpci.1,addr=3D0x0 \ -device virtio-gpu-pci,id=3Dvideo0,bus=3Dpci.2,addr=3D0x0 \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/boot-complex.args b/tests/qemuxml2argvd= ata/boot-complex.args index 90d3770117..1fcd9df61e 100644 --- a/tests/qemuxml2argvdata/boot-complex.args +++ b/tests/qemuxml2argvdata/boot-complex.args @@ -42,7 +42,7 @@ QEMU_AUDIO_DRV=3Dnone \ -global isa-fdc.bootindexA=3D4 \ -global isa-fdc.driveB=3Ddrive-fdc0-0-1 \ -netdev user,id=3Dhostnet0 \ --device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D00:11:22:33:44:11= ,bus=3Dpci.0,addr=3D0x2,bootindex=3D2 \ +-device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D00:11:22:33:44:11= ,bootindex=3D2,bus=3Dpci.0,addr=3D0x2 \ -netdev user,id=3Dhostnet1 \ -device virtio-net-pci,netdev=3Dhostnet1,id=3Dnet1,mac=3D00:11:22:33:44:22= ,bus=3Dpci.0,addr=3D0x3 \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/boot-order.args b/tests/qemuxml2argvdat= a/boot-order.args index 0969ea9bd5..e2b9e8bbe8 100644 --- a/tests/qemuxml2argvdata/boot-order.args +++ b/tests/qemuxml2argvdata/boot-order.args @@ -36,6 +36,6 @@ QEMU_AUDIO_DRV=3Dnone \ -global isa-fdc.driveB=3Ddrive-fdc0-0-1 \ -global isa-fdc.bootindexB=3D4 \ -netdev user,id=3Dhostnet0 \ --device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D00:11:22:33:44:55= ,bus=3Dpci.0,addr=3D0x2,bootindex=3D2 \ +-device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D00:11:22:33:44:55= ,bootindex=3D2,bus=3Dpci.0,addr=3D0x2 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x4 \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/controller-order.args b/tests/qemuxml2a= rgvdata/controller-order.args index a97fbc7d5d..e5524f3413 100644 --- a/tests/qemuxml2argvdata/controller-order.args +++ b/tests/qemuxml2argvdata/controller-order.args @@ -32,7 +32,7 @@ QEMU_AUDIO_DRV=3Dspice \ -drive file=3D/tmp/Fedora-17-x86_64-Live-Desktop.iso,format=3Draw,if=3Dnon= e,id=3Ddrive-ide0-1-0,readonly=3Don \ -device ide-cd,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 \ -netdev user,id=3Dhostnet0 \ --device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:4d:4b:19= ,bus=3Dpci.0,addr=3D0x3,bootindex=3D2 \ +-device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:4d:4b:19= ,bootindex=3D2,bus=3Dpci.0,addr=3D0x3 \ -chardev spicevmc,id=3Dcharsmartcard0,name=3Dsmartcard \ -device ccid-card-passthru,chardev=3Dcharsmartcard0,id=3Dsmartcard0,bus=3D= ccid0.0 \ -chardev pty,id=3Dcharserial0 \ diff --git a/tests/qemuxml2argvdata/machine-loadparm-multiple-disks-nets-s3= 90.args b/tests/qemuxml2argvdata/machine-loadparm-multiple-disks-nets-s390.= args index 68470173fb..6cba98b36f 100644 --- a/tests/qemuxml2argvdata/machine-loadparm-multiple-disks-nets-s390.args +++ b/tests/qemuxml2argvdata/machine-loadparm-multiple-disks-nets-s390.args @@ -29,7 +29,7 @@ QEMU_AUDIO_DRV=3Dnone \ -drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-vir= tio-disk1 \ -device virtio-blk-ccw,devno=3Dfe.0.0003,drive=3Ddrive-virtio-disk1,id=3Dv= irtio-disk1,bootindex=3D3 \ -netdev user,id=3Dhostnet0 \ --device virtio-net-ccw,netdev=3Dhostnet0,id=3Dnet0,mac=3D00:11:22:33:44:54= ,devno=3Dfe.0.0000,bootindex=3D2 \ +-device virtio-net-ccw,netdev=3Dhostnet0,id=3Dnet0,mac=3D00:11:22:33:44:54= ,bootindex=3D2,devno=3Dfe.0.0000 \ -netdev user,id=3Dhostnet1 \ -device virtio-net-ccw,netdev=3Dhostnet1,id=3Dnet1,mac=3D00:11:22:33:42:36= ,devno=3Dfe.0.0004 \ -device virtio-balloon-ccw,id=3Dballoon0,devno=3Dfe.0.0001 \ diff --git a/tests/qemuxml2argvdata/machine-loadparm-net-s390.args b/tests/= qemuxml2argvdata/machine-loadparm-net-s390.args index 13e099bb80..44af82b787 100644 --- a/tests/qemuxml2argvdata/machine-loadparm-net-s390.args +++ b/tests/qemuxml2argvdata/machine-loadparm-net-s390.args @@ -25,6 +25,6 @@ QEMU_AUDIO_DRV=3Dnone \ -no-shutdown \ -boot strict=3Don \ -netdev user,id=3Dhostnet0 \ --device virtio-net-ccw,netdev=3Dhostnet0,id=3Dnet0,mac=3D00:11:22:33:44:54= ,devno=3Dfe.0.0000,bootindex=3D1 \ +-device virtio-net-ccw,netdev=3Dhostnet0,id=3Dnet0,mac=3D00:11:22:33:44:54= ,bootindex=3D1,devno=3Dfe.0.0000 \ -device virtio-balloon-ccw,id=3Dballoon0,devno=3Dfe.0.0001 \ -msg timestamp=3Don --=20 2.31.1