From: Markus Armbruster <armbru@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: lekiravi@yandex-team.ru, jasowang@redhat.com,
qemu-devel@nongnu.org, dgilbert@redhat.com
Subject: Re: [PATCH v2 1/2] net: Complete qapi-fication of netdev_add
Date: Tue, 17 Mar 2020 21:50:02 +0100 [thread overview]
Message-ID: <87pndaiu4l.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20200317201711.322764-2-eblake@redhat.com> (Eric Blake's message of "Tue, 17 Mar 2020 15:17:10 -0500")
Eric Blake <eblake@redhat.com> writes:
> We've had all the required pieces for doing a type-safe representation
> of netdev_add as a flat union for quite some time now (since
> 0e55c381f6 in v2.7.0, released in 2016), but did not make the final
> switch to using it because of concern about whether a command-line
> regression in accepting "1" in place of 1 for integer arguments would
> be problematic. Back then, we did not have the deprecation cycle to
> allow us to make progress. But now that we have waited so long, other
> problems have crept in: for example, our desire to add
> qemu-storage-daemon is hampered by the inability to express net
> objects, and we are unable to introspect what we actually accept.
> Additionally, our round-trip through QemuOpts silently eats any
> argument that expands to an array, rendering dnssearch, hostfwd, and
> guestfwd useless through QMP:
>
> {"execute": "netdev_add", "arguments": { "id": "netdev0",
> "type": "user", "dnssearch": [
> { "str": "8.8.8.8" }, { "str": "8.8.4.4" }
> ]}}
>
> So without further ado, let's turn on proper QAPI. netdev_add() was a
> trivial wrapper around net_client_init(), which did a few steps prior
> to calling net_client_init1(); with this patch, we now skip directly
> to net_client_init1(). In addition to fixing array parameters, the
> following additional differences occur:
>
> - {"execute": "netdev_add", "arguments": {"type": "help"}}
> no longer attempts to print help to stdout and exit. Bug fix, broken
> in 547203ead4 'net: List available netdevs with "-netdev help"',
> v2.12.0.
>
> - {"execute": "netdev_add", "arguments': {... "ip6-net": "..." }}
> no longer attempts to desugar the undocumented ip6-net magic string
s/ip6-net/ipv6-net/ two times. Will fix in my tree.
> into the proper "ipv6-prefix" and "ipv6-prefixlen". Undocumented
> misfeature, introduced in commit 7aac531ef2 "qapi-schema, qemu-options
> & slirp: Adding Qemu options for IPv6 addresses", v2.6.0.
[...]
next prev parent reply other threads:[~2020-03-17 20:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-17 20:17 [PATCH v2 0/2] netdev qapification Eric Blake
2020-03-17 20:17 ` [PATCH v2 1/2] net: Complete qapi-fication of netdev_add Eric Blake
2020-03-17 20:36 ` Markus Armbruster
2020-03-17 20:50 ` Markus Armbruster [this message]
2020-03-17 20:17 ` [PATCH v2 2/2] net: Track netdevs in NetClientState rather than QemuOpt Eric Blake
2020-03-17 20:35 ` Markus Armbruster
2020-03-17 20:53 ` [PATCH v2 0/2] netdev qapification Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pndaiu4l.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=jasowang@redhat.com \
--cc=lekiravi@yandex-team.ru \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.