From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Cc: Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-next v4 3/9] mptcp: pm: drop is_userspace in subflow_check_next
Date: Mon, 24 Mar 2025 12:01:58 +0100 [thread overview]
Message-ID: <8e777307-7991-40d5-b34d-183d774dfd9d@kernel.org> (raw)
In-Reply-To: <c7f5b4fe1579c47eae9d34ac8b5570bccf277f13.1742804266.git.tanggeliang@kylinos.cn>
Hi Geliang,
On 24/03/2025 09:19, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> This patch moves mptcp_pm_close_subflow() forward to let it be used by both
> the userspace PM and the in-kernel PM in mptcp_pm_subflow_check_next().Then
(space missing after the '.')
> mptcp_pm_is_userspace() here can be dropped.
>
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---
> net/mptcp/pm.c | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
> index e2b2c874a9f8..906c558aef0b 100644
> --- a/net/mptcp/pm.c
> +++ b/net/mptcp/pm.c
> @@ -562,22 +562,14 @@ void mptcp_pm_subflow_check_next(struct mptcp_sock *msk,
> bool update_subflows;
>
> update_subflows = subflow->request_join || subflow->mp_join;
> - if (mptcp_pm_is_userspace(msk)) {
> - if (update_subflows) {
> - spin_lock_bh(&pm->lock);
> - pm->subflows--;
> - spin_unlock_bh(&pm->lock);
> - }
> - return;
> - }
> + if (update_subflows)
> + mptcp_pm_close_subflow(msk);
>
> if (!pm->ops->subflow_established ||
> (!READ_ONCE(pm->work_pending) && !update_subflows))
I didn't check, but can we then not drop "!update_subflows" check here?
> return;
>
> spin_lock_bh(&pm->lock);
> - if (update_subflows)
> - __mptcp_pm_close_subflow(msk);
>
> /* Even if this subflow is not really established, tell the PM to try
> * to pick the next ones, if possible.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2025-03-24 11:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-24 8:19 [PATCH mptcp-next v4 0/9] BPF path manager, part 6 Geliang Tang
2025-03-24 8:19 ` [PATCH mptcp-next v4 1/9] Squash to "mptcp: pm: add get_local_id() interface" Geliang Tang
2025-03-24 9:27 ` Matthieu Baerts
2025-03-24 8:19 ` [PATCH mptcp-next v4 2/9] mptcp: pm: add established interfaces Geliang Tang
2025-03-24 11:01 ` Matthieu Baerts
2025-03-24 8:19 ` [PATCH mptcp-next v4 3/9] mptcp: pm: drop is_userspace in subflow_check_next Geliang Tang
2025-03-24 11:01 ` Matthieu Baerts [this message]
2025-03-24 8:19 ` [PATCH mptcp-next v4 4/9] mptcp: pm: drop redundant MPTCP_MIB_ADDADDRDROP Geliang Tang
2025-03-24 8:19 ` [PATCH mptcp-next v4 5/9] mptcp: pm: add add_addr_received() interface Geliang Tang
2025-03-24 11:02 ` Matthieu Baerts
2025-03-24 8:19 ` [PATCH mptcp-next v4 6/9] mptcp: pm: add rm_addr_received() interface Geliang Tang
2025-03-24 10:16 ` Geliang Tang
2025-03-24 11:02 ` Matthieu Baerts
2025-03-24 8:19 ` [PATCH mptcp-next v4 7/9] mptcp: pm: add add_addr_echo() interface Geliang Tang
2025-03-24 11:02 ` Matthieu Baerts
2025-03-24 8:19 ` [PATCH mptcp-next v4 8/9] mptcp: pm: add accept_new_subflow() interface Geliang Tang
2025-03-24 11:02 ` Matthieu Baerts
2025-03-24 8:19 ` [PATCH mptcp-next v4 9/9] mptcp: pm: add allow_new_subflow() interface Geliang Tang
2025-03-24 11:03 ` Matthieu Baerts
2025-03-24 9:28 ` [PATCH mptcp-next v4 0/9] BPF path manager, part 6 MPTCP CI
2025-03-24 10:59 ` 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=8e777307-7991-40d5-b34d-183d774dfd9d@kernel.org \
--to=matttbe@kernel.org \
--cc=geliang@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=tanggeliang@kylinos.cn \
/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.