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.h52
1 files changed, 3 insertions, 49 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 62f6a967a1b7..eba80c4fc56f 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -68,7 +68,6 @@ struct switchdev_attr {
68enum switchdev_obj_id { 68enum switchdev_obj_id {
69 SWITCHDEV_OBJ_ID_UNDEFINED, 69 SWITCHDEV_OBJ_ID_UNDEFINED,
70 SWITCHDEV_OBJ_ID_PORT_VLAN, 70 SWITCHDEV_OBJ_ID_PORT_VLAN,
71 SWITCHDEV_OBJ_ID_IPV4_FIB,
72 SWITCHDEV_OBJ_ID_PORT_FDB, 71 SWITCHDEV_OBJ_ID_PORT_FDB,
73 SWITCHDEV_OBJ_ID_PORT_MDB, 72 SWITCHDEV_OBJ_ID_PORT_MDB,
74}; 73};
@@ -92,21 +91,6 @@ struct switchdev_obj_port_vlan {
92#define SWITCHDEV_OBJ_PORT_VLAN(obj) \ 91#define SWITCHDEV_OBJ_PORT_VLAN(obj) \
93 container_of(obj, struct switchdev_obj_port_vlan, obj) 92 container_of(obj, struct switchdev_obj_port_vlan, obj)
94 93
95/* SWITCHDEV_OBJ_ID_IPV4_FIB */
96struct switchdev_obj_ipv4_fib {
97 struct switchdev_obj obj;
98 u32 dst;
99 int dst_len;
100 struct fib_info *fi;
101 u8 tos;
102 u8 type;
103 u32 nlflags;
104 u32 tb_id;
105};
106
107#define SWITCHDEV_OBJ_IPV4_FIB(obj) \
108 container_of(obj, struct switchdev_obj_ipv4_fib, obj)
109
110/* SWITCHDEV_OBJ_ID_PORT_FDB */ 94/* SWITCHDEV_OBJ_ID_PORT_FDB */
111struct switchdev_obj_port_fdb { 95struct switchdev_obj_port_fdb {
112 struct switchdev_obj obj; 96 struct switchdev_obj obj;
@@ -209,11 +193,6 @@ int switchdev_port_bridge_setlink(struct net_device *dev,
209 struct nlmsghdr *nlh, u16 flags); 193 struct nlmsghdr *nlh, u16 flags);
210int switchdev_port_bridge_dellink(struct net_device *dev, 194int switchdev_port_bridge_dellink(struct net_device *dev,
211 struct nlmsghdr *nlh, u16 flags); 195 struct nlmsghdr *nlh, u16 flags);
212int switchdev_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi,
213 u8 tos, u8 type, u32 nlflags, u32 tb_id);
214int switchdev_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,
215 u8 tos, u8 type, u32 tb_id);
216void switchdev_fib_ipv4_abort(struct fib_info *fi);
217int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], 196int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
218 struct net_device *dev, const unsigned char *addr, 197 struct net_device *dev, const unsigned char *addr,
219 u16 vid, u16 nlm_flags); 198 u16 vid, u16 nlm_flags);
@@ -222,7 +201,7 @@ int switchdev_port_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
222 u16 vid); 201 u16 vid);
223int switchdev_port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb, 202int switchdev_port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
224 struct net_device *dev, 203 struct net_device *dev,
225 struct net_device *filter_dev, int idx); 204 struct net_device *filter_dev, int *idx);
226void switchdev_port_fwd_mark_set(struct net_device *dev, 205void switchdev_port_fwd_mark_set(struct net_device *dev,
227 struct net_device *group_dev, 206 struct net_device *group_dev,
228 bool joining); 207 bool joining);
@@ -304,25 +283,6 @@ static inline int switchdev_port_bridge_dellink(struct net_device *dev,
304 return -EOPNOTSUPP; 283 return -EOPNOTSUPP;
305} 284}
306 285
307static inline int switchdev_fib_ipv4_add(u32 dst, int dst_len,
308 struct fib_info *fi,
309 u8 tos, u8 type,
310 u32 nlflags, u32 tb_id)
311{
312 return 0;
313}
314
315static inline int switchdev_fib_ipv4_del(u32 dst, int dst_len,
316 struct fib_info *fi,
317 u8 tos, u8 type, u32 tb_id)
318{
319 return 0;
320}
321
322static inline void switchdev_fib_ipv4_abort(struct fib_info *fi)
323{
324}
325
326static inline int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], 286static inline int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
327 struct net_device *dev, 287 struct net_device *dev,
328 const unsigned char *addr, 288 const unsigned char *addr,
@@ -342,15 +302,9 @@ static inline int switchdev_port_fdb_dump(struct sk_buff *skb,
342 struct netlink_callback *cb, 302 struct netlink_callback *cb,
343 struct net_device *dev, 303 struct net_device *dev,
344 struct net_device *filter_dev, 304 struct net_device *filter_dev,
345 int idx) 305 int *idx)
346{
347 return idx;
348}
349
350static inline void switchdev_port_fwd_mark_set(struct net_device *dev,
351 struct net_device *group_dev,
352 bool joining)
353{ 306{
307 return *idx;
354} 308}
355 309
356static inline bool switchdev_port_same_parent_id(struct net_device *a, 310static inline bool switchdev_port_same_parent_id(struct net_device *a,