qemu-devel
[Top][All Lists]
Advanced

[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: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v5 45/46] net: Complete qapi-fication of netdev_add
Date: Mon, 28 Sep 2015 11:31:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

> 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.

Non sequitur :)

We need to stay sufficiently backwards compatible somehow.  'gen' false
is one possible solution.  Liberal use of alternate types could be
another.  A special input visitor mode could be a third.

Since my review cursor is >30 patches behind this one, I don't have an
opinion, yet.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]