/* Must be called with rcu read lock held */ struct mptcp_sched_ops *mptcp_sched_find(constchar *name)
{ struct mptcp_sched_ops *sched, *ret = NULL;
list_for_each_entry_rcu(sched, &mptcp_sched_list, list) { if (!strcmp(sched->name, name)) {
ret = sched; break;
}
}
return ret;
}
/* Build string with list of available scheduler values. * Similar to tcp_get_available_congestion_control()
*/ void mptcp_get_available_schedulers(char *buf, size_t maxlen)
{ struct mptcp_sched_ops *sched;
size_t offs = 0;
if (WARN_ON_ONCE(offs >= maxlen)) break;
}
rcu_read_unlock();
}
int mptcp_validate_scheduler(struct mptcp_sched_ops *sched)
{ if (!sched->get_send) {
pr_err("%s does not implement required ops\n", sched->name); return -EINVAL;
}
return 0;
}
int mptcp_register_scheduler(struct mptcp_sched_ops *sched)
{ int ret;
ret = mptcp_validate_scheduler(sched); if (ret) return ret;
int mptcp_sched_get_send(struct mptcp_sock *msk)
{ struct mptcp_subflow_context *subflow;
msk_owned_by_me(msk);
/* the following check is moved out of mptcp_subflow_get_send */ if (__mptcp_check_fallback(msk)) { if (msk->first &&
__tcp_can_send(msk->first) &&
sk_stream_memory_free(msk->first)) {
mptcp_subflow_set_scheduled(mptcp_subflow_ctx(msk->first), true); return 0;
} return -EINVAL;
}
mptcp_for_each_subflow(msk, subflow) { if (READ_ONCE(subflow->scheduled)) return 0;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.