netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Siwei Liu <loseweigh@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: Alexander Duyck <alexander.h.duyck@intel.com>,
	virtio-dev@lists.oasis-open.org, Jiri Pirko <jiri@resnulli.us>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jakub Kicinski <kubakici@wp.pl>,
	"Samudrala, Sridhar" <sridhar.samudrala@intel.com>,
	virtualization@lists.linux-foundation.org,
	Netdev <netdev@vger.kernel.org>, David Ahern <dsahern@gmail.com>,
	si-wei liu <si-wei.liu@oracle.com>
Subject: Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice
Date: Fri, 6 Apr 2018 19:32:05 -0700	[thread overview]
Message-ID: <CADGSJ206RKi704uoLe3xVs6PyWpURPLb75OPCM_YO9DfnnEzpw@mail.gmail.com> (raw)
In-Reply-To: <20180404.133749.1802514210170809419.davem@davemloft.net>

On Wed, Apr 4, 2018 at 10:37 AM, David Miller <davem@davemloft.net> wrote:
> From: David Ahern <dsahern@gmail.com>
> Date: Wed, 4 Apr 2018 11:21:54 -0600
>
>> It is a netdev so there is no reason to have a separate ip command to
>> inspect it. 'ip link' is the right place.
>
> I agree on this.

I'm completely fine of having an API for inspection purpose. The thing
is that we'd perhaps need to go for the namespace approach, for which
I think everyone seems to agree not to fiddle with the ":" prefix, but
rather have a new class of network subsystem under /sys/class thus a
separate device namespace e.g. /sys/class/net-kernel for those
auto-managed lower netdevs is needed.

And I assume everyone here understands the use case for live migration
(in the context of providing cloud service) is very different, and we
have to hide the netdevs. If not, I'm more than happy to clarify.

With that in mind, if having a new class of net-kernel namespace, we
can name the kernel device elaborately which is not neccessarily equal
to the device name exposed to userspace. For example, we can use
driver name as the prefix as opposed to "eth" or ":eth". And we don't
need to have auto-managed netdevs locked into the ":" prefix at all (I
intentionally left it out in the this RFC patch to ask for comments on
the namespace solution which is much cleaner). That said, an userpsace
named device through udev may call something like ens3 and
switch1-port2, but in the kernel-net namespace, it may look like
ixgbevf0 and mlxsw1p2.

So if we all agree introducing a new namespace is the rigth thing to
do, `ip link' will no longer serve the purpose of displaying the
information for kernel-net devnames for the sake of avoiding ambiguity
and namespace collision: it's entirely possible the ip link name could
collide with a kernel-net devname, it's become unclear which name of a
netdev object the command is expected to operate on. That's why I
thought showing the kernel-only netdevs using a separate subcommand
makes more sense.

Thoughts and comments? Please let me know.

Thanks,
-Siwei

>
> What I really don't understand still is the use case... really.
>
> So there are control netdevs, what exactly is the problem with that?
>
> Are we not exporting enough information for applications to handle
> these devices sanely?  If so, then's let add that information.
>
> We can set netdev->type to ETH_P_LINUXCONTROL or something like that.
>
> Another alternative is to add an interface flag like IFF_CONTROL or
> similar, and that probably is much nicer.
>
> Hiding the devices means that we acknowledge that applications are
> currently broken with control netdevs... and we want them to stay
> broken!
>
> That doesn't sound like a good plan to me.
>
> So let's fix handling of control netdevs instead of hiding them.
>
> Thanks.

  parent reply	other threads:[~2018-04-07  2:32 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-01  9:13 [RFC PATCH 0/3] Userspace compatible driver model for virtio_bypass Si-Wei Liu
2018-04-01  9:13 ` [RFC PATCH 1/3] qemu: virtio-bypass should explicitly bind to a passthrough device Si-Wei Liu
2018-04-03 12:25   ` Michael S. Tsirkin
2018-04-04  8:02     ` [virtio-dev] " Siwei Liu
2018-04-05 15:31       ` Paolo Bonzini
2018-04-07  2:54         ` Siwei Liu
2018-04-01  9:13 ` [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice Si-Wei Liu
2018-04-01 16:11   ` David Ahern
2018-04-03  7:40     ` Siwei Liu
2018-04-03 14:57       ` David Ahern
2018-04-03 15:42     ` Jiri Pirko
2018-04-03 19:23       ` Siwei Liu
2018-04-04  1:04       ` David Ahern
2018-04-04  6:19         ` Jiri Pirko
2018-04-04  8:01           ` Siwei Liu
2018-04-04  7:36         ` Siwei Liu
2018-04-04 17:21           ` David Ahern
2018-04-04 17:37             ` David Miller
2018-04-04 18:20               ` Jiri Pirko
2018-04-07  2:32               ` Siwei Liu [this message]
2018-04-07  3:19                 ` Andrew Lunn
2018-04-09 22:07                   ` Siwei Liu
2018-04-09 22:15                     ` Andrew Lunn
2018-04-09 22:30                       ` Siwei Liu
2018-04-09 23:03                         ` Stephen Hemminger
2018-04-09 23:31                           ` Siwei Liu
2018-04-08 16:32                 ` David Miller
2018-04-10  6:48                   ` Siwei Liu
2018-04-18  0:26                     ` Siwei Liu
2018-04-18 23:33                       ` Samudrala, Sridhar
2018-04-19  4:41                         ` Michael S. Tsirkin
2018-04-19  5:00                           ` [virtio-dev] " Samudrala, Sridhar
2018-04-19  5:07                             ` Michael S. Tsirkin
2018-04-19  6:10                               ` [virtio-dev] " Samudrala, Sridhar
2018-04-19  6:43                                 ` Siwei Liu
2018-04-19  6:31                             ` Siwei Liu
2018-04-04 18:02             ` Siwei Liu
2018-04-04  8:28         ` Siwei Liu
2018-04-04 17:37           ` David Ahern
2018-04-04 17:42             ` David Miller
2018-04-04 17:44             ` Stephen Hemminger
2018-04-04 20:08             ` Andrew Lunn
2018-04-03 17:35   ` Stephen Hemminger
     [not found]     ` <CADGSJ23vZdtQzWdc_6M_Hr4MUej--wgvJ785DwRF3VaPWS1rpA@mail.gmail.com>
     [not found]       ` <20180403160834.51594373@xeon-e3>
2018-04-06 21:29         ` Siwei Liu
2018-04-01  9:13 ` [RFC PATCH 3/3] virtio_net: make lower netdevs for virtio_bypass hidden Si-Wei Liu
2018-04-03 12:20   ` Michael S. Tsirkin
2018-04-04  8:03     ` [virtio-dev] " Siwei Liu

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=CADGSJ206RKi704uoLe3xVs6PyWpURPLb75OPCM_YO9DfnnEzpw@mail.gmail.com \
    --to=loseweigh@gmail.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=kubakici@wp.pl \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=si-wei.liu@oracle.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtualization@lists.linux-foundation.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 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).