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>
This commit is contained in:

committed by
David S. Miller

parent
bf0b211256
commit
f8f2147150
@@ -1035,7 +1035,7 @@ struct fib_info;
|
||||
* state change.
|
||||
* int (*ndo_sw_parent_fib_ipv4_add)(struct net_device *dev, __be32 dst,
|
||||
* int dst_len, struct fib_info *fi,
|
||||
* u8 tos, u8 type, u32 tb_id);
|
||||
* u8 tos, u8 type, u32 nlflags, u32 tb_id);
|
||||
* Called to add/modify IPv4 route to switch device.
|
||||
* int (*ndo_sw_parent_fib_ipv4_del)(struct net_device *dev, __be32 dst,
|
||||
* int dst_len, struct fib_info *fi,
|
||||
@@ -1207,6 +1207,7 @@ struct net_device_ops {
|
||||
int dst_len,
|
||||
struct fib_info *fi,
|
||||
u8 tos, u8 type,
|
||||
u32 nlflags,
|
||||
u32 tb_id);
|
||||
int (*ndo_switch_fib_ipv4_del)(struct net_device *dev,
|
||||
__be32 dst,
|
||||
|
Reference in New Issue
Block a user