From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfWBG-0000go-0K for qemu-devel@nongnu.org; Fri, 25 Sep 2015 12:49:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfWBA-0005uJ-Si for qemu-devel@nongnu.org; Fri, 25 Sep 2015 12:49:05 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:37603) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfWBA-0005uA-MK for qemu-devel@nongnu.org; Fri, 25 Sep 2015 12:49:00 -0400 Received: by wicfx3 with SMTP id fx3so27267151wic.0 for ; Fri, 25 Sep 2015 09:49:00 -0700 (PDT) Sender: Paolo Bonzini References: <1442872682-6523-1-git-send-email-eblake@redhat.com> <1442872682-6523-46-git-send-email-eblake@redhat.com> <5602C7DE.10701@redhat.com> <5602D545.3050405@redhat.com> From: Paolo Bonzini Message-ID: <56057AF8.2010008@redhat.com> Date: Fri, 25 Sep 2015 18:48:56 +0200 MIME-Version: 1.0 In-Reply-To: <5602D545.3050405@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 45/46] net: Complete qapi-fication of netdev_add List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, Jason Wang , DirtY.iCE.hu@gmail.com, armbru@redhat.com, ehabkost@redhat.com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 23/09/2015 18:37, Eric Blake wrote: >>> >>> Is this still type-unsafe like the old netdev_add (e.g. accepts >>> a string for an integer)? > I did not address that yet; it still needs further patches to > accept an integer as a port number. I can investigate what > additional patches are needed along those lines, while still > preserving back-compat to previously-accepted QMP command lines (it > may require the use of an 'alternate' type that accepts both int > and string). The main goal here was that the command line is > unchanged, and that now the QMP command is introspectable, even if > what introspection shows is ugly types. This in fact is a laudable goal. However, while changing the command to { 'command': 'netdev_add', 'data': 'Netdev', 'box': true, 'gen': false } for better introspection, you should keep 'gen':'false' and the manual implementation based on qemu_opts_from_qdict, otherwise you break backwards-compatibility. Paolo -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWBXr0AAoJEL/70l94x66DJNUH/24lvns9MJpLv0ycT0+jrwVd BhlCBatRwISITCX+gRSL5kmC0UNeGUWUB6AaYeCxZtY+Z40lCcOakMf2ZvDOf+Iq 0CvrtXSjEzwf3DxUawso4bcBdQKg1Za1sQsvExGd84VbnsRr+HFKNclYhJGxbiG4 UNPvIFzd+mwod+i2RHooRY/CiDqYDSinlLlp4N6DqjjMQeiTcetJqfdsm6Kke9fg ntu/YEwlqcgGFSSDOdGG1YmSmWApUOw0gAzHt+Ufyy+I/M6Mzvn9OH6E3lQtghOy ovK230/8YIoIPBkWsRxYDp1LrmxarszMTqAWMuc3ALRxJSQ6GMrtgDby1ghw1W8= =akeC -----END PGP SIGNATURE-----