qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QMP netdev_add multiple dnssearch values


From: Eric Blake
Subject: Re: QMP netdev_add multiple dnssearch values
Date: Wed, 27 Nov 2019 09:49:41 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 11/27/19 7:30 AM, Markus Armbruster wrote:

"Good enough" was true back then.  It wasn't true when we reused it for
netdev_add: hostfwd and guestfwd are list-valued.

We did define a QAPI schema a few months later (14aa0c2de0 "qapi schema:
add Netdev types").  net_client_init() uses it to convert from QemuOpts
to QAPI type Netdev.  This took us to the crazy pipeline we still use
today:

                             CLI, HMP
                         (key=value,...)
                                |
                                v
     QMP (JSON) -> QDict -> QemuOpts -> Netdev

We should instead use:

                           CLI, HMP
                       (key=value,...)
                              |
                              v
                           QemuOpts
                              |
                              v
     QMP (JSON) -> QDict -> Netdev

Back in 2016, Eric (cc'ed) posted patches to get us to this pipeline.
They got stuck on backward compatibility worries: the old code accepts
all parameters as JSON strings in addition to their proper type, the new
code doesn't.  Undocumented misfeature, but we chickened out anyway.

That was before we had a deprecation process. Now we do. If we are still worried about it, then we should start the deprecation clock (squeezing it into 4.2-rc3 is risky, more likely is starting it in 5.0, so that we get rid of string support in 5.2). If we are not worried about it, then we can just kill the misfeature in 5.0.


Let's reconsider.  Eric's patches break interface misuse that may or may
not exist in the field.  They fix a correct use of interface people want
to use (or Alex wouldn't have reported this bug), and they make QMP
introspection work for netdev_add.

Eric, what do you think?

Yes, it's time to revive that work (I have no idea if my patches from back then will still rebase nicely, though).

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

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