From mboxrd@z Thu Jan 1 00:00:00 1970 From: Siwei Liu Subject: Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice Date: Wed, 4 Apr 2018 00:36:34 -0700 Message-ID: References: <1522573990-5242-1-git-send-email-si-wei.liu@oracle.com> <1522573990-5242-3-git-send-email-si-wei.liu@oracle.com> <8b589cd2-1abc-59c2-99f1-96df8174bb6b@gmail.com> <20180403154210.GK3313@nanopsycho> <3bdfc39f-4935-2433-7982-9ce28c3aa166@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <3bdfc39f-4935-2433-7982-9ce28c3aa166@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: David Ahern Cc: Alexander Duyck , virtio-dev@lists.oasis-open.org, Jiri Pirko , "Michael S. Tsirkin" , Jakub Kicinski , "Samudrala, Sridhar" , virtualization@lists.linux-foundation.org, Netdev , Si-Wei Liu , David Miller List-Id: virtualization@lists.linuxfoundation.org On Tue, Apr 3, 2018 at 6:04 PM, David Ahern wrote: > On 4/3/18 9:42 AM, Jiri Pirko wrote: >>> >>> There are other use cases that want to hide a device from userspace. I >> >> What usecases do you have in mind? > > As mentioned in a previous response some kernel drivers create control > netdevs. Just as in this case users should not be mucking with it, and > S/W like lldpd should ignore it. > >> >>> would prefer a better solution than playing games with name prefixes and >>> one that includes an API for users to list all devices -- even ones >>> hidden by default. >> >> Netdevice hiding feels a bit scarry for me. This smells like a workaround >> for userspace issues. Why can't the netdevice be visible always and >> userspace would know what is it and what should it do with it? >> >> Once we start with hiding, there are other things related to that which >> appear. Like who can see what, levels of visibility etc... >> > > I would not advocate for any API that does not allow users to have full > introspection. The intent is to hide the netdev by default but have an > option to see it. I'm fine with having a link dump API to inspect the hidden netdev. As said, the name for hidden netdevs should be in a separate device namespace, and we did not even get closer to what it should look like as I don't want to make it just an option for ip link. Perhaps a new set of sub-commands of, say, 'ip device'. -Siwei