From: no-reply@sashiko.virtuozzo.com
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>, khorenko@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v3 06/11] ms/mptcp: allow subflow rcv wnd to shrink
Date: Mon, 16 Nov 2026 20:56:41 +0000 [thread overview]
Message-ID: <010701a1e625d582-70e16b41-981c-4add-9fc7-e73a491167a3-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261116204557.718500-7-eva.kurchatova@virtuozzo.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mptcp: option builder clobbers tp->rcv_wnd, skewing zero-window
MIBs
--
commit 8f686f3528d02f3f50498a1afeae84f4871b89e3
Author: Paolo Abeni <pabeni@redhat.com>
ms/mptcp: allow subflow rcv wnd to shrink
This forces the TCP-level receive window of an MPTCP subflow to shrink, so the right edge advertised on the wire does not run ahead of the MPTCP-level window. It does this by resetting tp->rcv_wnd from the DSS option builder, before the TCP window is computed.
Link: https://patch.msgid.link/20260602-net-mptcp-misc-fixes-7-1-rc7-v2-4-856831229976@kernel.org
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index 51978cf24f23..51cb4ed3f7ce 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
[ ... ]
> @@ -621,6 +622,12 @@ static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb,
> if (dss_size == 0)
> ack_size += TCPOLEN_MPTCP_DSS_BASE;
>
> + /* The caller is __tcp_transmit_skb(), and will compute the new rcv
> + * wnd soon: ensure that the window can shrink.
> + */
> + if (skb)
> + tp->rcv_wnd = tp->rcv_nxt - tp->rcv_wup;
> +
> dss_size += ack_size;
>
> *size = ALIGN(dss_size, 4);
[Severity: Low]
Can this assignment skew the zero-window SNMP counters?
mptcp_established_options_dss() runs from tcp_established_options() in __tcp_transmit_skb(), before tcp_select_window(). tcp_select_window() starts with "u32 old_win = tp->rcv_wnd;", so old_win now holds the data received since the last window update rather than the previously advertised window.
old_win drives LINUX_MIB_TCPTOZEROWINDOWADV (if (old_win)) and LINUX_MIB_TCPFROMZEROWINDOWADV (else if (old_win == 0)). When rcv_nxt == rcv_wup, TCPFROMZEROWINDOWADV is bumped even though the advertised window is non-zero. A real transition to a zero window can be missed by TCPTOZEROWINDOWADV.
The !rcv_wscale path in __tcp_select_window() also reads tp->rcv_wnd and sees the modified value. The coupling is only safe because __tcp_transmit_skb() is the sole caller that passes a non-NULL skb, and the commit message does not mention it. Would it be cleaner to have the TCP core apply the shrink, or to preserve and restore the old value around tcp_select_window()?
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261116204557.718500-1-eva.kurchatova@virtuozzo.com?part=6
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-16 20:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 20:05 [Devel] [PATCH hci-8.1 v3 00/11] ms/mptcp: stability fixes Eva Kurchatova
2026-11-16 20:05 ` [Devel] [PATCH hci-8.1 v3 01/11] ms/mptcp: fix retransmission loop when csum is enabled Eva Kurchatova
2026-11-16 20:50 ` no-reply
2026-11-16 20:05 ` [Devel] [PATCH hci-8.1 v3 02/11] ms/mptcp: move the retrans loop to a separate helper Eva Kurchatova
2026-11-16 20:50 ` no-reply
2026-11-16 20:05 ` [Devel] [PATCH hci-8.1 v3 03/11] ms/mptcp: move the stale logic out of retrans scheduler Eva Kurchatova
2026-11-16 20:52 ` no-reply
2026-11-17 11:25 ` Konstantin Khorenko
2026-11-16 20:05 ` [Devel] [PATCH hci-8.1 v3 04/11] ms/mptcp: let the retrans scheduler do its job Eva Kurchatova
2026-11-16 20:55 ` no-reply
2026-11-16 20:05 ` [Devel] [PATCH hci-8.1 v3 05/11] ms/mptcp: close TOCTOU race while computing rcv_wnd Eva Kurchatova
2026-11-16 20:53 ` no-reply
2026-11-16 20:05 ` [Devel] [PATCH hci-8.1 v3 06/11] ms/mptcp: allow subflow rcv wnd to shrink Eva Kurchatova
2026-11-16 20:56 ` no-reply [this message]
2026-11-16 20:05 ` [Devel] [PATCH hci-8.1 v3 07/11] ms/mptcp: cleanup fallback dummy mapping generation Eva Kurchatova
2026-11-16 20:58 ` no-reply
2026-11-16 20:06 ` [Devel] [PATCH hci-8.1 v3 08/11] ms/mptcp: explicitly drop over memory limits Eva Kurchatova
2026-11-16 20:58 ` no-reply
2026-11-16 20:06 ` [Devel] [PATCH hci-8.1 v3 09/11] ms/mptcp: implemented OoO queue pruning Eva Kurchatova
2026-11-16 21:00 ` no-reply
2026-11-16 20:06 ` [Devel] [PATCH hci-8.1 v3 10/11] ms/mptcp: being below memory limit is a likely() condition Eva Kurchatova
2026-11-16 20:59 ` no-reply
2026-11-16 20:06 ` [Devel] [PATCH hci-8.1 v3 11/11] ms/mptcp: avoid pruning for OoW data Eva Kurchatova
2026-11-16 21:00 ` no-reply
2026-11-16 20:58 ` [Devel] [PATCH hci-8.1 v3 00/11] ms/mptcp: stability fixes Eva Kurchatova (Virtuozzo)
2026-11-17 11:25 ` Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=010701a1e625d582-70e16b41-981c-4add-9fc7-e73a491167a3-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=devel@openvz.org \
--cc=eva.kurchatova@virtuozzo.com \
--cc=khorenko@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.