diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2020-12-17 21:25:10 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2020-12-17 21:25:10 +0300 |
| commit | 86eb09b63da419a7261d7dc96e60fdb0e56e341d (patch) | |
| tree | a9b0f58d59f988a5b21653f7cc648fd99043251b /net/mptcp/options.c | |
| parent | 49e27134f6e9ebcd08c04a98ab7f0574b5a81a35 (diff) | |
| parent | 13e1603739e58e94e7a3c24191fa2dcd1a8a5df3 (diff) | |
| download | linux-86eb09b63da419a7261d7dc96e60fdb0e56e341d.tar.xz | |
Merge branch 'mptcp-a-bunch-of-assorted-fixes'
Paolo Abeni says:
====================
mptcp: a bunch of assorted fixes
This series pulls a few fixes for the MPTCP datapath.
Most issues addressed here has been recently introduced
with the recent reworks, with the notable exception of
the first patch, which addresses an issue present since
the early days
====================
Link: https://lore.kernel.org/r/cover.1608114076.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/options.c')
| -rw-r--r-- | net/mptcp/options.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/net/mptcp/options.c b/net/mptcp/options.c index e8a1adf299d8..e0d21c0607e5 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -875,10 +875,13 @@ static void ack_update_msk(struct mptcp_sock *msk, new_wnd_end = new_snd_una + tcp_sk(ssk)->snd_wnd; - if (after64(new_wnd_end, msk->wnd_end)) { + if (after64(new_wnd_end, msk->wnd_end)) msk->wnd_end = new_wnd_end; - __mptcp_wnd_updated(sk, ssk); - } + + /* this assumes mptcp_incoming_options() is invoked after tcp_ack() */ + if (after64(msk->wnd_end, READ_ONCE(msk->snd_nxt)) && + sk_stream_memory_free(ssk)) + __mptcp_check_push(sk, ssk); if (after64(new_snd_una, old_snd_una)) { msk->snd_una = new_snd_una; @@ -944,8 +947,8 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb) * helpers are cheap. */ mptcp_data_lock(subflow->conn); - if (mptcp_send_head(subflow->conn)) - __mptcp_wnd_updated(subflow->conn, sk); + if (sk_stream_memory_free(sk)) + __mptcp_check_push(subflow->conn, sk); __mptcp_data_acked(subflow->conn); mptcp_data_unlock(subflow->conn); return; |
