All of lore.kernel.org
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: anilkaushikwireless@gmail.com
Cc: mptcp@lists.linux.dev, kuba@kernel.org
Subject: Re: [PATCH mptcp-next v7 4/6] mptcp: pm: in-kernel: retry subflows closed after an error
Date: Wed, 21 Oct 2026 16:36:54 +0000	[thread overview]
Message-ID: <179260061448.3133.10825671379220141321@kernel.org> (raw)
In-Reply-To: <20261020031711.1896660-5-anilkaushikwireless@gmail.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The new paragraph in Documentation/networking/mptcp.rst (lines
  76-85) does not match what the code does in three ways.

--

mptcp: pm: in-kernel: retry subflows closed after an error

With the in-kernel PM, a subflow that TCP closes after a retransmission
or keepalive timeout is now re-created with the same addresses. The new
subflow's SYN retries are set from the subflow-retries limit. Subflows
reset by the peer or the path, never established, aborted locally, or
using a removed address are not retried.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/440

> diff --git a/Documentation/networking/mptcp.rst b/Documentation/networking/mptcp.rst
> index b6753ffb9c9a6..0f07d4a29b6b7 100644
> --- a/Documentation/networking/mptcp.rst
> +++ b/Documentation/networking/mptcp.rst
> @@ -73,6 +73,17 @@ To be able to use multiple IP addresses on a host to create multiple *subflows*
>  addresses can be used. This can be configured with ``ip mptcp endpoint`` for
>  example.
>  
> +When TCP gives up on an established subflow initiated by the in-kernel path
> +manager, after a retransmission or keepalive timeout, the path manager creates
> +it again, with the ``subflow-retries`` limit as its number of SYN retries, like
> +``TCP_SYNCNT``. A subflow reset by the peer, or by anything on the path, is not
> +created again. TCP only gives up on a subflow after ``tcp_retries2``

[Severity: Low]
Does this paragraph match what mptcp_pm_kernel_retry_check() and
mptcp_pm_kernel_retry() do? I see three differences.

First, the text says only subflows "initiated by the in-kernel path
manager" are re-created. The scope check in mptcp_pm_kernel_retry_check()
is:

net/mptcp/pm_kernel.c:mptcp_pm_kernel_retry_check() {
    ...
	/* Only re-create subflows initiated by this side: MP_JOIN ones, or the
	 * initial one on the client side.
	 */
	if (!subflow->request_join &&
	    (subflow->mp_join || READ_ONCE(msk->pm.server_side)))
		return false;
    ...
}

On the client side, the initial MP_CAPABLE subflow has request_join,
mp_join and server_side all at 0, so it passes this check and gets
re-created. That subflow came from the application's connect(), not
from the PM.

Second, re-creating the initial subflow takes one of the "subflows"
limit slots. mptcp_pm_kernel_retry() always does:

	if (allowed)
		msk->pm.extra_subflows++;

The original initial subflow never decremented that counter when it
closed, because mptcp_pm_subflow_check_next() only updates it when
request_join or mp_join is set.

So once the initial subflow is re-created, later endpoints or announced
addresses have one less slot. With a "subflows" limit of 0, the initial
subflow is never re-created at all.

Third, the re-creation only happens once. A re-created subflow that does
not connect within its SYN retries never becomes fully_established, so
this check stops it from being tried again:

	if (!READ_ONCE(subflow->fully_established))
		return false;

The commit message covers the second and third points ("Re-creating the
initial subflow uses one of the additional subflows allowed by the
limits" and "If this new subflow cannot connect, it is not retried
again"). Could mptcp.rst describe the scope correctly and mention these
two points as well?

> +retransmissions, about 15 minutes by default: shorter outages are handled by
> +TCP itself. A subflow that only receives data does not notice that its path
> +stopped working: the application should then enable TCP keepalive on the
> +MPTCP socket (``SO_KEEPALIVE``, ``TCP_KEEPIDLE``, ``TCP_KEEPINTVL`` and
> +``TCP_KEEPCNT``), which MPTCP applies to all its subflows.
> +

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261020031711.1896660-1-anilkaushikwireless%40gmail.com

  parent reply	other threads:[~2026-10-21 16:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20  3:17 [PATCH mptcp-next v7 0/6] mptcp: pm: in-kernel: retry subflows closed after an error Anil Kaushik
2026-10-20  3:17 ` [PATCH mptcp-next v7 1/6] selftests: mptcp: connect: retry write() on EAGAIN Anil Kaushik
2026-10-20  3:17 ` [PATCH mptcp-next v7 2/6] netlink: specs: mptcp: add the subflow-retries attribute Anil Kaushik
2026-10-20  3:17 ` [PATCH mptcp-next v7 3/6] mptcp: pm: in-kernel: add the subflow-retries limit Anil Kaushik
2026-10-20  3:17 ` [PATCH mptcp-next v7 4/6] mptcp: pm: in-kernel: retry subflows closed after an error Anil Kaushik
2026-10-20  8:37   ` sashiko-bot
2026-10-21 16:36   ` netdev-bot+sashiko [this message]
2026-10-20  3:17 ` [PATCH mptcp-next v7 5/6] selftests: mptcp: pm_nl_ctl: support the subflow-retries limit Anil Kaushik
2026-10-20  3:17 ` [PATCH mptcp-next v7 6/6] selftests: mptcp: join: validate subflow retry after link failure Anil Kaushik
2026-10-21 16:36   ` netdev-bot+sashiko
2026-10-21 12:44 ` [PATCH mptcp-next v7 0/6] mptcp: pm: in-kernel: retry subflows closed after an error MPTCP CI

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=179260061448.3133.10825671379220141321@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=anilkaushikwireless@gmail.com \
    --cc=kuba@kernel.org \
    --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.