Netdev List
 help / color / mirror / Atom feed
* [PATCH 5.10] mptcp: pm: kernel: flush: do not reset ADD_ADDR limit
@ 2025-09-10  9:28 Heyne, Maximilian
  2025-09-10  9:55 ` Matthieu Baerts
  2025-09-10 12:33 ` Oliver Hartkopp
  0 siblings, 2 replies; 4+ messages in thread
From: Heyne, Maximilian @ 2025-09-10  9:28 UTC (permalink / raw)
  Cc: Heyne, Maximilian, Matthieu Baerts (NGI0), stable@vger.kernel.org,
	Thomas Dreibholz, Mat Martineau, Jakub Kicinski, Mat Martineau,
	Matthieu Baerts, David S. Miller, Paolo Abeni,
	netdev@vger.kernel.org, mptcp@lists.01.org,
	linux-kernel@vger.kernel.org

From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>

commit 68fc0f4b0d25692940cdc85c68e366cae63e1757 upstream.

A flush of the MPTCP endpoints should not affect the MPTCP limits. In
other words, 'ip mptcp endpoint flush' should not change 'ip mptcp
limits'.

But it was the case: the MPTCP_PM_ATTR_RCV_ADD_ADDRS (add_addr_accepted)
limit was reset by accident. Removing the reset of this counter during a
flush fixes this issue.

Fixes: 01cacb00b35c ("mptcp: add netlink-based PM")
Cc: stable@vger.kernel.org
Reported-by: Thomas Dreibholz <dreibh@simula.no>
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/579
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250815-net-mptcp-misc-fixes-6-17-rc2-v1-2-521fe9957892@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[adjusted patch by removing WRITE_ONCE to take into account the missing
 commit 72603d207d59 ("mptcp: use WRITE_ONCE for the pernet *_max")]
Signed-off-by: Maximilian Heyne <mheyne@amazon.de>
---
For some reason only the corresponding selftest patch was backported and
it's now failing on 5.10 kernels. I tested that with this patch the
selftest is succeeding again.
---
 net/mptcp/pm_netlink.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index 32379fc706cac..c31a1dc69f835 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -869,7 +869,6 @@ static void __flush_addrs(struct pm_nl_pernet *pernet)
 static void __reset_counters(struct pm_nl_pernet *pernet)
 {
 	pernet->add_addr_signal_max = 0;
-	pernet->add_addr_accept_max = 0;
 	pernet->local_addr_max = 0;
 	pernet->addrs = 0;
 }
-- 
2.47.3




Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 5.10] mptcp: pm: kernel: flush: do not reset ADD_ADDR limit
  2025-09-10  9:28 [PATCH 5.10] mptcp: pm: kernel: flush: do not reset ADD_ADDR limit Heyne, Maximilian
@ 2025-09-10  9:55 ` Matthieu Baerts
  2025-09-10 12:33 ` Oliver Hartkopp
  1 sibling, 0 replies; 4+ messages in thread
From: Matthieu Baerts @ 2025-09-10  9:55 UTC (permalink / raw)
  To: Heyne, Maximilian
  Cc: stable@vger.kernel.org, Thomas Dreibholz, Mat Martineau,
	Jakub Kicinski, Mat Martineau, Matthieu Baerts, David S. Miller,
	Paolo Abeni, netdev@vger.kernel.org, mptcp@lists.01.org,
	linux-kernel@vger.kernel.org

Hi Maximilian,

On 10/09/2025 11:28, Heyne, Maximilian wrote:
> From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
> 
> commit 68fc0f4b0d25692940cdc85c68e366cae63e1757 upstream.
> 
> A flush of the MPTCP endpoints should not affect the MPTCP limits. In
> other words, 'ip mptcp endpoint flush' should not change 'ip mptcp
> limits'.
> 
> But it was the case: the MPTCP_PM_ATTR_RCV_ADD_ADDRS (add_addr_accepted)
> limit was reset by accident. Removing the reset of this counter during a
> flush fixes this issue.
> 
> Fixes: 01cacb00b35c ("mptcp: add netlink-based PM")
> Cc: stable@vger.kernel.org
> Reported-by: Thomas Dreibholz <dreibh@simula.no>
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/579
> Reviewed-by: Mat Martineau <martineau@kernel.org>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> Link: https://patch.msgid.link/20250815-net-mptcp-misc-fixes-6-17-rc2-v1-2-521fe9957892@kernel.org
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> [adjusted patch by removing WRITE_ONCE to take into account the missing
>  commit 72603d207d59 ("mptcp: use WRITE_ONCE for the pernet *_max")]
> Signed-off-by: Maximilian Heyne <mheyne@amazon.de>
> ---
> For some reason only the corresponding selftest patch was backported and
> it's now failing on 5.10 kernels. I tested that with this patch the
> selftest is succeeding again.

