]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mptcp: pm: in-kernel: refactor fill_remote_addresses_vec
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Thu, 25 Sep 2025 10:32:39 +0000 (12:32 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 27 Sep 2025 00:44:04 +0000 (17:44 -0700)
commita845b2bbf26ed73e545a3573df264c3a1cb302a1
treeedcbe1af6510a978bd85fe7760574700ecbe3825
parent8dc63ade451d28211511b657fecf5e0822580986
mptcp: pm: in-kernel: refactor fill_remote_addresses_vec

Before this modification, this function was quite long with many levels
of indentations.

Each case can be split in a dedicated function: fullmesh, non-fullmesh.

To remove one level of indentation, msk->pm.subflows >= subflows_max is
now checked after having added one subflow, and stops the loop if it is
no longer possible to add new subflows. This is fine to do this because
this function should only be called if msk->pm.subflows < subflows_max.

No functional changes intended.

Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250925-net-next-mptcp-c-flag-laminar-v1-4-ad126cc47c6b@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm_kernel.c