]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mptcp: keep rcv_mwnd_seq in sync with subflow rcv_wnd
authorSimon Baatz <gmbnomis@gmail.com>
Mon, 9 Mar 2026 08:02:27 +0000 (09:02 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Mar 2026 15:01:49 +0000 (08:01 -0700)
MPTCP shares a receive window across subflows and applies it at the
subflow level by adjusting each subflow's rcv_wnd when needed.  With
the new TCP tracking of the maximum advertised window sequence,
rcv_mwnd_seq must stay consistent with these subflow-level rcv_wnd
adjustments.

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260309-tcp_rfc7323_retract_wnd_rfc-v3-2-4c7f96b1ec69@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/options.c

index 43df4293f58bfbd8a8df6bf24b9f15e0f9e238f6..8a1c5698983cff3082d68290626dd8f1e044527f 100644 (file)
@@ -1076,6 +1076,7 @@ static void rwin_update(struct mptcp_sock *msk, struct sock *ssk,
         * resync.
         */
        tp->rcv_wnd += mptcp_rcv_wnd - subflow->rcv_wnd_sent;
+       tcp_update_max_rcv_wnd_seq(tp);
        subflow->rcv_wnd_sent = mptcp_rcv_wnd;
 }
 
@@ -1338,8 +1339,9 @@ raise_win:
                 */
                rcv_wnd_new = rcv_wnd_old;
                win = rcv_wnd_old - ack_seq;
-               tp->rcv_wnd = min_t(u64, win, U32_MAX);
-               new_win = tp->rcv_wnd;
+               new_win = min_t(u64, win, U32_MAX);
+               tp->rcv_wnd = new_win;
+               tcp_update_max_rcv_wnd_seq(tp);
 
                /* Make sure we do not exceed the maximum possible
                 * scaled window.