From: Eric Blake <eblake@redhat.com>
To: Thomas Huth <thuth@redhat.com>, Jason Wang <jasowang@redhat.com>,
qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH v3 2/2] net: Drop the NetLegacy structure, always use Netdev instead
Date: Thu, 21 May 2020 16:51:04 -0500 [thread overview]
Message-ID: <9a059691-b6b2-4315-8156-259baefaffa9@redhat.com> (raw)
In-Reply-To: <20200518180103.32484-3-thuth@redhat.com>
On 5/18/20 1:01 PM, Thomas Huth wrote:
> Now that the "name" parameter is gone, there is hardly any difference
> between NetLegacy and Netdev anymore, so we can drop NetLegacy and always
> use Netdev to simplify the code quite a bit.
>
> The only two differences that were really left between Netdev and NetLegacy:
>
> 1) NetLegacy does not allow a "hubport" type. We can continue to block
> this with a simple check in net_client_init1() for this type.
>
> 2) The "id" parameter was optional in NetLegacy (and an internal id
> was chosen via assign_name() during initialization), but it is mandatory
> for Netdev. To avoid that the visitor code bails out here, we have to
> add an internal id to the QemuOpts already earlier now.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> Note: I did not rename the "is_netdev" parameter of the function (as
> Eric suggested) - you really have to think of "-netdev" vs. "-net"
> here and not about "Netdev" vs. "NetLegacy". But if this "is_netdev"
> thing still confuses us in the future, we can still rename it with an
> additional follow-up patch later instead.
Works for me. It still might be nice mentioning "-netdev" vs. "-net" in
the commit message (and the fact that "-net" was what was previously
using the legacy type). But with the explanations you've given, the
code looks correct, and a commit message tweak does not change:
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2020-05-21 21:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-18 18:01 [PATCH v3 0/2] net: Drop legacy "name" from -net and remove NetLegacy Thomas Huth
2020-05-18 18:01 ` [PATCH v3 1/2] net: Drop the legacy "name" parameter from the -net option Thomas Huth
2020-05-18 18:01 ` [PATCH v3 2/2] net: Drop the NetLegacy structure, always use Netdev instead Thomas Huth
2020-05-21 21:51 ` Eric Blake [this message]
2020-06-15 12:06 ` [PATCH v3 0/2] net: Drop legacy "name" from -net and remove NetLegacy Thomas Huth
2020-06-16 6:26 ` Jason Wang
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=9a059691-b6b2-4315-8156-259baefaffa9@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=jasowang@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).