From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 8956E5A0265 for ; Sat, 22 Oct 2022 10:19:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666426788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YvXut77KnhY14WlCmNqwPxYjDFWKl4FyJBfMhWf5wr4=; b=d4csndhKJs19oxRBijwzGFRQltyI9z3K3pu9k4kmky0eKeD3uWrTFqO6VVFv9+myZGwpTW GFymnNl2MaYAcIBLJmkOgUw/wUgmXXvrSAMccnXD3Po9HBPkRcb3JRQoKsIOSWE6zG03ye 8PzG8Sfccy9RHKFVdgDwLKk/qwviQ2M= 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-600--1L8Cr4PNHiJnNNdZsuxMw-1; Sat, 22 Oct 2022 04:19:47 -0400 X-MC-Unique: -1L8Cr4PNHiJnNNdZsuxMw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 15B193C0F663 for ; Sat, 22 Oct 2022 08:19:47 +0000 (UTC) Received: from maya.cloud.tilaa.com (ovpn-208-31.brq.redhat.com [10.40.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D0DF3477F55; Sat, 22 Oct 2022 08:19:46 +0000 (UTC) Date: Sat, 22 Oct 2022 10:19:43 +0200 From: Stefano Brivio To: Andrea Bolognani Subject: Re: [PATCH] qrap: Support JSON syntax for -device Message-ID: <20221022101943.6ece3c3c@elisabeth> In-Reply-To: <20221020090419.820559-1-abologna@redhat.com> References: <20221020090419.820559-1-abologna@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: TI6UE4FTUZWIP3H5W5C67ZYYA6S3TV6E X-Message-ID-Hash: TI6UE4FTUZWIP3H5W5C67ZYYA6S3TV6E X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: <> Archived-At: List-Archive: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi Andrea, On Thu, 20 Oct 2022 11:04:19 +0200 Andrea Bolognani wrote: > Starting with version 8.1.0, libvirt uses JSON syntax when > generating the arguments to -device, so they will now look like > > {"driver":"virtio-scsi-pci","bus":"pci.3","addr":"0x0"} > > instead of > > virtio-scsi-pci,bus=pci.3,addr=0x0 > > qrap needs to parse these arguments and extract the bus number > in order to figure out what address to use for the virtio-net > device it adds, and the libvirt change described above has > broken this parsing logic. > > Tweak the code so that both styles are accepted and handled > correctly. > > Note that, when JSON is in use, qrap needs to generate its own > command line options in that format as well or things will not > work as expected. > > Signed-off-by: Andrea Bolognani Thanks for the patch, and welcome to the git log! For context, qrap will finally become useless once this patchset by Laurent: https://patchew.org/QEMU/20221021090922.170074-1-lvivier@redhat.com/ lands in qemu -- that should happen soon. However, we'll need to keep it around for a little longer, until an updated version of qemu reaches distributions, and, after that, still give a bit of time to users, so this is absolutely useful and appreciated. I just applied it. -- Stefano