All of lore.kernel.org
 help / color / mirror / Atom feed
From: gang.yan@linux.dev
To: "Lin Lei" <llleigoing@gmail.com>, "MPTCP Linux" <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-net] mptcp: check app-limited status on subflow sends
Date: Fri, 04 Dec 2026 09:08:29 +0000	[thread overview]
Message-ID: <a4fd047804d037db1e66bd4c3931e7e5f73db453@linux.dev> (raw)
In-Reply-To: <20261204020611.3657002-1-llleigoing@gmail.com>

December 4, 2026 at 10:06 AM, "Lin Lei" <llleigoing@gmail.com mailto:llleigoing@gmail.com?to=%22Lin%20Lei%22%20%3Cllleigoing%40gmail.com%3E > wrote:


> 
> 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(+)
> 
Hi Lin,

Thanks for the patch.

It seems to address the same issue like a recent patch from Geliang [1]. Right?

If so, could you plase test your scenario based on Geliang's patch, share your
test results on that thread, and add your Tested-by tag if it works for you. If not, please feel free to leave a message here, and sorry for the noise!

[1] https://lore.kernel.org/mptcp/4fc318fc6b3764ff8ff0547f7a9d69ff707fa3b1.1796308130.git.geliang@kernel.org/

Best regards,
Gang

> 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
>

  parent reply	other threads:[~2026-12-04  9:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=a4fd047804d037db1e66bd4c3931e7e5f73db453@linux.dev \
    --to=gang.yan@linux.dev \
    --cc=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.