diff options
author | David Ahern <dsahern@gmail.com> | 2019-03-28 06:53:49 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-29 20:48:03 +0300 |
commit | faa041a40b9fa64913789fcc0161c7c73161f57e (patch) | |
tree | 70dba101146cf25c4c04fc669ea8b24051d9440b /include | |
parent | e4516ef65490ef29d48a98ad4d7c90dccf39068f (diff) | |
download | linux-faa041a40b9fa64913789fcc0161c7c73161f57e.tar.xz |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/ip_fib.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 1af1f552644a..5a4df0ba175e 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h @@ -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); |