From: Paolo Abeni <pabeni@redhat.com>
To: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
MPTCP Linux <mptcp@lists.linux.dev>
Cc: Chenguang Zhao <chenguang.zhao@linux.dev>, gang.yan@linux.dev
Subject: Re: [PATCH mptcp-next RFC 3/3] mptcp: pm: kernel: skip operating on closing connections
Date: Mon, 17 Aug 2026 09:39:52 +0200 [thread overview]
Message-ID: <d1a6a67f-41c0-4650-b62e-6a4476bab86b@redhat.com> (raw)
In-Reply-To: <20260814-mptcp-reset-mpj-early-v1-3-3ca3260f9474@kernel.org>
On 8/14/26 8:31 PM, Matthieu Baerts (NGI0) wrote:
> When iterating over each MPTCP connection after having manipulated MPTCP
> endpoints, there is no need to operate on closing (or not ready)
> connections.
>
> We can then safely skip those.
>
> Note that mptcp_nl_add_subflow_or_signal_addr() was already checking the
> fully_established state, but it is better to check the connection state,
> which is what mptcp_is_fully_established() is doing.
>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> net/mptcp/pm_kernel.c | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/net/mptcp/pm_kernel.c b/net/mptcp/pm_kernel.c
> index d3014bf57bf3..c185e53fe42b 100644
> --- a/net/mptcp/pm_kernel.c
> +++ b/net/mptcp/pm_kernel.c
> @@ -969,7 +969,7 @@ static int mptcp_nl_add_subflow_or_signal_addr(struct net *net,
> struct sock *sk = (struct sock *)msk;
> struct mptcp_addr_info mpc_addr;
>
> - if (!READ_ONCE(msk->fully_established) ||
> + if (!mptcp_is_fully_established(sk) ||
> mptcp_pm_is_userspace(msk))
> goto next;
I'm a little double-minded here.
The add/removal operations are issued by the user space to update
subflows, as a consequence of endpoint addition/removal.
Possibly removing the subflow even for not fully established connections
could be the right thing to do, I'm not 110% sure either way. Possibly
worth to call this out with a comment?
Also the asymmetry with the user-space PM is a bit strange. I can't
recall why it was needed in the first place?!?
/P
next prev parent reply other threads:[~2026-08-17 7:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 18:31 [PATCH mptcp-next RFC 0/3] mptcp: reset fully_estab after fallback & reject MPJ earlier Matthieu Baerts (NGI0)
2026-08-14 18:31 ` [PATCH mptcp-next RFC 1/3] mptcp: no longer fully_established after a fallback Matthieu Baerts (NGI0)
2026-08-14 18:31 ` [PATCH mptcp-next RFC 2/3] mptcp: reject MP_JOIN earlier Matthieu Baerts (NGI0)
2026-08-14 18:40 ` sashiko-bot
2026-08-16 16:12 ` Matthieu Baerts
2026-08-16 16:13 ` Matthieu Baerts
2026-08-17 7:27 ` Paolo Abeni
2026-08-17 9:49 ` Matthieu Baerts
2026-08-17 13:03 ` Paolo Abeni
2026-08-14 18:31 ` [PATCH mptcp-next RFC 3/3] mptcp: pm: kernel: skip operating on closing connections Matthieu Baerts (NGI0)
2026-08-14 18:44 ` sashiko-bot
2026-08-17 7:39 ` Paolo Abeni [this message]
2026-08-17 11:07 ` Matthieu Baerts
2026-08-17 13:09 ` Paolo Abeni
2026-08-17 15:32 ` 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=d1a6a67f-41c0-4650-b62e-6a4476bab86b@redhat.com \
--to=pabeni@redhat.com \
--cc=chenguang.zhao@linux.dev \
--cc=gang.yan@linux.dev \
--cc=matttbe@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.