sst-linux/net/mptcp
Paolo Abeni 73411e09d0 mptcp: be sure to send ack when mptcp-level window re-opens
commit 2ca06a2f65310aeef30bb69b7405437a14766e4d upstream.

mptcp_cleanup_rbuf() is responsible to send acks when the user-space
reads enough data to update the receive windows significantly.

It tries hard to avoid acquiring the subflow sockets locks by checking
conditions similar to the ones implemented at the TCP level.

To avoid too much code duplication - the MPTCP protocol can't reuse the
TCP helpers as part of the relevant status is maintained into the msk
socket - and multiple costly window size computation, mptcp_cleanup_rbuf
uses a rough estimate for the most recently advertised window size:
the MPTCP receive free space, as recorded as at last-ack time.

Unfortunately the above does not allow mptcp_cleanup_rbuf() to detect
a zero to non-zero win change in some corner cases, skipping the
tcp_cleanup_rbuf call and leaving the peer stuck.

After commit ea66758c17 ("tcp: allow MPTCP to update the announced
window"), MPTCP has actually cheap access to the announced window value.
Use it in mptcp_cleanup_rbuf() for a more accurate ack generation.

Fixes: e3859603ba ("mptcp: better msk receive window updates")
Cc: stable@vger.kernel.org
Reported-by: Jakub Kicinski <kuba@kernel.org>
Closes: https://lore.kernel.org/20250107131845.5e5de3c5@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250113-net-mptcp-connect-st-flakes-v1-1-0d986ee7b1b6@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-23 17:17:13 +01:00
..
bpf.c
crypto_test.c
crypto.c
ctrl.c
diag.c mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size 2024-08-29 17:30:25 +02:00
Kconfig
Makefile
mib.c mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-22 15:56:51 +02:00
mib.h mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-22 15:56:51 +02:00
mptcp_diag.c
options.c mptcp: be sure to send ack when mptcp-level window re-opens 2025-01-23 17:17:13 +01:00
pm_netlink.c mptcp: pm: use _rcu variant under rcu_read_lock 2024-11-22 15:37:33 +01:00
pm_userspace.c mptcp: hold pm lock when deleting entry 2024-11-22 15:37:33 +01:00
pm.c mptcp: pr_debug: add missing \n at the end 2024-09-08 07:53:02 +02:00
protocol.c mptcp: don't always assume copied data in mptcp_cleanup_rbuf() 2025-01-09 13:30:07 +01:00
protocol.h mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-22 15:56:51 +02:00
sockopt.c mptcp: pr_debug: add missing \n at the end 2024-09-08 07:53:02 +02:00
subflow.c mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-22 15:56:51 +02:00
syncookies.c
token_test.c
token.c