Skip to content

Commit

Permalink
mptcp: don't skip needed ack
Browse files Browse the repository at this point in the history
Currently we skip calling tcp_cleanup_rbuf() when packets
are moved into the OoO queue or simply dropped. In both
cases we still increment tp->copied_seq, and we should
ask the TCP stack to check for ack.

Fixes: c76c695 ("mptcp: call tcp_cleanup_rbuf on subflows")
Signed-off-by: Paolo Abeni <[email protected]>
Reviewed-by: Mat Martineau <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Paolo Abeni authored and davem330 committed Oct 6, 2020
1 parent 8b0308f commit 717f203
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,12 @@ static bool __mptcp_move_skbs_from_subflow(struct mptcp_sock *msk,
unsigned int moved = 0;
bool more_data_avail;
struct tcp_sock *tp;
u32 old_copied_seq;
bool done = false;

pr_debug("msk=%p ssk=%p", msk, ssk);
tp = tcp_sk(ssk);
old_copied_seq = tp->copied_seq;
do {
u32 map_remaining, offset;
u32 seq = tp->copied_seq;
Expand Down Expand Up @@ -516,8 +518,8 @@ static bool __mptcp_move_skbs_from_subflow(struct mptcp_sock *msk,
} while (more_data_avail);

*bytes += moved;
if (moved)
tcp_cleanup_rbuf(ssk, moved);
if (tp->copied_seq != old_copied_seq)
tcp_cleanup_rbuf(ssk, 1);

return done;
}
Expand Down

0 comments on commit 717f203

Please sign in to comment.