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: Wed, 4 Apr 2018 11:37:52 -0600 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=utf-8 Content-Transfer-Encoding: 7bit Cc: Jiri Pirko , Si-Wei Liu , "Michael S. Tsirkin" , Stephen Hemminger , Alexander Duyck , David Miller , "Brandeburg, Jesse" , Jakub Kicinski , Jason Wang , "Samudrala, Sridhar" , Netdev , virtualization@lists.linux-foundation.org To: Siwei Liu Return-path: Received: from mail-pl0-f65.google.com ([209.85.160.65]:40748 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbeDDRhz (ORCPT ); Wed, 4 Apr 2018 13:37:55 -0400 Received: by mail-pl0-f65.google.com with SMTP id x4-v6so15031297pln.7 for ; Wed, 04 Apr 2018 10:37:55 -0700 (PDT) In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: [ dropping virtio-dev@lists.oasis-open.org since it is a closed list and I am tired of deleting bounces ] On 4/4/18 2:28 AM, Siwei Liu wrote: > 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. > > I'm still not sure I understand your case: why you want to hide the > control netdev, as I assume those devices could choose either to > silently ignore the request, or fail loudly against user operations? > Is it creating issues already, or what problem you want to solve if > not making the netdev invisible. Why couldn't lldpd check some > specific flag and ignore the control netdevice (can you please give an > example of a concrete driver for control netdevice *in tree*). > > And I'm completely lost why you want an API to make a hidden netdev > visible again for these control devices. Networking vendors have out of tree kernel modules. Those modules use a netdev (call it a master netdev, a control netdev, cpu port, whatever) to pull packets from the ASIC and deliver to virtual netdevices representing physical ports. The master netdev should not be mucked with by a user. It should be ignored by certain s/w with lldpd as just an *example*. The short of it is that you have your reasons for wanting to hide the virtio bypass device; other users have other arguments for wanting a similar capability.