21 #define KMSG_COMPONENT "IPVS"
22 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
24 #include <linux/module.h>
25 #include <linux/kernel.h>
26 #include <linux/slab.h>
27 #include <linux/net.h>
68 int new_weight,
weight = 0;
72 if (new_weight > weight)
93 mark->
mw = ip_vs_wrr_max_weight(svc);
94 mark->
di = ip_vs_wrr_gcd_weight(svc);
117 mark->
mw = ip_vs_wrr_max_weight(svc);
118 mark->
di = ip_vs_wrr_gcd_weight(svc);
119 if (mark->
cw > mark->
mw)
135 IP_VS_DBG(6,
"%s(): Scheduling...\n", __func__);
147 if (mark->
cl == mark->
cl->next) {
150 "no destination available: "
151 "no destinations present");
157 mark->
cw -= mark->
di;
166 "no destination available");
172 mark->
cl = mark->
cl->next;
184 if (mark->
cl == p && mark->
cw == mark->
di) {
189 "no destination available: "
190 "all destinations are overloaded");
196 "activeconns %d refcnt %d weight %d\n",
213 .init_service = ip_vs_wrr_init_svc,
214 .done_service = ip_vs_wrr_done_svc,
215 .update_service = ip_vs_wrr_update_svc,
216 .schedule = ip_vs_wrr_schedule,
219 static int __init ip_vs_wrr_init(
void)
224 static void __exit ip_vs_wrr_cleanup(
void)