Re: [PATCH mptcp-next v3 3/4] mptcp: sched: do not penalise when receive-window-limited

[email protected]
Newsgroups dev.linux.lists.mptcp
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The `mptcp_snd_wnd_test()` heuristic incorrectly disables the slow-subflow penalty for standard bulk transfers by equating application queue depth with receive-window limitation.
--

--- Patch [3]: [PATCH mptcp-next v3 3/4] mptcp: sched: do not penalise when receive-window-limited ---
commit 97d5176c170e6dd87e10d2ec2eefd7e6a38340c4
Author: Shardul Bankar <[email protected]>

mptcp: sched: do not penalise when receive-window-limited

This commit disables the slow-subflow cwnd penalty when the connection
is receive-window limited. It introduces mptcp_snd_wnd_test to skip the
penalty if the application has queued past the window edge.

> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -1635,6 +1635,14 @@ static bool mptcp_penalise_throttle_ok(struct mptcp_subflow_context *subflow)
>  	return tcp_jiffies32 - subflow->last_penalise >= max_t(u32, rtt, 1);
>  }
>  
> +/* Like tcp_snd_wnd_test() but without an skb: true while queued data still fits
> + * the send window, i.e. not receive-window-limited.
> + */
> +static bool mptcp_snd_wnd_test(const struct mptcp_sock *msk)
> +{
> +	return !after64(msk->write_seq, mptcp_wnd_end(msk));

[Severity: High]
During a standard bulk data transfer, the application typically pushes data
into the socket buffer up to sk_sndbuf, which is often much larger than the
peer's advertised receive window.

Because of this, won't msk->write_seq naturally exceed mptcp_wnd_end(msk),
causing this test to return false even when the network is bottlenecked by
a small congestion window rather than the receive window?

If this evaluates to false during bulk transfers, doesn't it unconditionally
disable the slow-subflow penalty and prevent the intended shift of load to
faster subflows?

> +}
> +
>  /* Halve cwnd (and ssthresh if past it) under the subflow socket lock. */
>  static void mptcp_penalise_cwnd(struct sock *ssk)

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260817-mptcp_penalise_send_v2-v3-0-e6a2ad2f1b82@mpiricsoftware.com?part=3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.