Lines Matching refs:sched
42 struct mptcp_sched_ops *sched, *ret = NULL; in mptcp_sched_find() local
44 list_for_each_entry_rcu(sched, &mptcp_sched_list, list) { in mptcp_sched_find()
45 if (!strcmp(sched->name, name)) { in mptcp_sched_find()
46 ret = sched; in mptcp_sched_find()
54 int mptcp_register_scheduler(struct mptcp_sched_ops *sched) in mptcp_register_scheduler() argument
56 if (!sched->get_subflow) in mptcp_register_scheduler()
60 if (mptcp_sched_find(sched->name)) { in mptcp_register_scheduler()
64 list_add_tail_rcu(&sched->list, &mptcp_sched_list); in mptcp_register_scheduler()
67 pr_debug("%s registered\n", sched->name); in mptcp_register_scheduler()
71 void mptcp_unregister_scheduler(struct mptcp_sched_ops *sched) in mptcp_unregister_scheduler() argument
73 if (sched == &mptcp_sched_default) in mptcp_unregister_scheduler()
77 list_del_rcu(&sched->list); in mptcp_unregister_scheduler()
87 struct mptcp_sched_ops *sched) in mptcp_init_sched() argument
89 if (!sched) in mptcp_init_sched()
90 sched = &mptcp_sched_default; in mptcp_init_sched()
92 if (!bpf_try_module_get(sched, sched->owner)) in mptcp_init_sched()
95 msk->sched = sched; in mptcp_init_sched()
96 if (msk->sched->init) in mptcp_init_sched()
97 msk->sched->init(msk); in mptcp_init_sched()
99 pr_debug("sched=%s\n", msk->sched->name); in mptcp_init_sched()
106 struct mptcp_sched_ops *sched = msk->sched; in mptcp_release_sched() local
108 if (!sched) in mptcp_release_sched()
111 msk->sched = NULL; in mptcp_release_sched()
112 if (sched->release) in mptcp_release_sched()
113 sched->release(msk); in mptcp_release_sched()
115 bpf_module_put(sched, sched->owner); in mptcp_release_sched()
148 if (msk->sched == &mptcp_sched_default || !msk->sched) in mptcp_sched_get_send()
150 return msk->sched->get_subflow(msk, &data); in mptcp_sched_get_send()
170 if (msk->sched == &mptcp_sched_default || !msk->sched) in mptcp_sched_get_retrans()
172 return msk->sched->get_subflow(msk, &data); in mptcp_sched_get_retrans()