summaryrefslogtreecommitdiffstats
path: root/include/net/dsa.h
diff options
context:
space:
mode:
authorVivien Didelot2017-02-03 19:20:21 +0100
committerDavid S. Miller2017-02-06 22:53:29 +0100
commit04d3a4c6af52a58370795bc9f70dc15f51f8bb84 (patch)
tree07ed46ceedeb980d62da34ae26e3aac5f8af7dfb /include/net/dsa.h
parentnet: dsa: add switch notifier (diff)
downloadkernel-qcow2-linux-04d3a4c6af52a58370795bc9f70dc15f51f8bb84.tar.gz
kernel-qcow2-linux-04d3a4c6af52a58370795bc9f70dc15f51f8bb84.tar.xz
kernel-qcow2-linux-04d3a4c6af52a58370795bc9f70dc15f51f8bb84.zip
net: dsa: introduce bridge notifier
A slave device will now notify the switch fabric once its port is bridged or unbridged, instead of calling directly its switch operations. This code allows propagating cross-chip bridging events in the fabric. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r--include/net/dsa.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index ac4ea7c3a102..e9c940c8936f 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -268,6 +268,16 @@ struct switchdev_obj_port_fdb;
struct switchdev_obj_port_mdb;
struct switchdev_obj_port_vlan;
+#define DSA_NOTIFIER_BRIDGE_JOIN 1
+#define DSA_NOTIFIER_BRIDGE_LEAVE 2
+
+/* DSA_NOTIFIER_BRIDGE_* */
+struct dsa_notifier_bridge_info {
+ struct net_device *br;
+ int sw_index;
+ int port;
+};
+
struct dsa_switch_ops {
/*
* Probing and setup.