diff options
| author | Matthieu Baerts (NGI0) <matttbe@kernel.org> | 2026-06-05 12:21:46 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-06-12 01:33:37 +0300 |
| commit | a8bffec089d5b9d02f08db738eaaff695f77b6b3 (patch) | |
| tree | b57f261988e8577d8e183618c4c2516a16d1b326 /include | |
| parent | f4a58ffbd4cf6e51b252ab64054584cad2750160 (diff) | |
| download | linux-a8bffec089d5b9d02f08db738eaaff695f77b6b3.tar.xz | |
mptcp: pm: avoid computing rm_addr size twice
mptcp_rm_addr_len helper was called twice: in mptcp_pm_rm_addr_signal,
then just after in mptcp_established_options_rm_addr. Both to check the
remaining space.
The second call is not needed: if there is not enough space,
mptcp_pm_rm_addr_signal will return false, and the caller,
mptcp_established_options_rm_addr, will do the same without re-checking
the size again. Instead, mptcp_pm_rm_addr_signal can directly set the
size.
While at it, move mptcp_rm_addr_len to pm.c, as it is now only used
there, once.
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260605-net-next-mptcp-add-addr6-port-ts-v2-2-758e7ca73f4d@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
