[PATCH mptcp-net v5 15/20] mptcp: pm: in-kernel: increase endpoints limit

Matthieu Baerts (NGI0) posted 20 patches 1 month, 3 weeks ago
There is a newer version of this series
[PATCH mptcp-net v5 15/20] mptcp: pm: in-kernel: increase endpoints limit
Posted by Matthieu Baerts (NGI0) 1 month, 3 weeks ago
The endpoints are managed in a list which was limited to 8 entries.

This limit can be too small in some cases: by having the same limit as
the number of subflows, it might not allow creating all expected
subflows when having a mix of v4 and v6 addresses that can all use MPTCP
on v4/v6 only networks.

While increasing the limit above the new subflows one, why not using the
technical limit: 254. Indeed, the endpoint will each have an ID that
will be used on the wire, limited to u8, and the ID 0 is reserved to the
initial subflow.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
 net/mptcp/pm_kernel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/pm_kernel.c b/net/mptcp/pm_kernel.c
index 1480bb7473b4..c75a2c29bcf2 100644
--- a/net/mptcp/pm_kernel.c
+++ b/net/mptcp/pm_kernel.c
@@ -746,7 +746,7 @@ static int mptcp_pm_nl_append_new_local_addr(struct pm_nl_pernet *pernet,
 	 */
 	if (pernet->next_id == MPTCP_PM_MAX_ADDR_ID)
 		pernet->next_id = 1;
-	if (pernet->endpoints >= MPTCP_PM_ADDR_MAX) {
+	if (pernet->endpoints == MPTCP_PM_MAX_ADDR_ID) {
 		ret = -ERANGE;
 		goto out;
 	}

-- 
2.53.0
Re: [PATCH mptcp-net v5 15/20] mptcp: pm: in-kernel: increase endpoints limit
Posted by Matthieu Baerts 1 month, 3 weeks ago
Hello,

On 15/04/2026 11:57, Matthieu Baerts (NGI0) wrote:
> The endpoints are managed in a list which was limited to 8 entries.
> 
> This limit can be too small in some cases: by having the same limit as
> the number of subflows, it might not allow creating all expected
> subflows when having a mix of v4 and v6 addresses that can all use MPTCP
> on v4/v6 only networks.
> 
> While increasing the limit above the new subflows one, why not using the
> technical limit: 254. Indeed, the endpoint will each have an ID that

Detail: s/254/255/

> will be used on the wire, limited to u8, and the ID 0 is reserved to the
> initial subflow.
Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.