Re: [RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF

2016-03-09 Thread Vivien Didelot
Hi Jiri, Jiri Pirko writes: > Wed, Mar 09, 2016 at 07:32:13PM CET, and...@lunn.ch wrote: >>Hi Vivien >> >>> -static bool dsa_slave_dev_check(struct net_device *dev) >>> -{ >>> - return dev->netdev_ops == &dsa_slave_netdev_ops; >>> -} >> >>Where is the equivalent of this happening? Where do we

Re: [RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF

2016-03-09 Thread Andrew Lunn
On Wed, Mar 09, 2016 at 02:32:05PM -0500, Vivien Didelot wrote: > Hi Andrew, > > Andrew Lunn writes: > > >> -static bool dsa_slave_dev_check(struct net_device *dev) > >> -{ > >> - return dev->netdev_ops == &dsa_slave_netdev_ops; > >> -} > > > > Where is the equivalent of this happening? Where d

Re: [RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF

2016-03-09 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> -static bool dsa_slave_dev_check(struct net_device *dev) >> -{ >> -return dev->netdev_ops == &dsa_slave_netdev_ops; >> -} > > Where is the equivalent of this happening? Where do we check that the > interface added to the bridge is part of the switch? Why sh

Re: [RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF

2016-03-09 Thread Jiri Pirko
Wed, Mar 09, 2016 at 07:32:13PM CET, and...@lunn.ch wrote: >Hi Vivien > >> -static bool dsa_slave_dev_check(struct net_device *dev) >> -{ >> -return dev->netdev_ops == &dsa_slave_netdev_ops; >> -} > >Where is the equivalent of this happening? Where do we check that the >interface added to the b

Re: [RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF

2016-03-09 Thread Andrew Lunn
Hi Vivien > -static bool dsa_slave_dev_check(struct net_device *dev) > -{ > - return dev->netdev_ops == &dsa_slave_netdev_ops; > -} Where is the equivalent of this happening? Where do we check that the interface added to the bridge is part of the switch? > -int dsa_slave_netdevice_event(stru

[RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF

2016-03-09 Thread Vivien Didelot
Add a new dsa_slave_bridge_if function to handle the SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF switchdev attribute. Thus remove the code related to the netdev notifier block. Signed-off-by: Vivien Didelot --- net/dsa/dsa.c | 7 net/dsa/dsa_priv.h | 2 - net/dsa/slave.c| 113 +++