aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/switchdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/switchdev.h')
-rw-r--r--include/net/switchdev.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 1d22ce9f352e..d451122e8404 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -47,9 +47,11 @@ enum switchdev_attr_id {
47 SWITCHDEV_ATTR_ID_PORT_STP_STATE, 47 SWITCHDEV_ATTR_ID_PORT_STP_STATE,
48 SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, 48 SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS,
49 SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME, 49 SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME,
50 SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING,
50}; 51};
51 52
52struct switchdev_attr { 53struct switchdev_attr {
54 struct net_device *orig_dev;
53 enum switchdev_attr_id id; 55 enum switchdev_attr_id id;
54 u32 flags; 56 u32 flags;
55 union { 57 union {
@@ -57,6 +59,7 @@ struct switchdev_attr {
57 u8 stp_state; /* PORT_STP_STATE */ 59 u8 stp_state; /* PORT_STP_STATE */
58 unsigned long brport_flags; /* PORT_BRIDGE_FLAGS */ 60 unsigned long brport_flags; /* PORT_BRIDGE_FLAGS */
59 u32 ageing_time; /* BRIDGE_AGEING_TIME */ 61 u32 ageing_time; /* BRIDGE_AGEING_TIME */
62 bool vlan_filtering; /* BRIDGE_VLAN_FILTERING */
60 } u; 63 } u;
61}; 64};
62 65
@@ -65,9 +68,11 @@ enum switchdev_obj_id {
65 SWITCHDEV_OBJ_ID_PORT_VLAN, 68 SWITCHDEV_OBJ_ID_PORT_VLAN,
66 SWITCHDEV_OBJ_ID_IPV4_FIB, 69 SWITCHDEV_OBJ_ID_IPV4_FIB,
67 SWITCHDEV_OBJ_ID_PORT_FDB, 70 SWITCHDEV_OBJ_ID_PORT_FDB,
71 SWITCHDEV_OBJ_ID_PORT_MDB,
68}; 72};
69 73
70struct switchdev_obj { 74struct switchdev_obj {
75 struct net_device *orig_dev;
71 enum switchdev_obj_id id; 76 enum switchdev_obj_id id;
72 u32 flags; 77 u32 flags;
73}; 78};
@@ -109,6 +114,16 @@ struct switchdev_obj_port_fdb {
109#define SWITCHDEV_OBJ_PORT_FDB(obj) \ 114#define SWITCHDEV_OBJ_PORT_FDB(obj) \
110 container_of(obj, struct switchdev_obj_port_fdb, obj) 115 container_of(obj, struct switchdev_obj_port_fdb, obj)
111 116
117/* SWITCHDEV_OBJ_ID_PORT_MDB */
118struct switchdev_obj_port_mdb {
119 struct switchdev_obj obj;
120 unsigned char addr[ETH_ALEN];
121 u16 vid;
122};
123
124#define SWITCHDEV_OBJ_PORT_MDB(obj) \
125 container_of(obj, struct switchdev_obj_port_mdb, obj)
126
112void switchdev_trans_item_enqueue(struct switchdev_trans *trans, 127void switchdev_trans_item_enqueue(struct switchdev_trans *trans,
113 void *data, void (*destructor)(void const *), 128 void *data, void (*destructor)(void const *),
114 struct switchdev_trans_item *tritem); 129 struct switchdev_trans_item *tritem);