1 /* SPDX-License-Identifier: GPL-2.0-or-later */
8 struct netlink_ext_ack;
11 DSA_NOTIFIER_AGEING_TIME,
12 DSA_NOTIFIER_BRIDGE_JOIN,
13 DSA_NOTIFIER_BRIDGE_LEAVE,
16 DSA_NOTIFIER_HOST_FDB_ADD,
17 DSA_NOTIFIER_HOST_FDB_DEL,
18 DSA_NOTIFIER_LAG_FDB_ADD,
19 DSA_NOTIFIER_LAG_FDB_DEL,
20 DSA_NOTIFIER_LAG_CHANGE,
21 DSA_NOTIFIER_LAG_JOIN,
22 DSA_NOTIFIER_LAG_LEAVE,
25 DSA_NOTIFIER_HOST_MDB_ADD,
26 DSA_NOTIFIER_HOST_MDB_DEL,
27 DSA_NOTIFIER_VLAN_ADD,
28 DSA_NOTIFIER_VLAN_DEL,
29 DSA_NOTIFIER_HOST_VLAN_ADD,
30 DSA_NOTIFIER_HOST_VLAN_DEL,
32 DSA_NOTIFIER_TAG_PROTO,
33 DSA_NOTIFIER_TAG_PROTO_CONNECT,
34 DSA_NOTIFIER_TAG_PROTO_DISCONNECT,
35 DSA_NOTIFIER_TAG_8021Q_VLAN_ADD,
36 DSA_NOTIFIER_TAG_8021Q_VLAN_DEL,
37 DSA_NOTIFIER_MASTER_STATE_CHANGE,
40 /* DSA_NOTIFIER_AGEING_TIME */
41 struct dsa_notifier_ageing_time_info {
42 unsigned int ageing_time;
45 /* DSA_NOTIFIER_BRIDGE_* */
46 struct dsa_notifier_bridge_info {
47 const struct dsa_port *dp;
48 struct dsa_bridge bridge;
50 struct netlink_ext_ack *extack;
53 /* DSA_NOTIFIER_FDB_* */
54 struct dsa_notifier_fdb_info {
55 const struct dsa_port *dp;
56 const unsigned char *addr;
61 /* DSA_NOTIFIER_LAG_FDB_* */
62 struct dsa_notifier_lag_fdb_info {
64 const unsigned char *addr;
69 /* DSA_NOTIFIER_MDB_* */
70 struct dsa_notifier_mdb_info {
71 const struct dsa_port *dp;
72 const struct switchdev_obj_port_mdb *mdb;
76 /* DSA_NOTIFIER_LAG_* */
77 struct dsa_notifier_lag_info {
78 const struct dsa_port *dp;
80 struct netdev_lag_upper_info *info;
81 struct netlink_ext_ack *extack;
84 /* DSA_NOTIFIER_VLAN_* */
85 struct dsa_notifier_vlan_info {
86 const struct dsa_port *dp;
87 const struct switchdev_obj_port_vlan *vlan;
88 struct netlink_ext_ack *extack;
91 /* DSA_NOTIFIER_MTU */
92 struct dsa_notifier_mtu_info {
93 const struct dsa_port *dp;
97 /* DSA_NOTIFIER_TAG_PROTO_* */
98 struct dsa_notifier_tag_proto_info {
99 const struct dsa_device_ops *tag_ops;
102 /* DSA_NOTIFIER_TAG_8021Q_VLAN_* */
103 struct dsa_notifier_tag_8021q_vlan_info {
104 const struct dsa_port *dp;
108 /* DSA_NOTIFIER_MASTER_STATE_CHANGE */
109 struct dsa_notifier_master_state_info {
110 const struct net_device *master;
114 int dsa_tree_notify(struct dsa_switch_tree *dst, unsigned long e, void *v);
115 int dsa_broadcast(unsigned long e, void *v);
117 int dsa_switch_register_notifier(struct dsa_switch *ds);
118 void dsa_switch_unregister_notifier(struct dsa_switch *ds);