From: Eric Blake <eblake@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
qemu-devel@nongnu.org, Jason Wang <jasowang@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Cc: libvir-list@redhat.com
Subject: Re: [PATCH 2/2] net: Drop the NetLegacy structure, always use Netdev instead
Date: Fri, 6 Dec 2019 09:14:34 -0600 [thread overview]
Message-ID: <bac8635c-b38c-51e0-2478-ec14d96aedbb@redhat.com> (raw)
In-Reply-To: <20191206053640.29368-3-thuth@redhat.com>
On 12/5/19 11:36 PM, Thomas Huth wrote:
> Now that the "name" parameter is gone, there is hardly any difference
> between NetLegacy and Netdev anymore. Drop NetLegacy and always use
> Netdev to simplify the code quite a bit.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
Initial focus on the QAPI change:
> +++ b/qapi/net.json
> @@ -467,7 +467,7 @@
> # 'l2tpv3' - since 2.1
> ##
> { 'union': 'Netdev',
> - 'base': { 'id': 'str', 'type': 'NetClientDriver' },
> + 'base': { '*id': 'str', 'type': 'NetClientDriver' },
Making id optional here...
> 'discriminator': 'type',
> 'data': {
> 'nic': 'NetLegacyNicOptions',
> @@ -481,55 +481,6 @@
> 'netmap': 'NetdevNetmapOptions',
> 'vhost-user': 'NetdevVhostUserOptions' } }
>
> -##
> -# @NetLegacy:
> -#
> -# Captures the configuration of a network device; legacy.
> -#
> -# @id: identifier for monitor commands
> -#
> -# @opts: device type specific properties (legacy)
> -#
> -# Since: 1.2
> -#
> -# 'vlan': dropped in 3.0
> -# 'name': dropped in 5.0
> -##
> -{ 'struct': 'NetLegacy',
> - 'data': {
> - '*id': 'str',
> - 'opts': 'NetLegacyOptions' } }
to match how it was here. Should 'id' have been made mandatory in 1/2,
when deleting 'name' (after all, id was optional only when name was in use)?
> -
> -##
> -# @NetLegacyOptionsType:
> -#
> -# Since: 1.2
> -##
> -{ 'enum': 'NetLegacyOptionsType',
> - 'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
> - 'bridge', 'netmap', 'vhost-user'] }
Comparing this to the branches of Netdev:
We are losing 'none', while gaining 'hubport'. The gain is not
problematic, and I guess you are declaring that the use of 'none' has
been deprecated long enough to not be a problem.
> -
> -##
> -# @NetLegacyOptions:
> -#
> -# Like Netdev, but for use only by the legacy command line options
> -#
> -# Since: 1.2
> -##
> -{ 'union': 'NetLegacyOptions',
> - 'base': { 'type': 'NetLegacyOptionsType' },
> - 'discriminator': 'type',
> - 'data': {
> - 'nic': 'NetLegacyNicOptions',
Should we rename this to NetdevNicOptions, now that we are getting rid
of other NetLegacy names?
> - 'user': 'NetdevUserOptions',
> - 'tap': 'NetdevTapOptions',
> - 'l2tpv3': 'NetdevL2TPv3Options',
> - 'socket': 'NetdevSocketOptions',
> - 'vde': 'NetdevVdeOptions',
> - 'bridge': 'NetdevBridgeOptions',
> - 'netmap': 'NetdevNetmapOptions',
> - 'vhost-user': 'NetdevVhostUserOptions' } }
But I concur that all branches of the Netdev union have the same types
as what you are removing here from NetLegacyOptions, so the
consolidation looks sane.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2019-12-06 16:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-06 5:36 [PATCH 0/2] net: Drop legacy "name" from -net and remove NetLegacy Thomas Huth
2019-12-06 5:36 ` [PATCH 1/2] net: Drop the legacy "name" parameter from the -net option Thomas Huth
2019-12-06 15:07 ` Eric Blake
2019-12-10 11:06 ` Markus Armbruster
2019-12-10 11:28 ` Thomas Huth
2019-12-06 5:36 ` [PATCH 2/2] net: Drop the NetLegacy structure, always use Netdev instead Thomas Huth
2019-12-06 15:14 ` Eric Blake [this message]
2019-12-09 11:33 ` Thomas Huth
2019-12-10 11:09 ` Markus Armbruster
2020-01-29 12:42 ` [PATCH 0/2] net: Drop legacy "name" from -net and remove NetLegacy Thomas Huth
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=bac8635c-b38c-51e0-2478-ec14d96aedbb@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=jasowang@redhat.com \
--cc=libvir-list@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).