aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorScott Feldman <sfeldma@gmail.com>2015-03-09 13:59:09 -0700
committerDavid S. Miller <davem@davemloft.net>2015-03-09 23:56:52 -0400
commitf8f2147150de303e814c0452075d467734d3544b (patch)
tree96d28922f4b9d1643da9c50d0532652c3dc14167 /include/net
parentMerge branch 'dsa-next' (diff)
downloadlinux-dev-f8f2147150de303e814c0452075d467734d3544b.tar.xz
linux-dev-f8f2147150de303e814c0452075d467734d3544b.zip
switchdev: add netlink flags to IPv4 FIB add op
Pass in the netlink flags (NLM_F_*) into switchdev driver for IPv4 FIB add op to allow driver to 1) optimize hardware updates, 2) handle ip route prepend and append commands correctly. Suggested-by: Jamal Hadi Salim <jhs@mojatatu.com> Suggested-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: Scott Feldman <sfeldma@gmail.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/switchdev.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 933fac410a7a..1a9382febcc3 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -1,6 +1,7 @@
/*
* include/net/switchdev.h - Switch device API
* Copyright (c) 2014 Jiri Pirko <jiri@resnulli.us>
+ * Copyright (c) 2014-2015 Scott Feldman <sfeldma@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,7 +53,7 @@ int ndo_dflt_netdev_switch_port_bridge_dellink(struct net_device *dev,
int ndo_dflt_netdev_switch_port_bridge_setlink(struct net_device *dev,
struct nlmsghdr *nlh, u16 flags);
int netdev_switch_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi,
- u8 tos, u8 type, u32 tb_id);
+ u8 tos, u8 type, u32 nlflags, u32 tb_id);
int netdev_switch_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,
u8 tos, u8 type, u32 tb_id);
void netdev_switch_fib_ipv4_abort(struct fib_info *fi);
@@ -117,7 +118,8 @@ static inline int ndo_dflt_netdev_switch_port_bridge_setlink(struct net_device *
static inline int netdev_switch_fib_ipv4_add(u32 dst, int dst_len,
struct fib_info *fi,
- u8 tos, u8 type, u32 tb_id)
+ u8 tos, u8 type,
+ u32 nlflags, u32 tb_id)
{
return 0;
}