From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice Date: Tue, 10 Apr 2018 00:15:23 +0200 Message-ID: <20180409221523.GH562@lunn.ch> References: <3bdfc39f-4935-2433-7982-9ce28c3aa166@gmail.com> <54accf73-e6cc-e03f-6a1c-34e1bbd78047@gmail.com> <20180404.133749.1802514210170809419.davem@davemloft.net> <20180407031919.GB11029@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Miller , David Ahern , Jiri Pirko , si-wei liu , "Michael S. Tsirkin" , Stephen Hemminger , Alexander Duyck , "Brandeburg, Jesse" , Jakub Kicinski , Jason Wang , "Samudrala, Sridhar" , Netdev , virtualization@lists.linux-foundation.org, virtio-dev@lists.oasis-open.org To: Siwei Liu Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:54414 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751291AbeDIWPq (ORCPT ); Mon, 9 Apr 2018 18:15:46 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: > No, implementation wise I'd avoid changing the class on the fly. What > I'm looking to is a means to add a secondary class or class aliasing > mechanism for netdevs that allows mapping for a kernel device > namespace (/class/net-kernel) to userspace (/class/net). Imagine > creating symlinks between these two namespaces as an analogy. All > userspace visible netdevs today will have both a kernel name and a > userspace visible name, having one (/class/net) referecing the other > (/class/net-kernel) in its own namespace. The newly introduced > IFF_AUTO_MANAGED device will have a kernel name only > (/class/net-kernel). As a result, the existing applications using > /class/net don't break, while we're adding the kernel namespace that > allows IFF_AUTO_MANAGED devices which will not be exposed to userspace > at all. My gut feeling is this whole scheme will not fly. You really should be talking to GregKH. Anyway, please remember that IFF_AUTO_MANAGED will need to be dynamic. A device can start out as a normal device, and will change to being automatic later, when the user on top of it probes. Andrew