All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-net] mptcp: check app-limited status on subflow sends
@ 2026-12-04  2:06 Lin Lei
  2026-12-04  2:24 ` sashiko-bot
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lin Lei @ 2026-12-04  2:06 UTC (permalink / raw)
  To: MPTCP Linux

mptcp_sendmsg_frag() appends payload directly to TCP subflow skbs,
bypassing the tcp_rate_check_app_limited() call in tcp_sendmsg_locked().
Once the initial tp->app_limited (~0U) mark from tcp_init_sock() clears
after the first acknowledged data segment, a subflow that runs out of
data to send can produce unmarked delivery-rate samples
(rs->is_app_limited == false) on subsequent writes.

Unmarked samples from underfilled flights can overwrite the saved
TCP_INFO delivery rate (clearing tcpi_delivery_rate_app_limited), count
toward BBR's full-bandwidth test in STARTUP, or pull down BBR's
windowed max-bandwidth filter. Commit 6d0060f600ad ("mptcp: Write MPTCP
DSS headers to outgoing data packets") introduced this omission when
switching mptcp_sendmsg() from sock_sendmsg() on the subflow to
mptcp_sendmsg_frag() and do_tcp_sendpages(), below tcp_sendmsg_locked()
and tcp_sendpage_locked().

Call tcp_rate_check_app_limited(ssk) in mptcp_sendmsg_frag() once
payload bytes are scheduled and before appending payload to the subflow
skb and advancing tp->write_seq. This covers tail-skb appends, newly
allocated skbs, zero-window probes, and data reinjected onto a subflow,
while skipping early no-op or error returns.

We hit this while testing MPTCP with BBR under periodic small writes: on
a 100 Mbit/s, 4 ms RTT veth link, 25 writes of 200 bytes spaced 20 ms
apart after a 2 MiB transfer reduced the subflow's BBR bandwidth
estimate from ~96 Mbit/s to ~2.7 Mbit/s. With this check, the subflow
marks sparse sends app-limited and retains the ~96 Mbit/s estimate,
matching plain TCP.

Fixes: 6d0060f600ad ("mptcp: Write MPTCP DSS headers to outgoing data packets")
Signed-off-by: Lin Lei <llleigoing@gmail.com>
---
 net/mptcp/protocol.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 550e7aed42a8..f3950d55c3b3 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1536,6 +1536,8 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
 	}
 	copy = avail;
 
+	tcp_rate_check_app_limited(ssk);
+
 	if (can_coalesce) {
 		skb_frag_size_add(&skb_shinfo(skb)->frags[i - 1], copy);
 	} else {

base-commit: 9442ea6c3dc61f5d85d5062eb31a5437c260eba6
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-12-04 17:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04  2:06 [PATCH mptcp-net] mptcp: check app-limited status on subflow sends Lin Lei
2026-12-04  2:24 ` sashiko-bot
2026-12-04  3:27 ` MPTCP CI
2026-12-04  9:08 ` gang.yan
2026-12-04 10:43   ` Lin Lei
2026-12-04 11:12     ` Matthieu Baerts
2026-12-04 17:55       ` Matthieu Baerts

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.