diff options
author | Julian Anastasov <ja@ssi.bg> | 2011-03-13 19:44:28 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2011-03-14 20:36:54 -0400 |
commit | 6ef757f965c9133e82116475eab7f30df391c7fa (patch) | |
tree | d0933c3b9e07ac3440c4a46a63ef26f1fea31882 /net/netfilter | |
parent | ea9f22cce9c2530d659f9122819940b69506b2d9 (diff) |
ipvs: rename estimator functions
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>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 12 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_est.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index c93d806e73bd..c5b1234b630e 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, | |||
802 | spin_unlock(&dest->dst_lock); | 802 | spin_unlock(&dest->dst_lock); |
803 | 803 | ||
804 | if (add) | 804 | if (add) |
805 | ip_vs_new_estimator(svc->net, &dest->stats); | 805 | ip_vs_start_estimator(svc->net, &dest->stats); |
806 | 806 | ||
807 | write_lock_bh(&__ip_vs_svc_lock); | 807 | write_lock_bh(&__ip_vs_svc_lock); |
808 | 808 | ||
@@ -1008,7 +1008,7 @@ static void __ip_vs_del_dest(struct net *net, struct ip_vs_dest *dest) | |||
1008 | { | 1008 | { |
1009 | struct netns_ipvs *ipvs = net_ipvs(net); | 1009 | struct netns_ipvs *ipvs = net_ipvs(net); |
1010 | 1010 | ||
1011 | ip_vs_kill_estimator(net, &dest->stats); | 1011 | ip_vs_stop_estimator(net, &dest->stats); |
1012 | 1012 | ||
1013 | /* | 1013 | /* |
1014 | * Remove it from the d-linked list with the real services. | 1014 | * 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, | |||
1201 | else if (svc->port == 0) | 1201 | else if (svc->port == 0) |
1202 | atomic_inc(&ipvs->nullsvc_counter); | 1202 | atomic_inc(&ipvs->nullsvc_counter); |
1203 | 1203 | ||
1204 | ip_vs_new_estimator(net, &svc->stats); | 1204 | ip_vs_start_estimator(net, &svc->stats); |
1205 | 1205 | ||
1206 | /* Count only IPv4 services for old get/setsockopt interface */ | 1206 | /* Count only IPv4 services for old get/setsockopt interface */ |
1207 | if (svc->af == AF_INET) | 1207 | if (svc->af == AF_INET) |
@@ -1353,7 +1353,7 @@ static void __ip_vs_del_service(struct ip_vs_service *svc) | |||
1353 | if (svc->af == AF_INET) | 1353 | if (svc->af == AF_INET) |
1354 | ipvs->num_services--; | 1354 | ipvs->num_services--; |
1355 | 1355 | ||
1356 | ip_vs_kill_estimator(svc->net, &svc->stats); | 1356 | ip_vs_stop_estimator(svc->net, &svc->stats); |
1357 | 1357 | ||
1358 | /* Unbind scheduler */ | 1358 | /* Unbind scheduler */ |
1359 | old_sched = svc->scheduler; | 1359 | old_sched = svc->scheduler; |
@@ -3585,7 +3585,7 @@ int __net_init __ip_vs_control_init(struct net *net) | |||
3585 | goto err_dup; | 3585 | goto err_dup; |
3586 | } | 3586 | } |
3587 | #endif | 3587 | #endif |
3588 | ip_vs_new_estimator(net, &ipvs->tot_stats); | 3588 | ip_vs_start_estimator(net, &ipvs->tot_stats); |
3589 | ipvs->sysctl_tbl = tbl; | 3589 | ipvs->sysctl_tbl = tbl; |
3590 | /* Schedule defense work */ | 3590 | /* Schedule defense work */ |
3591 | INIT_DELAYED_WORK(&ipvs->defense_work, defense_work_handler); | 3591 | INIT_DELAYED_WORK(&ipvs->defense_work, defense_work_handler); |
@@ -3603,7 +3603,7 @@ static void __net_exit __ip_vs_control_cleanup(struct net *net) | |||
3603 | struct netns_ipvs *ipvs = net_ipvs(net); | 3603 | struct netns_ipvs *ipvs = net_ipvs(net); |
3604 | 3604 | ||
3605 | ip_vs_trash_cleanup(net); | 3605 | ip_vs_trash_cleanup(net); |
3606 | ip_vs_kill_estimator(net, &ipvs->tot_stats); | 3606 | ip_vs_stop_estimator(net, &ipvs->tot_stats); |
3607 | cancel_delayed_work_sync(&ipvs->defense_work); | 3607 | cancel_delayed_work_sync(&ipvs->defense_work); |
3608 | cancel_work_sync(&ipvs->defense_work.work); | 3608 | cancel_work_sync(&ipvs->defense_work.work); |
3609 | #ifdef CONFIG_SYSCTL | 3609 | #ifdef CONFIG_SYSCTL |
diff --git a/net/netfilter/ipvs/ip_vs_est.c b/net/netfilter/ipvs/ip_vs_est.c index fda75be231e8..8c8766ca56ad 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) | |||
139 | mod_timer(&ipvs->est_timer, jiffies + 2*HZ); | 139 | mod_timer(&ipvs->est_timer, jiffies + 2*HZ); |
140 | } | 140 | } |
141 | 141 | ||
142 | void ip_vs_new_estimator(struct net *net, struct ip_vs_stats *stats) | 142 | void ip_vs_start_estimator(struct net *net, struct ip_vs_stats *stats) |
143 | { | 143 | { |
144 | struct netns_ipvs *ipvs = net_ipvs(net); | 144 | struct netns_ipvs *ipvs = net_ipvs(net); |
145 | struct ip_vs_estimator *est = &stats->est; | 145 | struct ip_vs_estimator *est = &stats->est; |
@@ -151,7 +151,7 @@ void ip_vs_new_estimator(struct net *net, struct ip_vs_stats *stats) | |||
151 | spin_unlock_bh(&ipvs->est_lock); | 151 | spin_unlock_bh(&ipvs->est_lock); |
152 | } | 152 | } |
153 | 153 | ||
154 | void ip_vs_kill_estimator(struct net *net, struct ip_vs_stats *stats) | 154 | void ip_vs_stop_estimator(struct net *net, struct ip_vs_stats *stats) |
155 | { | 155 | { |
156 | struct netns_ipvs *ipvs = net_ipvs(net); | 156 | struct netns_ipvs *ipvs = net_ipvs(net); |
157 | struct ip_vs_estimator *est = &stats->est; | 157 | struct ip_vs_estimator *est = &stats->est; |