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 <[email protected]> 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-856831229...@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/[email protected]?part=6 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
