Re: [PATCH mptcp-next v6 1/3] mptcp: pm: userspace: drop delete_local_addr helper

Geliang Tang <[email protected]> Wed, 29 Jul 2026 08:59:16 +0800
Newsgroups dev.linux.lists.mptcp
Message-ID <[email protected]>
Hi Matt,

On Mon, 2026-07-27 at 19:24 +0200, Matthieu Baerts wrote:
> Hi Geliang,
> 
> On 24/07/2026 20:48, Matthieu Baerts wrote:
> > Hi Geliang,
> > 
> > On 27/06/2026 00:45, Geliang Tang wrote:
> > > From: Geliang Tang <[email protected]>
> > > 
> > > Address entries should not be removed from local_addr_list when a
> > > subflow
> > > is deleted by the userspace PM, should only be removed when
> > > sending a
> > > REMOVE_ADDR.
> > > 
> > > So mptcp_userspace_pm_delete_local_addr() helper shouldn't be
> > > called in
> > > mptcp_pm_nl_subflow_create_doit() and
> > > mptcp_pm_nl_subflow_destroy_doit().
> > > 
> > > Since this helper is open-coding in mptcp_pm_nl_remove_doit(), it
> > > can be
> > > dropped now.
> > > 
> > > Address entries are removed from local_addr_list when sending a
> > > REMOVE_ADDR
> > > by the userspace PM, the local_addr_used counter of PM should
> > > also be
> > > decremented accordingly.
> > 
> > I was re-reviewing this series after having read the comments from
> > Sashiko:
> > 
> > https://sashiko.dev/#/patchset/[email protected]
> > 
> > I think the series is correct, but it feels like additional fixes
> > are
> > required:
> > 
> > - msk->pm.userspace_pm_local_addr_list doesn't contain an entry for
> > the
> > ID0 when initialised
> >   - That's probably fine, but then it means the ID0 case needs to
> > be
> > handled separately, like it is with the in-kernel PM.
> >   - Or maybe easier to add it when the userspace PM is used, to
> > avoid
> > all these exceptions?
> >     - If yes, then the remove_doit should no longer handle the ID0
> > differently as well.
> >     - same for announce_doit?
> >     - maybe better to do that to avoid all these exceptions?
> > 
> > - When creating a subflow with ID0, an entry can be added to the
> > list
> > (to be checked)
> >   - If the ID0 is not added at init time, then an exception should
> > be
> > added there
> >   - (also there is a check to avoid announcing ID0 → I think it is
> > valid
> > to re-announce the ID0 if this address is no longer used, an
> > exception
> > should be added there too, no?)
> > 
> > - each time the list is traversed, it doesn't take into account the
> > ID0
> > case:
> >   - If the ID0 is not added at init time, then an extra check
> > should be
> > added there
> > 
> > WDYT?
> > 
> > If yes, maybe this kind of patch can help? (not tested)
> > 
> >   https://github.com/matttbe/mptcp_net-next/commit/e03ee2728e98
> 
> I just sent this: WDYT?
> 
> https://lore.kernel.org/mptcp/20260727-mptcp-pm-userspace-id0-case-v1-0-9877f02a9bae@kernel.org/
> 
> Would it be compatible with your series?

Thank you for your patch. I will rebase my patch soon and review yours.

-Geliang

> 
> Cheers,
> Matt