From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamal Hadi Salim Subject: Re: [patch net-next RFC 0/4] introduce infrastructure for support of switch chip datapath Date: Thu, 27 Mar 2014 17:55:19 -0400 Message-ID: <53349E47.9040407@mojatatu.com> References: <5332677F.2090404@cumulusnetworks.com> <5332B1FE.7080102@mojatatu.com> <53330639.8050403@cumulusnetworks.com> <20140326165934.GH2869@minipsycho.orion> <20140326173536.GJ2869@minipsycho.orion> <20140326181436.GL2869@minipsycho.orion> <53334BDA.1060608@mojatatu.com> <20140327065616.GA2845@minipsycho.orion> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Jiri Pirko , Roopa Prabhu , Neil Horman , Thomas Graf , netdev , David Miller , Andy Gospodarek , dborkman , ogerlitz , jesse , pshelar , azhou , Ben Hutchings , Stephen Hemminger , jeffrey.t.kirsher@intel.com, vyasevic , Cong Wang , John Fastabend , Eric Dumazet , Scott Feldman , Lennert Buytenhek , Shrijeet Mukherjee , Felix Fietkau To: Florian Fainelli , Sergey Ryazanov Return-path: Received: from mail-ob0-f169.google.com ([209.85.214.169]:43113 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756166AbaC0VzW (ORCPT ); Thu, 27 Mar 2014 17:55:22 -0400 Received: by mail-ob0-f169.google.com with SMTP id va2so4975240obc.14 for ; Thu, 27 Mar 2014 14:55:22 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On 03/27/14 17:20, Florian Fainelli wrote: > 2014-03-27 13:32 GMT-07:00 Sergey Ryazanov : >> I would like go further and suggest to consider a netdev that is >> connected to the CPU switch port, as master. In case when we need to >> perform some action on whole switch (e.g. dump FIB). > > This is what the 'sw1' net_device in Jiri's proposal would do. > >> And even name >> switch ports, using master netdev name as prefix (e.g. eth1p0, eth1p1, >> ..., eth1pN for ports of switch that is connected via eth1). > > I think the port naming using the switch abstract interface (sw1 here) > is better because ports do belong to the switch. > Can we start calling whatever this netdev is something like "control"? Or maybe it is "cpu" netdev? Since i am comprehending better the need for such a special netdev, i would say: if i do a "route add" and it needs to go to the specific switch, the FIB entry will find its way to the "control" netdev which will invoke device specific interfaces for the ASIC. I would go as far as almost claiming - let this interface use netlink definitions (we know how fib netlink interfaces look like already); caveat is: there may room to tone it down. Repeat and rinse for everything else we know how to do already Of course there's a lot of evolution on the core code but thats a different discussion. cheers, jamal