Thank you for this backport. It looks good to me!

Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>


I was waiting for the FAILED notification for this patch before adapting
it for v5.10, but it looks like I never got it, see:

https://lore.kernel.org/017c0cd3-7391-4d53-9e3e-ebdea5fa26da@kernel.org

No problem, that was not critical, and we now have a fix :)

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 5.10] mptcp: pm: kernel: flush: do not reset ADD_ADDR limit
  2025-09-10  9:28 [PATCH 5.10] mptcp: pm: kernel: flush: do not reset ADD_ADDR limit Heyne, Maximilian
  2025-09-10  9:55 ` Matthieu Baerts
@ 2025-09-10 12:33 ` Oliver Hartkopp
  2025-09-10 13:27   ` Heyne, Maximilian
  1 sibling, 1 reply; 4+ messages in thread
From: Oliver Hartkopp @ 2025-09-10 12:33 UTC (permalink / raw)
  To: Heyne, Maximilian
  Cc: Matthieu Baerts (NGI0), stable@vger.kernel.org, Thomas Dreibholz,
	Mat Martineau, Jakub Kicinski, Mat Martineau, Matthieu Baerts,
	David S. Miller, Paolo Abeni, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org

Hi Max,

I'm not responsible for net/mptcp/pm_netlink.c nor can I be found in git 
blame of that file.

Why did you send this patch to me and having all the relevant persons in CC?

Best regards,
Oliver

On 10.09.25 11:28, Heyne, Maximilian wrote:
> From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
> 
> commit 68fc0f4b0d25692940cdc85c68e366cae63e1757 upstream.
> 
> A flush of the MPTCP endpoints should not affect the MPTCP limits. In
> other words, 'ip mptcp endpoint flush' should not change 'ip mptcp
> limits'.
> 
> But it was the case: the MPTCP_PM_ATTR_RCV_ADD_ADDRS (add_addr_accepted)
> limit was reset by accident. Removing the reset of this counter during a
> flush fixes this issue.
> 
> Fixes: 01cacb00b35c ("mptcp: add netlink-based PM")
> Cc: stable@vger.kernel.org
> Reported-by: Thomas Dreibholz <dreibh@simula.no>
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/579
> Reviewed-by: Mat Martineau <martineau@kernel.org>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> Link: https://patch.msgid.link/20250815-net-mptcp-misc-fixes-6-17-rc2-v1-2-521fe9957892@kernel.org
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> [adjusted patch by removing WRITE_ONCE to take into account the missing
>   commit 72603d207d59 ("mptcp: use WRITE_ONCE for the pernet *_max")]
> Signed-off-by: Maximilian Heyne <mheyne@amazon.de>
> ---
> For some reason only the corresponding selftest patch was backported and
> it's now failing on 5.10 kernels. I tested that with this patch the
> selftest is succeeding again.
> ---
>   net/mptcp/pm_netlink.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> index 32379fc706cac..c31a1dc69f835 100644
> --- a/net/mptcp/pm_netlink.c
> +++ b/net/mptcp/pm_netlink.c
> @@ -869,7 +869,6 @@ static void __flush_addrs(struct pm_nl_pernet *pernet)
>   static void __reset_counters(struct pm_nl_pernet *pernet)
>   {
>   	pernet->add_addr_signal_max = 0;
> -	pernet->add_addr_accept_max = 0;
>   	pernet->local_addr_max = 0;
>   	pernet->addrs = 0;
>   }


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 5.10] mptcp: pm: kernel: flush: do not reset ADD_ADDR limit
  2025-09-10 12:33 ` Oliver Hartkopp
