From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 2FC355A026B for ; Mon, 27 Feb 2023 01:00:44 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4PQ0xx3f1Zz4x92; Mon, 27 Feb 2023 11:00:37 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1677456037; bh=w5w/jzHzlCjL/YNpHl2X8/b9qbGgfgGNeuZDhNV4Yo0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Kz/79Bq1KKi3pN6T6IwHqF/F4JB4/ZV+PNw4oLrm7rUTvISp4GyiI7whsAMjnfGsb 3bmlEtw4wx0PYazm5QmMnl0PQ1pm0vgBDXrdBRcS1CYiREz0CkxxkH/9o54w3SyTiy Y0x5wlbHVhX6A7Jycstcg9T78/DrrhHWOPWGxo8w= Date: Mon, 27 Feb 2023 11:00:08 +1100 From: David Gibson To: Andrea Bolognani Subject: Re: [PATCH 5/5] qrap: Generate -netdev as JSON Message-ID: References: <20230224184949.518615-1-abologna@redhat.com> <20230224184949.518615-6-abologna@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aS5qf/IeBBtpsYLP" Content-Disposition: inline In-Reply-To: <20230224184949.518615-6-abologna@redhat.com> Message-ID-Hash: FWBBGMJWJJDZW764KCWEVHSBVMRHL2VA X-Message-ID-Hash: FWBBGMJWJJDZW764KCWEVHSBVMRHL2VA X-MailFrom: dgibson@gandalf.ozlabs.org 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.8 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: --aS5qf/IeBBtpsYLP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 24, 2023 at 07:49:49PM +0100, Andrea Bolognani wrote: > While generating -device as JSON when JSON is in use is > mandatory, because not doing so can often prevent the VM from > starting up, using JSON for -netdev simply makes things a bit > nicer. No reason not to do it, though. Well, except that it means we now have two cases when before there was one. Reviewed-by: David Gibson in the sense that I think the patch is correct. I don't think there's much point to this change though. >=20 > Signed-off-by: Andrea Bolognani > --- > qrap.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/qrap.c b/qrap.c > index 27c12ed..d0e2fb2 100644 > --- a/qrap.c > +++ b/qrap.c > @@ -311,7 +311,11 @@ int main(int argc, char **argv) > } > =20 > qemu_argv[qemu_argc++] =3D "-netdev"; > - qemu_argv[qemu_argc++] =3D "socket,fd=3D" STR(DEFAULT_FD) ",id=3Dhostne= t0"; > + if (!has_json) { > + qemu_argv[qemu_argc++] =3D "socket,fd=3D" STR(DEFAULT_FD) ",id=3Dhostn= et0"; > + } else { > + qemu_argv[qemu_argc++] =3D "{\"type\":\"socket\",\"fd\":\"" STR(DEFAUL= T_FD) "\",\"id\":\"hostnet0\"}"; > + } > qemu_argv[qemu_argc] =3D NULL; > =20 > valid_args: --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --aS5qf/IeBBtpsYLP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmP78oIACgkQzQJF27ox 2GeRXg/9GNui53Rg0xKy+iGsMhFJ/lbHK9zOwtqUDBL0V/ZCslnqd+CIPingfd3k ZBv07+W2WA6BgD1qhKll13hdbLpUdLJQBucrlDbZlGWyLmUZUO6aw7UvWU0sL9d3 /EnMe7UXg2wahmI/SOXwgcWiRJC9i0RJX4RqOk1aX2+BwjM4HxuQ3LxXJYNlAu5k POBGkWrqRvvwZ+AMANlSiiW7Us1ywTbeQ3eSv9iJjxBdL0ZTFz7CDu/5up51vPCq JnL9FwfkeV62IR/Ew1Z3LkZoPrV3W4uYVK7d8pV3CNUlBI1Oo4V5+/tlIz/QTPBg Reu5A2AxkVj2jmWnSvNkn1e8FVV46793oSx0hp3ZldbgU0VKm39EWkrl7UPI+0qr TCS508KDxN77EcWIs2gnJ+HPeRWXQNljhhdstJVLao6TqSABr4UpqshIOxTSvwlo VShKvmFnAJEiCkX+I3z15zco14J2LwohnXMDr1RLxLoXHBdFGfmj9How/OnYJ9Zs xi/7vNZ2L4At6oQvNO/J8NYUmXr65kpgaKJBNkQyS+MPt+N4N9GW/MWHA9yDLrOu ktW9NAL9VFTrdNVKfZq8IkMzZ3rQlD+jzyJAKX7H/2aAjjufgS/xc+rZCYGiS6gu KXE5Aa3lfxsL4DDy57hWc2FWbYbbS4r3u/pcQ/C7k6PTaJ0vsbk= =f8E5 -----END PGP SIGNATURE----- --aS5qf/IeBBtpsYLP--