diff options
Diffstat (limited to 'include/net/switchdev.h')
| -rw-r--r-- | include/net/switchdev.h | 52 |
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 { | |||
| 68 | enum switchdev_obj_id { | 68 | enum 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 */ | ||
| 96 | struct 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 */ |
| 111 | struct switchdev_obj_port_fdb { | 95 | struct 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); |
| 210 | int switchdev_port_bridge_dellink(struct net_device *dev, | 194 | int switchdev_port_bridge_dellink(struct net_device *dev, |
| 211 | struct nlmsghdr *nlh, u16 flags); | 195 | struct nlmsghdr *nlh, u16 flags); |
| 212 | int switchdev_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi, | ||
| 213 | u8 tos, u8 type, u32 nlflags, u32 tb_id); | ||
| 214 | int switchdev_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi, | ||
| 215 | u8 tos, u8 type, u32 tb_id); | ||
| 216 | void switchdev_fib_ipv4_abort(struct fib_info *fi); | ||
| 217 | int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], | 196 | int 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); |
| 223 | int switchdev_port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb, | 202 | int 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); |
| 226 | void switchdev_port_fwd_mark_set(struct net_device *dev, | 205 | void 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 | ||
| 307 | static 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 | |||
| 315 | static 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 | |||
| 322 | static inline void switchdev_fib_ipv4_abort(struct fib_info *fi) | ||
| 323 | { | ||
| 324 | } | ||
| 325 | |||
| 326 | static inline int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], | 286 | static 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 | |||
| 350 | static 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 | ||
| 356 | static inline bool switchdev_port_same_parent_id(struct net_device *a, | 310 | static inline bool switchdev_port_same_parent_id(struct net_device *a, |
