mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
mptcp: pm: only fill id_avail_bitmap for in-kernel pm
id_avail_bitmap of struct mptcp_pm_data is currently only used by the in-kernel PM, so this patch moves its initialization operation under the "if (pm_type == MPTCP_PM_TYPE_KERNEL)" condition. Suggested-by: Matthieu Baerts <matttbe@kernel.org> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250313-net-next-mptcp-pm-ops-intro-v1-4-f4e4a88efc50@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
committed by
Paolo Abeni
parent
5fff36b69c
commit
98a0a99e81
@@ -1000,6 +1000,8 @@ void mptcp_pm_data_reset(struct mptcp_sock *msk)
|
||||
!!mptcp_pm_get_add_addr_accept_max(msk) &&
|
||||
subflows_allowed);
|
||||
WRITE_ONCE(pm->accept_subflow, subflows_allowed);
|
||||
|
||||
bitmap_fill(pm->id_avail_bitmap, MPTCP_PM_MAX_ADDR_ID + 1);
|
||||
} else {
|
||||
WRITE_ONCE(pm->work_pending, 0);
|
||||
WRITE_ONCE(pm->accept_addr, 0);
|
||||
@@ -1009,7 +1011,6 @@ void mptcp_pm_data_reset(struct mptcp_sock *msk)
|
||||
WRITE_ONCE(pm->addr_signal, 0);
|
||||
WRITE_ONCE(pm->remote_deny_join_id0, false);
|
||||
pm->status = 0;
|
||||
bitmap_fill(pm->id_avail_bitmap, MPTCP_PM_MAX_ADDR_ID + 1);
|
||||
}
|
||||
|
||||
void mptcp_pm_data_init(struct mptcp_sock *msk)
|
||||
|
||||
Reference in New Issue
Block a user