summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorScott Feldman <sfeldma@gmail.com>2015-05-10 09:48:06 -0700
committerDavid S. Miller <davem@davemloft.net>2015-05-12 18:43:55 -0400
commit58c2cb16b116d7feace621bd6b647bbabacfa225 (patch)
tree01dba341543ad33607c95eee011fded948a755e0 /include
parent85fdb956726ff2af609e2f6ea7be781e4db74a07 (diff)
downloadlinux-58c2cb16b116d7feace621bd6b647bbabacfa225.tar.bz2
switchdev: convert fib_ipv4_add/del over to switchdev_port_obj_add/del
The IPv4 FIB ops convert nicely to the switchdev objs and we're left with only four switchdev ops: port get/set and port add/del. Other objs will follow, such as FDB. So go ahead and convert IPv4 FIB over to switchdev obj for consistency, anticipating more objs to come. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/switchdev.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index e081d67f973a..3b217b4cca27 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -46,6 +46,7 @@ struct fib_info;
enum switchdev_obj_id {
SWITCHDEV_OBJ_UNDEFINED,
SWITCHDEV_OBJ_PORT_VLAN,
+ SWITCHDEV_OBJ_IPV4_FIB,
};
struct switchdev_obj {
@@ -57,6 +58,15 @@ struct switchdev_obj {
u16 vid_start;
u16 vid_end;
} vlan;
+ struct switchdev_obj_ipv4_fib { /* IPV4_FIB */
+ u32 dst;
+ int dst_len;
+ struct fib_info *fi;
+ u8 tos;
+ u8 type;
+ u32 nlflags;
+ u32 tb_id;
+ } ipv4_fib;
};
};
@@ -70,10 +80,6 @@ struct switchdev_obj {
* @switchdev_port_obj_add: Add an object to port (see switchdev_obj).
*
* @switchdev_port_obj_del: Delete an object from port (see switchdev_obj).
- *
- * @switchdev_fib_ipv4_add: Called to add/modify IPv4 route to switch device.
- *
- * @switchdev_fib_ipv4_del: Called to delete IPv4 route from switch device.
*/
struct switchdev_ops {
int (*switchdev_port_attr_get)(struct net_device *dev,
@@ -84,13 +90,6 @@ struct switchdev_ops {
struct switchdev_obj *obj);
int (*switchdev_port_obj_del)(struct net_device *dev,
struct switchdev_obj *obj);
- int (*switchdev_fib_ipv4_add)(struct net_device *dev, __be32 dst,
- int dst_len, struct fib_info *fi,
- u8 tos, u8 type, u32 nlflags,
- u32 tb_id);
- int (*switchdev_fib_ipv4_del)(struct net_device *dev, __be32 dst,
- int dst_len, struct fib_info *fi,
- u8 tos, u8 type, u32 tb_id);
};
enum switchdev_notifier_type {