From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilias Apalodimas Subject: Re: [PATCH 0/4] RFC CPSW switchdev mode Date: Thu, 31 May 2018 18:27:25 +0300 Message-ID: <20180531152725.GA27358@apalos> References: <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> <20180525120938.GB20060@lunn.ch> 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-f42.google.com ([74.125.82.42]:50461 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755421AbeEaP1a (ORCPT ); Thu, 31 May 2018 11:27:30 -0400 Received: by mail-wm0-f42.google.com with SMTP id t11-v6so54801697wmt.0 for ; Thu, 31 May 2018 08:27:30 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20180525120938.GB20060@lunn.ch> Sender: netdev-owner@vger.kernel.org List-ID: Sorry for the late response i had some time to take another look and do some extra testing > 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. The current driver is already working like that. The difference between the modes of operation is this: By registering the 'cpu port' we choose if the linux host is going to see the br_ip4_multicast_igmp3_report or br_multicast_ipv4_rcv (by configuring the vlan it participates) and trigger switchdev to add the MDBs If the cpu port is member of that VLAN then the dynamic entry shows on 'bridge mdb show' command i.e dev br0 port sw0p1 grp 239.1.1.1 temp offload vid 100 If not the user is able to add it manually. Anyway i got the main points of the RFC, if Petr's patch get accepted i might be able to respin this without registering a CPU port. Regards Ilias