From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Machata Subject: Re: [PATCH net-next 6/7] net: bridge: Notify about bridge VLANs Date: Mon, 28 May 2018 11:20:40 +0300 Message-ID: References: <877enrzp42.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> <87y3g6mpr2.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: devel@driverdev.osuosl.org, f.fainelli@gmail.com, andrew@lunn.ch, nikolay@cumulusnetworks.com, netdev@vger.kernel.org, bridge@lists.linux-foundation.org, idosch@mellanox.com, jiri@mellanox.com, razvan.stefanescu@nxp.com, gregkh@linuxfoundation.org, davem@davemloft.net To: Vivien Didelot Return-path: In-Reply-To: <87y3g6mpr2.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> (Vivien Didelot's message of "Sat, 26 May 2018 10:54:25 -0400") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: netdev.vger.kernel.org Vivien Didelot writes: > Hi Petr, > > Petr Machata writes: > >> Vivien Didelot writes: >> >>>> + } else { >>>> + err = br_switchdev_port_obj_add(dev, v->vid, flags); >>>> + if (err && err != -EOPNOTSUPP) >>>> + goto out; >>>> } >>> >>> Except that br_switchdev_port_obj_add taking vid and flags arguments >>> seems confusing to me, the change looks good: >> >> I'm not sure what you're aiming at. Both VID and flags are sent with the >> notification, so they need to be passed on to the function somehow. Do >> you have a counterproposal for the API? > > I'm only questioning the code organization here, not the functional > aspect which I do agree with. What I'm saying is that you name a new > switchdev helper br_switchdev_port_OBJ_add, which takes VLAN arguments > (vid and flags.) How would you call another eventual helper taking MDB > arguments, br_switchdev_port_OBJ_add again? So something like > br_switchdev_port_VLAN_add would be more intuitive. > > At the same time there's an effort to centralize all switchdev helpers > of the bridge layer (i.e. the software -> hardware bridge calls) into > net/bridge/br_switchdev.c, so that file would be more adequate. > > You may discard my comments but I think it'd be beneficial to us all to > finally keep a bit of consistency in that bridge layer code. Nope, those are reasonable points. I'll post a v2 along those lines. Thanks, Petr