From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxDcn-0004rn-BQ for qemu-devel@nongnu.org; Thu, 20 Oct 2016 09:43:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxDcm-0003EB-AP for qemu-devel@nongnu.org; Thu, 20 Oct 2016 09:43:13 -0400 References: <1475246744-29302-1-git-send-email-berrange@redhat.com> <1475246744-29302-21-git-send-email-berrange@redhat.com> <87wph3xyfr.fsf@dusky.pond.sub.org> From: Eric Blake Message-ID: <7f716e47-bf61-9fe0-2434-def63a368069@redhat.com> Date: Thu, 20 Oct 2016 08:43:05 -0500 MIME-Version: 1.0 In-Reply-To: <87wph3xyfr.fsf@dusky.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="QqfGbl3KQBFg474na5mLRKGPJSWqcmM5j" Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v14 20/21] net: convert to QObjectInputVisitor for -net/-netdev parsing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , "Daniel P. Berrange" Cc: Paolo Bonzini , =?UTF-8?Q?Andreas_F=c3=a4rber?= , qemu-devel@nongnu.org, qemu-block@nongnu.org, Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --QqfGbl3KQBFg474na5mLRKGPJSWqcmM5j From: Eric Blake To: Markus Armbruster , "Daniel P. Berrange" Cc: Paolo Bonzini , =?UTF-8?Q?Andreas_F=c3=a4rber?= , qemu-devel@nongnu.org, qemu-block@nongnu.org, Max Reitz Message-ID: <7f716e47-bf61-9fe0-2434-def63a368069@redhat.com> Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v14 20/21] net: convert to QObjectInputVisitor for -net/-netdev parsing References: <1475246744-29302-1-git-send-email-berrange@redhat.com> <1475246744-29302-21-git-send-email-berrange@redhat.com> <87wph3xyfr.fsf@dusky.pond.sub.org> In-Reply-To: <87wph3xyfr.fsf@dusky.pond.sub.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/20/2016 02:38 AM, Markus Armbruster wrote: >> @@ -1069,7 +1069,21 @@ int net_client_init(QemuOpts *opts, bool is_net= dev, Error **errp) >> void *object =3D NULL; >> Error *err =3D NULL; >> int ret =3D -1; >> - Visitor *v =3D opts_visitor_new(opts); >> + /* >> + * Needs autocreate_lists=3Dtrue in order support existing >> + * syntax for list options where the bare key is repeated >> + * >> + * Needs autocreate_struct_levels=3D3 in order to deal with >> + * 3 level nesting in NetLegacy option args, which was >> + * exposed as a flat namespace with OptVisitor >> + */ >> + Visitor *v =3D qobject_input_visitor_new_opts(opts, true, 3, fals= e, true, >> + &err); >> + >> + if (err) { >> + error_propagate(errp, err); >> + return -1; >> + } >> =20 >> { >> /* Parse convenience option format ip6-net=3Dfec0::0[/64] */ >=20 > Neither NetLegacy nor Netdev are ABI, so if I understand the problem, > perhaps I can find a way around it. Let's figure out what exactly > requires levels=3D3. Netdev is not ABI only because we decided to NOT apply the last patch of QAPI-fying it in 2.7 while deciding to handle the back-compat (non-?)issues that existing netdev_add QMP command accepts both 1 and "1", but using the Netdev type would accept only 1. While working towards making netdev_add use QAPI, I intentionally left NetLegacy unchanged; but since NetLegacy is solely used by the command line, feel free to rearrange that type as long as CLI back-compat is kept= =2E --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --QqfGbl3KQBFg474na5mLRKGPJSWqcmM5j Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYCMnpAAoJEKeha0olJ0NqDYQH/34mCSgJir4DLe7s3Ck5okvJ VPUNwJT8fHwT9Vj2z+50T1vLYCXV7KB3yxHiJ7bpbOe5rdcmJzRo5dMC+yI2EMzH X4+GMzyYgSmN/ipBbDHa5tpjTb8gEq6AKTe3vs2XZt877DW88+rFOVvfmyymxPdK Lnkd+Lo1/AobwwiKlg+REHiNrH94RwLofeD6FsynMvc+v+Z5GLHQW2xfWCG8yTBd BqrwwZZq2CxXCGU9yn13XhcnSSmo9HsSHuG8YB7+/6doeMs1OoVd8RydQSAznHh3 0zPOp67kILOgXUQsNwPwMbAsIS1kzIU0AxJZJlODMJOaCM2ZbD74GWPLoYC6amA= =6A3z -----END PGP SIGNATURE----- --QqfGbl3KQBFg474na5mLRKGPJSWqcmM5j--