ipv4: Create cleanup helper for fib_nh
Move the fib_nh cleanup code from free_fib_info_rcu into a new helper, fib_nh_release. Move classid accounting into fib_nh_release which is called per fib_nh to make accounting symmetrical with fib_nh_init. Export the helper to allow for use with nexthop objects in the future. Signed-off-by: David Ahern <dsahern@gmail.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e4516ef654
commit
faa041a40b
@@ -419,6 +419,7 @@ void fib_select_path(struct net *net, struct fib_result *res,
|
||||
int fib_nh_init(struct net *net, struct fib_nh *fib_nh,
|
||||
struct fib_config *cfg, int nh_weight,
|
||||
struct netlink_ext_ack *extack);
|
||||
void fib_nh_release(struct net *net, struct fib_nh *fib_nh);
|
||||
|
||||
/* Exported by fib_trie.c */
|
||||
void fib_trie_init(void);
|
||||
|
Reference in New Issue
Block a user