Lines Matching refs:scheduler
44 struct ip_vs_scheduler *scheduler) in ip_vs_bind_scheduler() argument
52 if (scheduler == NULL) { in ip_vs_bind_scheduler()
57 svc->scheduler = scheduler; in ip_vs_bind_scheduler()
59 if (scheduler->init_service) { in ip_vs_bind_scheduler()
60 ret = scheduler->init_service(svc); in ip_vs_bind_scheduler()
83 sched = svc->scheduler; in ip_vs_unbind_scheduler()
96 svc->scheduler = NULL; in ip_vs_unbind_scheduler()
167 void ip_vs_scheduler_put(struct ip_vs_scheduler *scheduler) in ip_vs_scheduler_put() argument
169 if (scheduler->module) in ip_vs_scheduler_put()
170 __MOD_DEC_USE_COUNT(scheduler->module); in ip_vs_scheduler_put()
177 int register_ip_vs_scheduler(struct ip_vs_scheduler *scheduler) in register_ip_vs_scheduler() argument
181 if (!scheduler) { in register_ip_vs_scheduler()
186 if (!scheduler->name) { in register_ip_vs_scheduler()
197 sched = ip_vs_sched_getbyname(scheduler->name); in register_ip_vs_scheduler()
202 "already existed in the system\n", scheduler->name); in register_ip_vs_scheduler()
208 if (scheduler->n_list.next != &scheduler->n_list) { in register_ip_vs_scheduler()
212 "already linked\n", scheduler->name); in register_ip_vs_scheduler()
219 list_add(&scheduler->n_list, &ip_vs_schedulers); in register_ip_vs_scheduler()
222 IP_VS_INFO("[%s] scheduler registered.\n", scheduler->name); in register_ip_vs_scheduler()
231 int unregister_ip_vs_scheduler(struct ip_vs_scheduler *scheduler) in unregister_ip_vs_scheduler() argument
233 if (!scheduler) { in unregister_ip_vs_scheduler()
239 if (scheduler->n_list.next == &scheduler->n_list) { in unregister_ip_vs_scheduler()
242 "is not in the list. failed\n", scheduler->name); in unregister_ip_vs_scheduler()
249 list_del(&scheduler->n_list); in unregister_ip_vs_scheduler()
254 IP_VS_INFO("[%s] scheduler unregistered.\n", scheduler->name); in unregister_ip_vs_scheduler()