diff options
author | Ido Schimmel <idosch@mellanox.com> | 2020-01-14 12:23:10 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-15 03:53:35 +0100 |
commit | 1e301fd04eaaa5b1e3c202450d86864e6714d783 (patch) | |
tree | 843f80c11d221161616a1ddfc2db1124858e713d /include/net/ip_fib.h | |
parent | ipv4: Replace route in list before notifying (diff) | |
download | linux-1e301fd04eaaa5b1e3c202450d86864e6714d783.tar.xz linux-1e301fd04eaaa5b1e3c202450d86864e6714d783.zip |
ipv4: Encapsulate function arguments in a struct
fib_dump_info() is used to prepare RTM_{NEW,DEL}ROUTE netlink messages
using the passed arguments. Currently, the function takes 11 arguments,
6 of which are attributes of the route being dumped (e.g., prefix, TOS).
The next patch will need the function to also dump to user space an
indication if the route is present in hardware or not. Instead of
passing yet another argument, change the function to take a struct
containing the different route attributes.
v2:
* Name last argument of fib_dump_info()
* Move 'struct fib_rt_info' to include/net/ip_fib.h so that it could
later be passed to fib_alias_hw_flags_set()
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip_fib.h')
-rw-r--r-- | include/net/ip_fib.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index b9cba41c6d4f..0c071c820e33 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h @@ -204,6 +204,15 @@ __be32 fib_result_prefsrc(struct net *net, struct fib_result *res); #define FIB_RES_DEV(res) (FIB_RES_NHC(res)->nhc_dev) #define FIB_RES_OIF(res) (FIB_RES_NHC(res)->nhc_oif) +struct fib_rt_info { + struct fib_info *fi; + u32 tb_id; + __be32 dst; + int dst_len; + u8 tos; + u8 type; +}; + struct fib_entry_notifier_info { struct fib_notifier_info info; /* must be first */ u32 dst; |