diff options
author | Geliang Tang <geliang.tang@suse.com> | 2023-08-22 01:25:20 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-08-23 03:31:19 +0300 |
commit | ee2708aedad00544d38dba6df88efeb4a330bd66 (patch) | |
tree | 2663b5eed4c92051690da84dba5680e60141b652 /net/mptcp/sched.c | |
parent | 0fa1b3783a17d75a4aa1651a18ede041ffca5750 (diff) | |
download | linux-ee2708aedad00544d38dba6df88efeb4a330bd66.tar.xz |
mptcp: use get_retrans wrapper
This patch adds the multiple subflows support for __mptcp_retrans(). Use
get_retrans() wrapper instead of mptcp_subflow_get_retrans() in it.
Check the subflow scheduled flags to test which subflow or subflows are
picked by the scheduler, use them to send data.
Move msk_owned_by_me() and fallback checks into get_retrans() wrapper
from mptcp_subflow_get_retrans().
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <martineau@kernel.org>
Link: https://lore.kernel.org/r/20230821-upstream-net-next-20230818-v1-9-0c860fb256a8@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/sched.c')
-rw-r--r-- | net/mptcp/sched.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mptcp/sched.c b/net/mptcp/sched.c index 078b5d44978d..cac1cc1fa3b0 100644 --- a/net/mptcp/sched.c +++ b/net/mptcp/sched.c @@ -136,6 +136,12 @@ int mptcp_sched_get_retrans(struct mptcp_sock *msk) struct mptcp_subflow_context *subflow; struct mptcp_sched_data data; + msk_owned_by_me(msk); + + /* the following check is moved out of mptcp_subflow_get_retrans */ + if (__mptcp_check_fallback(msk)) + return -EINVAL; + mptcp_for_each_subflow(msk, subflow) { if (READ_ONCE(subflow->scheduled)) return 0; |