summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2018-11-23 02:28:51 +0300
committerDavid S. Miller <davem@davemloft.net>2018-11-24 05:02:23 +0300
commitc6fa35b2370aeed280fccbc02ff24b94ab48fcf9 (patch)
treea1f51d23f63ad23133d3664bbc517e06101f5e7a /tools
parentaa4efe21393f5c39a72c132d6e0d777d7405b885 (diff)
downloadlinux-c6fa35b2370aeed280fccbc02ff24b94ab48fcf9.tar.xz
rocker: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL
Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent referencing the bridge port device, which may be a stacking device that's one of front-panel ports uppers, or a completely unrelated device. rocker currently doesn't support any uppers other than bridge. Thus the only case that a stacked device could be validly referenced by port object notifications are bridge notifications for VLAN objects added to the bridge itself. But the driver explicitly rejects such notifications in rocker_world_port_obj_vlan_add(). It is therefore safe to assume that the only interesting case is that the notification is on a front-panel port netdevice. Subscribe to the blocking notifier chain. In the handler, filter out notifications on any foreign netdevices. Dispatch the new notifiers to rocker_port_obj_add() resp. _del() to maintain the behavior that the switchdev operation based code currently has. Signed-off-by: Petr Machata <petrm@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions