diff options
author | Paolo Abeni <pabeni@redhat.com> | 2021-08-13 15:15:43 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-14 11:37:25 +0100 |
commit | 1e1d9d6f119c55c05e8ea78ed3e49046690abffd (patch) | |
tree | 07fc01f59aa4e5b1b69db83ad52002a8b655b0b3 /net/mptcp/options.c | |
parent | 71b7dec27f340c4ab90ef39ae096d8bb2e1c851c (diff) |
mptcp: handle pending data on closed subflow
The PM can close active subflow, e.g. due to ingress RM_ADDR
option. Such subflow could carry data still unacked at the
MPTCP-level, both in the write and the rtx_queue, which has
never reached the other peer.
Currently the mptcp-level retransmission will deliver such data,
but at a very low rate (at most 1 DSM for each MPTCP rtx interval).
We can speed-up the recovery a lot, moving all the unacked in the
tcp write_queue, so that it will be pushed again via other
subflows, at the speed allowed by them.
Also make available the new helper for later patches.
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/207
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/options.c')
-rw-r--r-- | net/mptcp/options.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 4452455aef7f..e37b6f2fb514 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -975,9 +975,11 @@ static void ack_update_msk(struct mptcp_sock *msk, old_snd_una = msk->snd_una; new_snd_una = mptcp_expand_seq(old_snd_una, mp_opt->data_ack, mp_opt->ack64); - /* ACK for data not even sent yet? Ignore. */ - if (after64(new_snd_una, snd_nxt)) - new_snd_una = old_snd_una; + /* ACK for data not even sent yet and even above recovery bound? Ignore.*/ + if (unlikely(after64(new_snd_una, snd_nxt))) { + if (!msk->recovery || after64(new_snd_una, msk->recovery_snd_nxt)) + new_snd_una = old_snd_una; + } new_wnd_end = new_snd_una + tcp_sk(ssk)->snd_wnd; |