All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lin Lei <llleigoing@gmail.com>
To: MPTCP Linux <mptcp@lists.linux.dev>
Subject: [PATCH mptcp-net] mptcp: check app-limited status on subflow sends
Date: Fri,  4 Dec 2026 02:06:11 +0000	[thread overview]
Message-ID: <20261204020611.3657002-1-llleigoing@gmail.com> (raw)

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


             reply	other threads:[~2026-12-04  2:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  2:06 Lin Lei [this message]
2026-12-04  2:24 ` [PATCH mptcp-net] mptcp: check app-limited status on subflow sends 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

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=20261204020611.3657002-1-llleigoing@gmail.com \
    --to=llleigoing@gmail.com \
    --cc=mptcp@lists.linux.dev \
    /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.