[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 45/46] net: Complete qapi-fication of netdev_
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v5 45/46] net: Complete qapi-fication of netdev_add |
Date: |
Fri, 25 Sep 2015 18:48:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
-----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-----
- [Qemu-devel] [PATCH v5 40/46] qapi: Implement boxed structs for commands/events, (continued)
- [Qemu-devel] [PATCH v5 40/46] qapi: Implement boxed structs for commands/events, Eric Blake, 2015/09/21
- [Qemu-devel] [PATCH v5 42/46] qapi: support implicit structs in OptsVisitor, Eric Blake, 2015/09/21
- [Qemu-devel] [PATCH v5 31/46] qapi: use 'type' in generated C code to match QMP union wire form, Eric Blake, 2015/09/21
- [Qemu-devel] [PATCH v5 44/46] net: Use correct type for bool flag, Eric Blake, 2015/09/21
- [Qemu-devel] [PATCH v5 46/46] qapi: Allow anonymous base for flat union, Eric Blake, 2015/09/21
- [Qemu-devel] [PATCH v5 43/46] qapi: Change Netdev into a flat union, Eric Blake, 2015/09/21
- [Qemu-devel] [PATCH v5 45/46] net: Complete qapi-fication of netdev_add, Eric Blake, 2015/09/21
Re: [Qemu-devel] [PATCH v5 00/46] post-introspection cleanups, and qapi-ify netdev_add, Markus Armbruster, 2015/09/29