OSDN Git Service

switchdev: Replace port obj add/del SDO with a notification
authorPetr Machata <petrm@mellanox.com>
Thu, 22 Nov 2018 23:32:57 +0000 (23:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 24 Nov 2018 02:02:24 +0000 (18:02 -0800)
commitd17d9f5e5143125f9274194d8f7368f76b9d141f
treebf41261e370ea54e0f943ed0efd02b64729e6d9d
parent0e332c854f4118680b6d37b22551f2f16df806d6
switchdev: Replace port obj add/del SDO with a notification

Drop switchdev_ops.switchdev_port_obj_add and _del. Drop the uses of
this field from all clients, which were migrated to use switchdev
notification in the previous patches.

Add a new function switchdev_port_obj_notify() that sends the switchdev
notifications SWITCHDEV_PORT_OBJ_ADD and _DEL.

Update switchdev_port_obj_del_now() to dispatch to this new function.
Drop __switchdev_port_obj_add() and update switchdev_port_obj_add()
likewise.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
drivers/net/ethernet/mscc/ocelot.c
drivers/net/ethernet/rocker/rocker_main.c
drivers/staging/fsl-dpaa2/ethsw/ethsw.c
include/net/switchdev.h
net/dsa/slave.c
net/switchdev/switchdev.c