From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilias Apalodimas Subject: Re: [PATCH 0/4] RFC CPSW switchdev mode Date: Fri, 25 May 2018 13:28:04 +0300 Message-ID: <20180525102803.GA30627@apalos> References: <20180524084831.GA2759@apalos> <20180524125431.GB24557@lunn.ch> <7437d485-1eac-9619-3827-5af9b32b939e@redhat.com> <20180524140831.GA16793@apalos> <20180524145441.GE5128@lunn.ch> <20180524150704.GA20031@apalos> <20180524152559.GF5128@lunn.ch> <20180524160254.GA22461@apalos> <20180524163310.GG5128@lunn.ch> <20180525062902.GA11526@apalos> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Ivan Vecera , Jiri Pirko , netdev@vger.kernel.org, grygorii.strashko@ti.com, ivan.khoronzhuk@linaro.org, nsekhar@ti.com, francois.ozog@linaro.org, yogeshs@ti.com, spatton@ti.com To: Andrew Lunn Return-path: Received: from mail-wm0-f68.google.com ([74.125.82.68]:55698 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965102AbeEYK2J (ORCPT ); Fri, 25 May 2018 06:28:09 -0400 Received: by mail-wm0-f68.google.com with SMTP id a8-v6so12991867wmg.5 for ; Fri, 25 May 2018 03:28:08 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20180525062902.GA11526@apalos> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, May 25, 2018 at 09:29:02AM +0300, Ilias Apalodimas wrote: > On Thu, May 24, 2018 at 06:33:10PM +0200, Andrew Lunn wrote: > > On Thu, May 24, 2018 at 07:02:54PM +0300, Ilias Apalodimas wrote: > > > On Thu, May 24, 2018 at 05:25:59PM +0200, Andrew Lunn wrote: > > > > O.K, back to the basic idea. Switch ports are just normal Linux > > > > interfaces. > > > > > > > > How would you configure this with two e1000e put in a bridge? I want > > > > multicast to be bridged between the two e1000e, but the host stack > > > > should not see the packets. > > > I am not sure i am following. I might be missing something. In your case you > > > got two ethernet pci/pcie interfaces bridged through software. You can filter > > > those if needed. In the case we are trying to cover, you got a hardware that > > > offers that capability. Since not all switches are pcie based shouldn't we be > > > able to allow this ? > > > > switchdev is about offloading what Linux can do to hardware to > > accelerate it. The switch is a block of accelerator hardware, like a > > GPU is for accelerating graphics. Linux can render OpenGL, but it is > > better to hand it over to the GPU accelerator. > > > > Same applies here. The Linux bridge can bridge multicast. Using the > > switchdev API, you can push that down to the accelerator, and let it > > do it. > > > > So you need to think about, how do you make the Linux bridge not pass > > multicast traffic to the host stack. Then how do you extend the > > switchdev API so you can push this down to the accelerator. > > > > To really get switchdev, you often need to pivot your point of view a > > bit. People often think, switchdev is about writing drivers for > > switches. Its not, its about how you offload networking which Linux > > can do down to a switch. And if the switch cannot accelerate it, you > > leave Linux to do it. > > > > When you get in the details, i think you will find the switchdev API > > actually already has what you need for this use case. What you need to > > figure out is how you make the Linux bridge not pass multicast to the > > host. Well, actually, not pass multicast it has not asked for. Then > > accelerate it. > > > Understood, if we missed back anything on handling multicast for > the cpu port we'll go back and fix it (i am assuming snooping is the answer > here). Multicasting is only one part of the equation though. What about the > need for vlans/FDBs on that port though? > I just noticed this: https://www.spinics.net/lists/netdev/msg504760.html I tried doing the "bridge vlan add vid 2 dev br0 self" in my initial attempts but didn't get a notification to program the CPU port(with the sef argument). This obviously solves our vlan configuration issue. So it's only static FBDs left. Regards Ilias