aboutsummaryrefslogtreecommitdiff
path: root/net/mptcp/sched.c
diff options
context:
space:
mode:
authorGeliang Tang <[email protected]>2023-08-21 15:25:20 -0700
committerJakub Kicinski <[email protected]>2023-08-22 17:31:19 -0700
commitee2708aedad00544d38dba6df88efeb4a330bd66 (patch)
tree2663b5eed4c92051690da84dba5680e60141b652 /net/mptcp/sched.c
parent0fa1b3783a17d75a4aa1651a18ede041ffca5750 (diff)
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 <[email protected]> Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/mptcp/sched.c')
-rw-r--r--net/mptcp/sched.c6
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;