]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: adjust mptcp receive buffer limit if subflow has larger one
authorFlorian Westphal <fw@strlen.de>
Tue, 3 Nov 2020 19:05:03 +0000 (11:05 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Nov 2020 01:45:52 +0000 (17:45 -0800)
commitff8d43f1045fcb838e32e0168068a77fc295d398
tree1dea0000c5820fe273d50acac65cabc72bfd464c
parent48b7802fc83f6a785659d83e41c3dd15e7920a44
mptcp: adjust mptcp receive buffer limit if subflow has larger one

In addition to tcp autotuning during read, it may also increase the
receive buffer in tcp_clamp_window().

In this case, mptcp should adjust its receive buffer size as well so
it can move all pending skbs from the subflow socket to the mptcp socket.

At this time, TCP can have more skbs ready for processing than what the
mptcp receive buffer size allows.

In the mptcp case, the receive window announced is based on the free
space of the mptcp parent socket instead of the individual subflows.

Following the subflow allows mptcp to grow its receive buffer.

This is especially noticeable for loopback traffic where two skbs are
enough to fill the initial receive window.

In mptcp_data_ready() we do not hold the mptcp socket lock, so modifying
mptcp_sk->sk_rcvbuf is racy.  Do it when moving skbs from subflow to
mptcp socket, both sockets are locked in this case.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.c