diff options
author | Geliang Tang <geliang.tang@suse.com> | 2022-04-22 23:55:38 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-04-23 12:51:05 +0200 |
commit | 0530020a7c8f2204e784f0dbdc882bbd961fdbde (patch) | |
tree | f088470f6e47e123b4c12de18ff5caf843bedf4a /net/mptcp/protocol.c | |
parent | mptcp: add the fallback check (diff) | |
download | linux-0530020a7c8f2204e784f0dbdc882bbd961fdbde.tar.xz linux-0530020a7c8f2204e784f0dbdc882bbd961fdbde.zip |
mptcp: track and update contiguous data status
This patch adds a new member allow_infinite_fallback in mptcp_sock,
which is initialized to 'true' when the connection begins and is set
to 'false' on any retransmit or successful MP_JOIN. Only do infinite
mapping fallback if there is a single subflow AND there have been no
retransmissions AND there have never been any MP_JOINs.
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.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/protocol.c')
-rw-r--r-- | net/mptcp/protocol.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 0492aa9308c7..6d653914e9fe 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2465,6 +2465,7 @@ static void __mptcp_retrans(struct sock *sk) dfrag->already_sent = max(dfrag->already_sent, info.sent); tcp_push(ssk, 0, info.mss_now, tcp_sk(ssk)->nonagle, info.size_goal); + WRITE_ONCE(msk->allow_infinite_fallback, false); } release_sock(ssk); @@ -2539,6 +2540,7 @@ static int __mptcp_init_sock(struct sock *sk) msk->first = NULL; inet_csk(sk)->icsk_sync_mss = mptcp_sync_mss; WRITE_ONCE(msk->csum_enabled, mptcp_is_checksum_enabled(sock_net(sk))); + WRITE_ONCE(msk->allow_infinite_fallback, true); msk->recovery = false; mptcp_pm_data_init(msk); @@ -3275,6 +3277,7 @@ err_prohibited: } subflow->map_seq = READ_ONCE(msk->ack_seq); + WRITE_ONCE(msk->allow_infinite_fallback, false); out: mptcp_event(MPTCP_EVENT_SUB_ESTABLISHED, msk, ssk, GFP_ATOMIC); |