diff options
author | Paolo Abeni <pabeni@redhat.com> | 2020-09-14 10:01:18 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-14 13:28:02 -0700 |
commit | c76c6956566f974bac2470bd72fc22fb923e04a1 (patch) | |
tree | 42fe158385a63cb0a139c9afdd8982419ffdac0f /net/mptcp/protocol.c | |
parent | d5f49190def61c47b2faff170ba8fbc48bac4371 (diff) |
mptcp: call tcp_cleanup_rbuf on subflows
That is needed to let the subflows announce promptly when new
space is available in the receive buffer.
tcp_cleanup_rbuf() is currently a static function, drop the
scope modifier and add a declaration in the TCP header.
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/protocol.c')
-rw-r--r-- | net/mptcp/protocol.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index d7af96a900c4..ef0dd2f23482 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -515,6 +515,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); return done; } @@ -1424,10 +1426,14 @@ static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied) */ mptcp_for_each_subflow(msk, subflow) { struct sock *ssk; + bool slow; ssk = mptcp_subflow_tcp_sock(subflow); + slow = lock_sock_fast(ssk); WRITE_ONCE(ssk->sk_rcvbuf, rcvbuf); tcp_sk(ssk)->window_clamp = window_clamp; + tcp_cleanup_rbuf(ssk, 1); + unlock_sock_fast(ssk, slow); } } } |