diff options
author | Julian Anastasov <ja@ssi.bg> | 2022-11-22 17:46:00 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-12-10 22:44:42 +0100 |
commit | de39afb3d811ba2c028de8662adafedb4899327b (patch) | |
tree | c7a5e8e265c591c1fbf6e931be2e09f4094d6240 /include/net/ip_vs.h | |
parent | ipvs: add rcu protection to stats (diff) | |
download | linux-de39afb3d811ba2c028de8662adafedb4899327b.tar.xz linux-de39afb3d811ba2c028de8662adafedb4899327b.zip |
ipvs: use common functions for stats allocation
Move alloc_percpu/free_percpu logic in new functions
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Cc: yunhong-cgl jiang <xintian1976@gmail.com>
Cc: "dust.li" <dust.li@linux.alibaba.com>
Reviewed-by: Jiri Wiesner <jwiesner@suse.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r-- | include/net/ip_vs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index bd8ae137e43b..e5582c01a4a3 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -410,6 +410,11 @@ struct ip_vs_stats_rcu { struct rcu_head rcu_head; }; +int ip_vs_stats_init_alloc(struct ip_vs_stats *s); +struct ip_vs_stats *ip_vs_stats_alloc(void); +void ip_vs_stats_release(struct ip_vs_stats *stats); +void ip_vs_stats_free(struct ip_vs_stats *stats); + struct dst_entry; struct iphdr; struct ip_vs_conn; |