diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_ctl.c | 21 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_lblc.c | 7 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_lblcr.c | 7 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_lc.c | 21 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_nq.c | 24 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_rr.c | 7 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_sed.c | 24 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_wlc.c | 24 |
8 files changed, 12 insertions, 123 deletions
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c index d1dbd8b311b7..ede101eeec17 100644 --- a/net/ipv4/ipvs/ip_vs_ctl.c +++ b/net/ipv4/ipvs/ip_vs_ctl.c | |||
@@ -869,7 +869,8 @@ ip_vs_add_dest(struct ip_vs_service *svc, struct ip_vs_dest_user *udest) | |||
869 | svc->num_dests++; | 869 | svc->num_dests++; |
870 | 870 | ||
871 | /* call the update_service function of its scheduler */ | 871 | /* call the update_service function of its scheduler */ |
872 | svc->scheduler->update_service(svc); | 872 | if (svc->scheduler->update_service) |
873 | svc->scheduler->update_service(svc); | ||
873 | 874 | ||
874 | write_unlock_bh(&__ip_vs_svc_lock); | 875 | write_unlock_bh(&__ip_vs_svc_lock); |
875 | return 0; | 876 | return 0; |
@@ -899,7 +900,8 @@ ip_vs_add_dest(struct ip_vs_service *svc, struct ip_vs_dest_user *udest) | |||
899 | svc->num_dests++; | 900 | svc->num_dests++; |
900 | 901 | ||
901 | /* call the update_service function of its scheduler */ | 902 | /* call the update_service function of its scheduler */ |
902 | svc->scheduler->update_service(svc); | 903 | if (svc->scheduler->update_service) |
904 | svc->scheduler->update_service(svc); | ||
903 | 905 | ||
904 | write_unlock_bh(&__ip_vs_svc_lock); | 906 | write_unlock_bh(&__ip_vs_svc_lock); |
905 | 907 | ||
@@ -949,7 +951,8 @@ ip_vs_edit_dest(struct ip_vs_service *svc, struct ip_vs_dest_user *udest) | |||
949 | IP_VS_WAIT_WHILE(atomic_read(&svc->usecnt) > 1); | 951 | IP_VS_WAIT_WHILE(atomic_read(&svc->usecnt) > 1); |
950 | 952 | ||
951 | /* call the update_service, because server weight may be changed */ | 953 | /* call the update_service, because server weight may be changed */ |
952 | svc->scheduler->update_service(svc); | 954 | if (svc->scheduler->update_service) |
955 | svc->scheduler->update_service(svc); | ||
953 | 956 | ||
954 | write_unlock_bh(&__ip_vs_svc_lock); | 957 | write_unlock_bh(&__ip_vs_svc_lock); |
955 | 958 | ||
@@ -1012,12 +1015,12 @@ static void __ip_vs_unlink_dest(struct ip_vs_service *svc, | |||
1012 | */ | 1015 | */ |
1013 | list_del(&dest->n_list); | 1016 | list_del(&dest->n_list); |
1014 | svc->num_dests--; | 1017 | svc->num_dests--; |
1015 | if (svcupd) { | 1018 | |
1016 | /* | 1019 | /* |
1017 | * Call the update_service function of its scheduler | 1020 | * Call the update_service function of its scheduler |
1018 | */ | 1021 | */ |
1019 | svc->scheduler->update_service(svc); | 1022 | if (svcupd && svc->scheduler->update_service) |
1020 | } | 1023 | svc->scheduler->update_service(svc); |
1021 | } | 1024 | } |
1022 | 1025 | ||
1023 | 1026 | ||
diff --git a/net/ipv4/ipvs/ip_vs_lblc.c b/net/ipv4/ipvs/ip_vs_lblc.c index 7a6a319f544a..4a14d069f8ab 100644 --- a/net/ipv4/ipvs/ip_vs_lblc.c +++ b/net/ipv4/ipvs/ip_vs_lblc.c | |||
@@ -388,12 +388,6 @@ static int ip_vs_lblc_done_svc(struct ip_vs_service *svc) | |||
388 | } | 388 | } |
389 | 389 | ||
390 | 390 | ||
391 | static int ip_vs_lblc_update_svc(struct ip_vs_service *svc) | ||
392 | { | ||
393 | return 0; | ||
394 | } | ||
395 | |||
396 | |||
397 | static inline struct ip_vs_dest * | 391 | static inline struct ip_vs_dest * |
398 | __ip_vs_wlc_schedule(struct ip_vs_service *svc, struct iphdr *iph) | 392 | __ip_vs_wlc_schedule(struct ip_vs_service *svc, struct iphdr *iph) |
399 | { | 393 | { |
@@ -542,7 +536,6 @@ static struct ip_vs_scheduler ip_vs_lblc_scheduler = | |||
542 | .n_list = LIST_HEAD_INIT(ip_vs_lblc_scheduler.n_list), | 536 | .n_list = LIST_HEAD_INIT(ip_vs_lblc_scheduler.n_list), |
543 | .init_service = ip_vs_lblc_init_svc, | 537 | .init_service = ip_vs_lblc_init_svc, |
544 | .done_service = ip_vs_lblc_done_svc, | 538 | .done_service = ip_vs_lblc_done_svc, |
545 | .update_service = ip_vs_lblc_update_svc, | ||
546 | .schedule = ip_vs_lblc_schedule, | 539 | .schedule = ip_vs_lblc_schedule, |
547 | }; | 540 | }; |
548 | 541 | ||
diff --git a/net/ipv4/ipvs/ip_vs_lblcr.c b/net/ipv4/ipvs/ip_vs_lblcr.c index c234e73968a6..46b870385b89 100644 --- a/net/ipv4/ipvs/ip_vs_lblcr.c +++ b/net/ipv4/ipvs/ip_vs_lblcr.c | |||
@@ -572,12 +572,6 @@ static int ip_vs_lblcr_done_svc(struct ip_vs_service *svc) | |||
572 | } | 572 | } |
573 | 573 | ||
574 | 574 | ||
575 | static int ip_vs_lblcr_update_svc(struct ip_vs_service *svc) | ||
576 | { | ||
577 | return 0; | ||
578 | } | ||
579 | |||
580 | |||
581 | static inline struct ip_vs_dest * | 575 | static inline struct ip_vs_dest * |
582 | __ip_vs_wlc_schedule(struct ip_vs_service *svc, struct iphdr *iph) | 576 | __ip_vs_wlc_schedule(struct ip_vs_service *svc, struct iphdr *iph) |
583 | { | 577 | { |
@@ -731,7 +725,6 @@ static struct ip_vs_scheduler ip_vs_lblcr_scheduler = | |||
731 | .n_list = LIST_HEAD_INIT(ip_vs_lblcr_scheduler.n_list), | 725 | .n_list = LIST_HEAD_INIT(ip_vs_lblcr_scheduler.n_list), |
732 | .init_service = ip_vs_lblcr_init_svc, | 726 | .init_service = ip_vs_lblcr_init_svc, |
733 | .done_service = ip_vs_lblcr_done_svc, | 727 | .done_service = ip_vs_lblcr_done_svc, |
734 | .update_service = ip_vs_lblcr_update_svc, | ||
735 | .schedule = ip_vs_lblcr_schedule, | 728 | .schedule = ip_vs_lblcr_schedule, |
736 | }; | 729 | }; |
737 | 730 | ||
diff --git a/net/ipv4/ipvs/ip_vs_lc.c b/net/ipv4/ipvs/ip_vs_lc.c index ebcdbf75ac65..2c3de1b63518 100644 --- a/net/ipv4/ipvs/ip_vs_lc.c +++ b/net/ipv4/ipvs/ip_vs_lc.c | |||
@@ -20,24 +20,6 @@ | |||
20 | #include <net/ip_vs.h> | 20 | #include <net/ip_vs.h> |
21 | 21 | ||
22 | 22 | ||
23 | static int ip_vs_lc_init_svc(struct ip_vs_service *svc) | ||
24 | { | ||
25 | return 0; | ||
26 | } | ||
27 | |||
28 | |||
29 | static int ip_vs_lc_done_svc(struct ip_vs_service *svc) | ||
30 | { | ||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | |||
35 | static int ip_vs_lc_update_svc(struct ip_vs_service *svc) | ||
36 | { | ||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | |||
41 | static inline unsigned int | 23 | static inline unsigned int |
42 | ip_vs_lc_dest_overhead(struct ip_vs_dest *dest) | 24 | ip_vs_lc_dest_overhead(struct ip_vs_dest *dest) |
43 | { | 25 | { |
@@ -99,9 +81,6 @@ static struct ip_vs_scheduler ip_vs_lc_scheduler = { | |||
99 | .refcnt = ATOMIC_INIT(0), | 81 | .refcnt = ATOMIC_INIT(0), |
100 | .module = THIS_MODULE, | 82 | .module = THIS_MODULE, |
101 | .n_list = LIST_HEAD_INIT(ip_vs_lc_scheduler.n_list), | 83 | .n_list = LIST_HEAD_INIT(ip_vs_lc_scheduler.n_list), |
102 | .init_service = ip_vs_lc_init_svc, | ||
103 | .done_service = ip_vs_lc_done_svc, | ||
104 | .update_service = ip_vs_lc_update_svc, | ||
105 | .schedule = ip_vs_lc_schedule, | 84 | .schedule = ip_vs_lc_schedule, |
106 | }; | 85 | }; |
107 | 86 | ||
diff --git a/net/ipv4/ipvs/ip_vs_nq.c b/net/ipv4/ipvs/ip_vs_nq.c index 92f3a6770031..5330d5a2de14 100644 --- a/net/ipv4/ipvs/ip_vs_nq.c +++ b/net/ipv4/ipvs/ip_vs_nq.c | |||
@@ -37,27 +37,6 @@ | |||
37 | #include <net/ip_vs.h> | 37 | #include <net/ip_vs.h> |
38 | 38 | ||
39 | 39 | ||
40 | static int | ||
41 | ip_vs_nq_init_svc(struct ip_vs_service *svc) | ||
42 | { | ||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | |||
47 | static int | ||
48 | ip_vs_nq_done_svc(struct ip_vs_service *svc) | ||
49 | { | ||
50 | return 0; | ||
51 | } | ||
52 | |||
53 | |||
54 | static int | ||
55 | ip_vs_nq_update_svc(struct ip_vs_service *svc) | ||
56 | { | ||
57 | return 0; | ||
58 | } | ||
59 | |||
60 | |||
61 | static inline unsigned int | 40 | static inline unsigned int |
62 | ip_vs_nq_dest_overhead(struct ip_vs_dest *dest) | 41 | ip_vs_nq_dest_overhead(struct ip_vs_dest *dest) |
63 | { | 42 | { |
@@ -137,9 +116,6 @@ static struct ip_vs_scheduler ip_vs_nq_scheduler = | |||
137 | .refcnt = ATOMIC_INIT(0), | 116 | .refcnt = ATOMIC_INIT(0), |
138 | .module = THIS_MODULE, | 117 | .module = THIS_MODULE, |
139 | .n_list = LIST_HEAD_INIT(ip_vs_nq_scheduler.n_list), | 118 | .n_list = LIST_HEAD_INIT(ip_vs_nq_scheduler.n_list), |
140 | .init_service = ip_vs_nq_init_svc, | ||
141 | .done_service = ip_vs_nq_done_svc, | ||
142 | .update_service = ip_vs_nq_update_svc, | ||
143 | .schedule = ip_vs_nq_schedule, | 119 | .schedule = ip_vs_nq_schedule, |
144 | }; | 120 | }; |
145 | 121 | ||
diff --git a/net/ipv4/ipvs/ip_vs_rr.c b/net/ipv4/ipvs/ip_vs_rr.c index 358110d17e59..f74929117534 100644 --- a/net/ipv4/ipvs/ip_vs_rr.c +++ b/net/ipv4/ipvs/ip_vs_rr.c | |||
@@ -32,12 +32,6 @@ static int ip_vs_rr_init_svc(struct ip_vs_service *svc) | |||
32 | } | 32 | } |
33 | 33 | ||
34 | 34 | ||
35 | static int ip_vs_rr_done_svc(struct ip_vs_service *svc) | ||
36 | { | ||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | |||
41 | static int ip_vs_rr_update_svc(struct ip_vs_service *svc) | 35 | static int ip_vs_rr_update_svc(struct ip_vs_service *svc) |
42 | { | 36 | { |
43 | svc->sched_data = &svc->destinations; | 37 | svc->sched_data = &svc->destinations; |
@@ -96,7 +90,6 @@ static struct ip_vs_scheduler ip_vs_rr_scheduler = { | |||
96 | .module = THIS_MODULE, | 90 | .module = THIS_MODULE, |
97 | .n_list = LIST_HEAD_INIT(ip_vs_rr_scheduler.n_list), | 91 | .n_list = LIST_HEAD_INIT(ip_vs_rr_scheduler.n_list), |
98 | .init_service = ip_vs_rr_init_svc, | 92 | .init_service = ip_vs_rr_init_svc, |
99 | .done_service = ip_vs_rr_done_svc, | ||
100 | .update_service = ip_vs_rr_update_svc, | 93 | .update_service = ip_vs_rr_update_svc, |
101 | .schedule = ip_vs_rr_schedule, | 94 | .schedule = ip_vs_rr_schedule, |
102 | }; | 95 | }; |
diff --git a/net/ipv4/ipvs/ip_vs_sed.c b/net/ipv4/ipvs/ip_vs_sed.c index 77663d84cbd1..53f73bea66ce 100644 --- a/net/ipv4/ipvs/ip_vs_sed.c +++ b/net/ipv4/ipvs/ip_vs_sed.c | |||
@@ -41,27 +41,6 @@ | |||
41 | #include <net/ip_vs.h> | 41 | #include <net/ip_vs.h> |
42 | 42 | ||
43 | 43 | ||
44 | static int | ||
45 | ip_vs_sed_init_svc(struct ip_vs_service *svc) | ||
46 | { | ||
47 | return 0; | ||
48 | } | ||
49 | |||
50 | |||
51 | static int | ||
52 | ip_vs_sed_done_svc(struct ip_vs_service *svc) | ||
53 | { | ||
54 | return 0; | ||
55 | } | ||
56 | |||
57 | |||
58 | static int | ||
59 | ip_vs_sed_update_svc(struct ip_vs_service *svc) | ||
60 | { | ||
61 | return 0; | ||
62 | } | ||
63 | |||
64 | |||
65 | static inline unsigned int | 44 | static inline unsigned int |
66 | ip_vs_sed_dest_overhead(struct ip_vs_dest *dest) | 45 | ip_vs_sed_dest_overhead(struct ip_vs_dest *dest) |
67 | { | 46 | { |
@@ -139,9 +118,6 @@ static struct ip_vs_scheduler ip_vs_sed_scheduler = | |||
139 | .refcnt = ATOMIC_INIT(0), | 118 | .refcnt = ATOMIC_INIT(0), |
140 | .module = THIS_MODULE, | 119 | .module = THIS_MODULE, |
141 | .n_list = LIST_HEAD_INIT(ip_vs_sed_scheduler.n_list), | 120 | .n_list = LIST_HEAD_INIT(ip_vs_sed_scheduler.n_list), |
142 | .init_service = ip_vs_sed_init_svc, | ||
143 | .done_service = ip_vs_sed_done_svc, | ||
144 | .update_service = ip_vs_sed_update_svc, | ||
145 | .schedule = ip_vs_sed_schedule, | 121 | .schedule = ip_vs_sed_schedule, |
146 | }; | 122 | }; |
147 | 123 | ||
diff --git a/net/ipv4/ipvs/ip_vs_wlc.c b/net/ipv4/ipvs/ip_vs_wlc.c index 9b0ef86bb1f7..df7ad8d74766 100644 --- a/net/ipv4/ipvs/ip_vs_wlc.c +++ b/net/ipv4/ipvs/ip_vs_wlc.c | |||
@@ -25,27 +25,6 @@ | |||
25 | #include <net/ip_vs.h> | 25 | #include <net/ip_vs.h> |
26 | 26 | ||
27 | 27 | ||
28 | static int | ||
29 | ip_vs_wlc_init_svc(struct ip_vs_service *svc) | ||
30 | { | ||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | |||
35 | static int | ||
36 | ip_vs_wlc_done_svc(struct ip_vs_service *svc) | ||
37 | { | ||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | |||
42 | static int | ||
43 | ip_vs_wlc_update_svc(struct ip_vs_service *svc) | ||
44 | { | ||
45 | return 0; | ||
46 | } | ||
47 | |||
48 | |||
49 | static inline unsigned int | 28 | static inline unsigned int |
50 | ip_vs_wlc_dest_overhead(struct ip_vs_dest *dest) | 29 | ip_vs_wlc_dest_overhead(struct ip_vs_dest *dest) |
51 | { | 30 | { |
@@ -127,9 +106,6 @@ static struct ip_vs_scheduler ip_vs_wlc_scheduler = | |||
127 | .refcnt = ATOMIC_INIT(0), | 106 | .refcnt = ATOMIC_INIT(0), |
128 | .module = THIS_MODULE, | 107 | .module = THIS_MODULE, |
129 | .n_list = LIST_HEAD_INIT(ip_vs_wlc_scheduler.n_list), | 108 | .n_list = LIST_HEAD_INIT(ip_vs_wlc_scheduler.n_list), |
130 | .init_service = ip_vs_wlc_init_svc, | ||
131 | .done_service = ip_vs_wlc_done_svc, | ||
132 | .update_service = ip_vs_wlc_update_svc, | ||
133 | .schedule = ip_vs_wlc_schedule, | 109 | .schedule = ip_vs_wlc_schedule, |
134 | }; | 110 | }; |
135 | 111 | ||