From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice Date: Tue, 3 Apr 2018 19:04:26 -0600 Message-ID: <3bdfc39f-4935-2433-7982-9ce28c3aa166@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Si-Wei Liu , mst@redhat.com, stephen@networkplumber.org, alexander.h.duyck@intel.com, davem@davemloft.net, jesse.brandeburg@intel.com, kubakici@wp.pl, jasowang@redhat.com, sridhar.samudrala@intel.com, netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, virtio-dev@lists.oasis-open.org To: Jiri Pirko Return-path: Received: from mail-pl0-f67.google.com ([209.85.160.67]:46952 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754792AbeDDBE3 (ORCPT ); Tue, 3 Apr 2018 21:04:29 -0400 Received: by mail-pl0-f67.google.com with SMTP id 59-v6so8915682plc.13 for ; Tue, 03 Apr 2018 18:04:29 -0700 (PDT) In-Reply-To: <20180403154210.GK3313@nanopsycho> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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.