All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
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 v2 06/10] ms/mptcp: allow subflow rcv wnd to shrink
Date: Mon, 16 Nov 2026 04:02:01 +0000	[thread overview]
Message-ID: <010701a1e284e18b-d23166c5-200d-4dc4-a5c5-eef30e47a53a-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261116035204.564416-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
  MIB counters
--

commit 742bf9afd917e0f6220a2af28f73dd7a4e8d66d5
Author: Paolo Abeni <pabeni@redhat.com>

ms/mptcp: allow subflow rcv wnd to shrink

When the subflow sends a DSS ACK, mptcp_established_options_dss() now resets tp->rcv_wnd to rcv_nxt - rcv_wup. This lets the TCP-level receive window shrink even when the netns setting would not allow it.

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;

[Severity: Low]
Does overwriting tp->rcv_wnd here skew the zero-window MIB counters?

tcp_select_window() runs after this and does "u32 old_win = tp->rcv_wnd".
So old_win is now the amount of data received since the last window update, not the previously advertised window. When rcv_nxt == rcv_wup, old_win is 0.

tcp_select_window() uses old_win for LINUX_MIB_TCPTOZEROWINDOWADV and LINUX_MIB_TCPFROMZEROWINDOWADV. In that case TCPFROMZEROWINDOWADV can be incremented spuriously on any ACK that advertises a non-zero window. A real transition to a zero window can be missed by TCPTOZEROWINDOWADV, because the "if (old_win)" test fails.

The window on the wire is not affected, only the SNMP counters. The commit message does not mention this side effect. Could the real old_win be saved, or passed to tcp_select_window() through an MPTCP hook, so the counters stay accurate?

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261116035204.564416-1-eva.kurchatova@virtuozzo.com?part=6

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-11-16  4:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  3:49 [Devel] [PATCH hci-8.1 v2 00/10] ms/mptcp: stability fixes Eva Kurchatova
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 01/10] ms/mptcp: fix retransmission loop when csum is enabled Eva Kurchatova
2026-11-16  3:58   ` no-reply
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 02/10] ms/mptcp: move the retrans loop to a separate helper Eva Kurchatova
2026-11-16  3:55   ` no-reply
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 03/10] ms/mptcp: move the stale logic out of retrans scheduler Eva Kurchatova
2026-11-16  3:56   ` no-reply
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 04/10] ms/mptcp: let the retrans scheduler do its job Eva Kurchatova
2026-11-16  3:59   ` no-reply
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 05/10] ms/mptcp: close TOCTOU race while computing rcv_wnd Eva Kurchatova
2026-11-16  3:59   ` no-reply
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 06/10] ms/mptcp: allow subflow rcv wnd to shrink Eva Kurchatova
2026-11-16  4:02   ` no-reply [this message]
2026-11-16 17:09   ` Konstantin Khorenko
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 07/10] ms/mptcp: explicitly drop over memory limits Eva Kurchatova
2026-11-16  4:03   ` no-reply
2026-11-16 17:09   ` Konstantin Khorenko
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 08/10] ms/mptcp: implemented OoO queue pruning Eva Kurchatova
2026-11-16  4:04   ` no-reply
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 09/10] ms/mptcp: being below memory limit is a likely() condition Eva Kurchatova
2026-11-16  4:03   ` no-reply
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 10/10] ms/mptcp: avoid pruning for OoW data Eva Kurchatova
2026-11-16  4:04   ` no-reply
2026-11-16 17:09 ` [Devel] [PATCH hci-8.1 v2 00/10] ms/mptcp: stability fixes 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=010701a1e284e18b-d23166c5-200d-4dc4-a5c5-eef30e47a53a-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.