mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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>
This commit is contained in:
parent
0e332c854f
commit
d17d9f5e51
7 changed files with 25 additions and 61 deletions
|
@ -121,10 +121,6 @@ typedef int switchdev_obj_dump_cb_t(struct switchdev_obj *obj);
|
|||
* @switchdev_port_attr_get: Get a port attribute (see switchdev_attr).
|
||||
*
|
||||
* @switchdev_port_attr_set: Set a port attribute (see switchdev_attr).
|
||||
*
|
||||
* @switchdev_port_obj_add: Add an object to port (see switchdev_obj_*).
|
||||
*
|
||||
* @switchdev_port_obj_del: Delete an object from port (see switchdev_obj_*).
|
||||
*/
|
||||
struct switchdev_ops {
|
||||
int (*switchdev_port_attr_get)(struct net_device *dev,
|
||||
|
@ -132,11 +128,6 @@ struct switchdev_ops {
|
|||
int (*switchdev_port_attr_set)(struct net_device *dev,
|
||||
const struct switchdev_attr *attr,
|
||||
struct switchdev_trans *trans);
|
||||
int (*switchdev_port_obj_add)(struct net_device *dev,
|
||||
const struct switchdev_obj *obj,
|
||||
struct switchdev_trans *trans);
|
||||
int (*switchdev_port_obj_del)(struct net_device *dev,
|
||||
const struct switchdev_obj *obj);
|
||||
};
|
||||
|
||||
enum switchdev_notifier_type {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue