Skip to content

Commit

Permalink
mptcp: schedule work for better snd subflow selection
Browse files Browse the repository at this point in the history
Otherwise the packet scheduler policy will not be
enforced when pushing pending data at MPTCP-level
ack reception time.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Paolo Abeni authored and jenkins-tessares committed Jan 14, 2021
1 parent e61bdd4 commit 89c6174
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2243,6 +2243,7 @@ static void mptcp_worker(struct work_struct *work)
if (unlikely(state == TCP_CLOSE))
goto unlock;

mptcp_push_pending(sk, 0);
mptcp_check_data_fin_ack(sk);
__mptcp_flush_join_list(msk);

Expand Down Expand Up @@ -2895,10 +2896,14 @@ void __mptcp_check_push(struct sock *sk, struct sock *ssk)
if (!mptcp_send_head(sk))
return;

if (!sock_owned_by_user(sk))
__mptcp_subflow_push_pending(sk, ssk);
else
if (!sock_owned_by_user(sk)) {
if (mptcp_subflow_get_send(mptcp_sk(sk)) == ssk)
__mptcp_subflow_push_pending(sk, ssk);
else
mptcp_schedule_work(sk);
} else {
set_bit(MPTCP_PUSH_PENDING, &mptcp_sk(sk)->flags);
}
}

#define MPTCP_DEFERRED_ALL (TCPF_WRITE_TIMER_DEFERRED)
Expand Down

0 comments on commit 89c6174

Please sign in to comment.