From: Simon Horman <horms@verge.net.au>
To: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org,
netfilter@vger.kernel.org, lvs-devel@vger.kernel.org
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
Julian Anastasov <ja@ssi.bg>,
Hans Schillstrom <hans@schillstrom.com>,
Simon Horman <horms@verge.net.au>
Subject: [PATCH 06/20] ipvs: rename estimator functions
Date: Mon, 14 Mar 2011 12:45:32 +0900 [thread overview]
Message-ID: <1300074346-13799-7-git-send-email-horms@verge.net.au> (raw)
In-Reply-To: <1300074346-13799-1-git-send-email-horms@verge.net.au>
From: Julian Anastasov <ja@ssi.bg>
Rename ip_vs_new_estimator to ip_vs_start_estimator
and ip_vs_kill_estimator to ip_vs_stop_estimator to better
match their logic.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
include/net/ip_vs.h | 4 ++--
net/netfilter/ipvs/ip_vs_ctl.c | 12 ++++++------
net/netfilter/ipvs/ip_vs_est.c | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index e4a39c4..7ca5be2 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -1176,8 +1176,8 @@ extern void ip_vs_sync_cleanup(void);
*/
extern int ip_vs_estimator_init(void);
extern void ip_vs_estimator_cleanup(void);
-extern void ip_vs_new_estimator(struct net *net, struct ip_vs_stats *stats);
-extern void ip_vs_kill_estimator(struct net *net, struct ip_vs_stats *stats);
+extern void ip_vs_start_estimator(struct net *net, struct ip_vs_stats *stats);
+extern void ip_vs_stop_estimator(struct net *net, struct ip_vs_stats *stats);
extern void ip_vs_zero_estimator(struct ip_vs_stats *stats);
extern void ip_vs_read_estimator(struct ip_vs_stats_user *dst,
struct ip_vs_stats *stats);
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index c93d806..c5b1234 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -802,7 +802,7 @@ __ip_vs_update_dest(struct ip_vs_service *svc, struct ip_vs_dest *dest,
spin_unlock(&dest->dst_lock);
if (add)
- ip_vs_new_estimator(svc->net, &dest->stats);
+ ip_vs_start_estimator(svc->net, &dest->stats);
write_lock_bh(&__ip_vs_svc_lock);
@@ -1008,7 +1008,7 @@ static void __ip_vs_del_dest(struct net *net, struct ip_vs_dest *dest)
{
struct netns_ipvs *ipvs = net_ipvs(net);
- ip_vs_kill_estimator(net, &dest->stats);
+ ip_vs_stop_estimator(net, &dest->stats);
/*
* Remove it from the d-linked list with the real services.
@@ -1201,7 +1201,7 @@ ip_vs_add_service(struct net *net, struct ip_vs_service_user_kern *u,
else if (svc->port == 0)
atomic_inc(&ipvs->nullsvc_counter);
- ip_vs_new_estimator(net, &svc->stats);
+ ip_vs_start_estimator(net, &svc->stats);
/* Count only IPv4 services for old get/setsockopt interface */
if (svc->af == AF_INET)
@@ -1353,7 +1353,7 @@ static void __ip_vs_del_service(struct ip_vs_service *svc)
if (svc->af == AF_INET)
ipvs->num_services--;
- ip_vs_kill_estimator(svc->net, &svc->stats);
+ ip_vs_stop_estimator(svc->net, &svc->stats);
/* Unbind scheduler */
old_sched = svc->scheduler;
@@ -3585,7 +3585,7 @@ int __net_init __ip_vs_control_init(struct net *net)
goto err_dup;
}
#endif
- ip_vs_new_estimator(net, &ipvs->tot_stats);
+ ip_vs_start_estimator(net, &ipvs->tot_stats);
ipvs->sysctl_tbl = tbl;
/* Schedule defense work */
INIT_DELAYED_WORK(&ipvs->defense_work, defense_work_handler);
@@ -3603,7 +3603,7 @@ static void __net_exit __ip_vs_control_cleanup(struct net *net)
struct netns_ipvs *ipvs = net_ipvs(net);
ip_vs_trash_cleanup(net);
- ip_vs_kill_estimator(net, &ipvs->tot_stats);
+ ip_vs_stop_estimator(net, &ipvs->tot_stats);
cancel_delayed_work_sync(&ipvs->defense_work);
cancel_work_sync(&ipvs->defense_work.work);
#ifdef CONFIG_SYSCTL
diff --git a/net/netfilter/ipvs/ip_vs_est.c b/net/netfilter/ipvs/ip_vs_est.c
index fda75be..8c8766c 100644
--- a/net/netfilter/ipvs/ip_vs_est.c
+++ b/net/netfilter/ipvs/ip_vs_est.c
@@ -139,7 +139,7 @@ static void estimation_timer(unsigned long arg)
mod_timer(&ipvs->est_timer, jiffies + 2*HZ);
}
-void ip_vs_new_estimator(struct net *net, struct ip_vs_stats *stats)
+void ip_vs_start_estimator(struct net *net, struct ip_vs_stats *stats)
{
struct netns_ipvs *ipvs = net_ipvs(net);
struct ip_vs_estimator *est = &stats->est;
@@ -151,7 +151,7 @@ void ip_vs_new_estimator(struct net *net, struct ip_vs_stats *stats)
spin_unlock_bh(&ipvs->est_lock);
}
-void ip_vs_kill_estimator(struct net *net, struct ip_vs_stats *stats)
+void ip_vs_stop_estimator(struct net *net, struct ip_vs_stats *stats)
{
struct netns_ipvs *ipvs = net_ipvs(net);
struct ip_vs_estimator *est = &stats->est;
--
1.7.2.3
next prev parent reply other threads:[~2011-03-14 3:45 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-14 3:45 [patch v3 00/20] IPVS: Proposed Changes Simon Horman
2011-03-14 3:45 ` [PATCH 01/20] ipvs: move struct netns_ipvs Simon Horman
2011-03-14 3:45 ` [PATCH 02/20] ipvs: reorganize tot_stats Simon Horman
2011-03-14 4:28 ` Eric Dumazet
2011-03-14 9:21 ` Julian Anastasov
2011-03-14 3:45 ` [PATCH 03/20] ipvs: properly zero stats and rates Simon Horman
2011-03-14 4:09 ` Eric Dumazet
2011-03-14 3:45 ` [PATCH 04/20] ipvs: remove unused seqcount stats Simon Horman
2011-03-14 3:45 ` [PATCH 05/20] ipvs: optimize rates reading Simon Horman
2011-03-14 3:45 ` Simon Horman [this message]
2011-03-14 3:45 ` [PATCH 07/20] IPVS: Add ip_vs_route_me_harder() Simon Horman
2011-03-14 3:45 ` [PATCH 08/20] IPVS: Add sysctl_snat_reroute() Simon Horman
2011-03-14 3:45 ` [PATCH 09/20] IPVS: Add sysctl_nat_icmp_send() Simon Horman
2011-03-14 3:45 ` [PATCH 10/20] IPVS: Add {sysctl_sync_threshold,period}() Simon Horman
2011-03-14 3:45 ` [PATCH 11/20] IPVS: Add sysctl_sync_ver() Simon Horman
2011-03-14 3:45 ` [PATCH 12/20] IPVS: Add sysctl_expire_nodest_conn() Simon Horman
2011-03-14 3:45 ` [PATCH 13/20] IPVS: Add expire_quiescent_template() Simon Horman
2011-03-14 3:45 ` [PATCH 14/20] IPVS: Conditinally use sysctl_lblc{r}_expiration Simon Horman
2011-03-14 3:45 ` [PATCH 15/20] IPVS: ip_vs_todrop() becomes a noop when CONFIG_SYSCTL is undefined Simon Horman
2011-03-14 3:45 ` [PATCH 16/20] IPVS: Conditional ip_vs_conntrack_enabled() Simon Horman
2011-03-14 3:45 ` [PATCH 17/20] IPVS: Minimise ip_vs_leave when CONFIG_SYSCTL is undefined Simon Horman
2011-03-14 3:45 ` [PATCH 18/20] IPVS: Conditionally define and use ip_vs_lblc{r}_table Simon Horman
2011-03-14 3:45 ` [PATCH 19/20] IPVS: Add __ip_vs_control_{init,cleanup}_sysctl() Simon Horman
2011-03-14 3:45 ` [PATCH 20/20] IPVS: Conditionally include sysctl members of struct netns_ipvs Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1300074346-13799-7-git-send-email-horms@verge.net.au \
--to=horms@verge.net.au \
--cc=eric.dumazet@gmail.com \
--cc=hans@schillstrom.com \
--cc=ja@ssi.bg \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=netfilter@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).