From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice Date: Tue, 3 Apr 2018 10:35:36 -0700 Message-ID: <20180403103536.6ec1450c@xeon-e3> References: <1522573990-5242-1-git-send-email-si-wei.liu@oracle.com> <1522573990-5242-3-git-send-email-si-wei.liu@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: mst@redhat.com, jiri@resnulli.us, 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: Si-Wei Liu Return-path: Received: from mail-pl0-f67.google.com ([209.85.160.67]:32882 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974AbeDCRfp (ORCPT ); Tue, 3 Apr 2018 13:35:45 -0400 Received: by mail-pl0-f67.google.com with SMTP id s10-v6so7834799plp.0 for ; Tue, 03 Apr 2018 10:35:45 -0700 (PDT) In-Reply-To: <1522573990-5242-3-git-send-email-si-wei.liu@oracle.com> Sender: netdev-owner@vger.kernel.org List-ID: On Sun, 1 Apr 2018 05:13:09 -0400 Si-Wei Liu wrote: > Hidden netdevice is not visible to userspace such that > typical network utilites e.g. ip, ifconfig and et al, > cannot sense its existence or configure it. Internally > hidden netdev may associate with an upper level netdev > that userspace has access to. Although userspace cannot > manipulate the lower netdev directly, user may control > or configure the underlying hidden device through the > upper-level netdev. For identification purpose, the > kobject for hidden netdev still presents in the sysfs > hierarchy, however, no uevent message will be generated > when the sysfs entry is created, modified or destroyed. > > For that end, a separate namescope needs to be carved > out for IFF_HIDDEN netdevs. As of now netdev name that > starts with colon i.e. ':' is invalid in userspace, > since socket ioctls such as SIOCGIFCONF use ':' as the > separator for ifname. The absence of namescope started > with ':' can rightly be used as the namescope for > the kernel-only IFF_HIDDEN netdevs. > > Signed-off-by: Si-Wei Liu > --- I understand the use case. I proposed using . as a prefix before but that ran into resistance. Using colon seems worse. Rather than playing with names and all the issues that can cause, why not make it an attribute flag of the device in netlink.