@@ -177,7 +177,7 @@ static void mptcp_sched_data_set_contexts(const struct mptcp_sock *msk,
int mptcp_sched_get_send(struct mptcp_sock *msk)
{
struct mptcp_subflow_context *subflow;
- struct mptcp_sched_data *data = NULL;
+ struct mptcp_sched_data data;
msk_owned_by_me(msk);
@@ -198,15 +198,15 @@ int mptcp_sched_get_send(struct mptcp_sock *msk)
}
if (msk->sched == &mptcp_sched_default || !msk->sched)
- return mptcp_sched_default_get_send(msk, data);
- mptcp_sched_data_set_contexts(msk, data);
- return msk->sched->get_send(msk, data);
+ return mptcp_sched_default_get_send(msk, &data);
+ mptcp_sched_data_set_contexts(msk, &data);
+ return msk->sched->get_send(msk, &data);
}
int mptcp_sched_get_retrans(struct mptcp_sock *msk)
{
struct mptcp_subflow_context *subflow;
- struct mptcp_sched_data *data = NULL;
+ struct mptcp_sched_data data;
msk_owned_by_me(msk);
@@ -220,10 +220,10 @@ int mptcp_sched_get_retrans(struct mptcp_sock *msk)
}
if (msk->sched == &mptcp_sched_default || !msk->sched)
- return mptcp_sched_default_get_retrans(msk, data);
+ return mptcp_sched_default_get_retrans(msk, &data);
- mptcp_sched_data_set_contexts(msk, data);
+ mptcp_sched_data_set_contexts(msk, &data);
if (msk->sched->get_retrans)
- return msk->sched->get_retrans(msk, data);
- return msk->sched->get_send(msk, data);
+ return msk->sched->get_retrans(msk, &data);
+ return msk->sched->get_send(msk, &data);
}
"mptcp: add sched_data helpers" can be removed when "use bpf_iter in bpf schedulers" series will be applied. Same for the mptcp_sched_data structure. Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> --- net/mptcp/sched.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)