Re: [RFC PATCH net-next 0/3] net: dsa: finer bridging control
From: Vivien Didelot
Date: Sun Mar 13 2016 - 14:40:34 EST
Andrew Lunn <andrew@xxxxxxx> writes:
> On Sun, Mar 13, 2016 at 01:42:23AM -0500, Vivien Didelot wrote:
>> This patchset renames the bridging routines of the DSA layer, make the
>> unbridging routine return void, and rework the DSA netdev notifier handler,
>> similar to what the Mellanox Spectrum driver does.
> Tested-by: Andrew Lunn <andrew@xxxxxxx>
> Do you think there could be some consolidation of code with Mellanox,
> and other switchdev devices? Moving it into the switchdev core?
We cannot move all this code to switchdev core, because switchdev is
stateless, so there is no place to register the netdevice notifier(s).
But it might be possible to provide a generic switchdev_netdevice_event
helper, using new switchdev operations to check a port device, and
add/del upper devices. I'll think about that.