@ 2025-09-10 13:27   ` Heyne, Maximilian
  0 siblings, 0 replies; 4+ messages in thread
From: Heyne, Maximilian @ 2025-09-10 13:27 UTC (permalink / raw)
  To: Oliver Hartkopp
  Cc: Matthieu Baerts (NGI0), stable@vger.kernel.org, Thomas Dreibholz,
	Mat Martineau, Jakub Kicinski, Mat Martineau, Matthieu Baerts,
	David S. Miller, Paolo Abeni, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org

On Wed, Sep 10, 2025 at 02:33:28PM +0200, Oliver Hartkopp wrote:
> Hi Max,
> 
> I'm not responsible for net/mptcp/pm_netlink.c nor can I be found in git
> blame of that file.
> 
> Why did you send this patch to me and having all the relevant persons in CC?

Hi Oliver,

I don't see your email address in the CC list of my patch. Did you get
this mail via some list maybe? To be explicit, I have used the following
command to send the mail:
  
  git send-email --cc-cmd "./scripts/get_maintainer.pl --norolestats 0001-mptcp-pm-kernel-flush-do-not-reset-ADD_ADDR-limit.patch" 0001-mptcp-pm-kernel-flush-do-not-reset-ADD_ADDR-limit.patch

This uses the get_maintainer.pl from the 5.10 tree though.

Regards,
Maximilian

> 
> Best regards,
> Oliver
> 
> On 10.09.25 11:28, Heyne, Maximilian wrote:
> > From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
> > 
> > commit 68fc0f4b0d25692940cdc85c68e366cae63e1757 upstream.
> > 
> > A flush of the MPTCP endpoints should not affect the MPTCP limits. In
> > other words, 'ip mptcp endpoint flush' should not change 'ip mptcp
> > limits'.
> > 
> > But it was the case: the MPTCP_PM_ATTR_RCV_ADD_ADDRS (add_addr_accepted)
> > limit was reset by accident. Removing the reset of this counter during a
> > flush fixes this issue.
> > 
> > Fixes: 01cacb00b35c ("mptcp: add netlink-based PM")
> > Cc: stable@vger.kernel.org
> > Reported-by: Thomas Dreibholz <dreibh@simula.no>
> > Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/579
> > Reviewed-by: Mat Martineau <martineau@kernel.org>
> > Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> > Link: https://patch.msgid.link/20250815-net-mptcp-misc-fixes-6-17-rc2-v1-2-521fe9957892@kernel.org
> > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> > [adjusted patch by removing WRITE_ONCE to take into account the missing
> >   commit 72603d207d59 ("mptcp: use WRITE_ONCE for the pernet *_max")]
> > Signed-off-by: Maximilian Heyne <mheyne@amazon.de>
> > ---
> > For some reason only the corresponding selftest patch was backported and
> > it's now failing on 5.10 kernels. I tested that with this patch the
> > selftest is succeeding again.
> > ---
> >   net/mptcp/pm_netlink.c | 1 -
> >   1 file changed, 1 deletion(-)
> > 
> > diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> > index 32379fc706cac..c31a1dc69f835 100644
> > --- a/net/mptcp/pm_netlink.c
> > +++ b/net/mptcp/pm_netlink.c
> > @@ -869,7 +869,6 @@ static void __flush_addrs(struct pm_nl_pernet *pernet)
> >   static void __reset_counters(struct pm_nl_pernet *pernet)
> >   {
> >   	pernet->add_addr_signal_max = 0;
> > -	pernet->add_addr_accept_max = 0;
> >   	pernet->local_addr_max = 0;
> >   	pernet->addrs = 0;
> >   }
> 



Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-10 13:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-10  9:28 [PATCH 5.10] mptcp: pm: kernel: flush: do not reset ADD_ADDR limit Heyne, Maximilian
2025-09-10  9:55 ` Matthieu Baerts
2025-09-10 12:33 ` Oliver Hartkopp
2025-09-10 13:27   ` Heyne, Maximilian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox