]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mptcp: pm: in-kernel: reduce pernet struct size
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Thu, 25 Sep 2025 10:32:48 +0000 (12:32 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 27 Sep 2025 00:44:05 +0000 (17:44 -0700)
commit4984fe6254f8d469c98e639856b7ce21fe8da86f
treec82f40957f2ab91e8a2d016dba994195e48cf8bd
parentdb9a0e3858ba8acbe4f78edcb8c2061aee53dfa4
mptcp: pm: in-kernel: reduce pernet struct size

All the 'unsigned int' variables from the 'pm_nl_pernet' structure are
bounded to MPTCP_PM_ADDR_MAX, currently set to 8. The endpoint ID is
also bounded by the protocol to 8-bit. MPTCP_PM_ADDR_MAX, if extended
later, will never over 8-bit.

So no need to use 'unsigned int' variables, 'u8' is enough.

Note that the exposed counters in MPTCP_INFO are already limited to
8-bit, same for pm->extra_subflows, and others. So it seems even better
to limit them to 8-bit.

Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250925-net-next-mptcp-c-flag-laminar-v1-13-ad126cc47c6b@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm_kernel.c
net/mptcp/protocol.h