Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
mptcp: sched: avoid calling tcp_current_mss() twice
Browse files Browse the repository at this point in the history
We already have mss_now variable, better to re-use it.

Fixes: 15e8689 ("mptcp: correctly ensure to not overfill subflows")
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
(cherry picked from commit 1c4915d)
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
  • Loading branch information
matttbe committed Jul 1, 2021
1 parent 6095986 commit cd9deaa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/mptcp/mptcp_sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ static bool mptcp_is_temp_unavailable(struct sock *sk,
mss_now = tcp_current_mss(sk);

/* Not even a single spot in the cwnd */
if (mptcp_subflow_queued(sk, tcp_tso_segs(sk, tcp_current_mss(sk)))
>= tp->snd_cwnd)
if (mptcp_subflow_queued(sk, tcp_tso_segs(sk, mss_now)) >= tp->snd_cwnd)
return true;

if (zero_wnd_test && !before(tp->write_seq, tcp_wnd_end(tp)))
Expand Down

0 comments on commit cd9deaa

Please sign in to comment.