diff options
| author | Geliang Tang <[email protected]> | 2025-03-13 10:20:54 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2025-03-20 09:14:48 +0000 |
| commit | eff5b1578e99c031f8d33e3f2a972504a3933831 (patch) | |
| tree | e0eb531eb91ab89cec2f9545bc55e0c9086a327e /net/mptcp/pm.c | |
| parent | mptcp: pm: only fill id_avail_bitmap for in-kernel pm (diff) | |
| download | kernel-eff5b1578e99c031f8d33e3f2a972504a3933831.tar.gz kernel-eff5b1578e99c031f8d33e3f2a972504a3933831.zip | |
mptcp: pm: add struct_group in mptcp_pm_data
This patch adds a "struct_group(reset, ...)" in struct mptcp_pm_data to
simplify the reset, and make sure we don't miss any.
Suggested-by: Matthieu Baerts <[email protected]>
Signed-off-by: Geliang Tang <[email protected]>
Reviewed-by: Matthieu Baerts (NGI0) <[email protected]>
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/20250313-net-next-mptcp-pm-ops-intro-v1-5-f4e4a88efc50@kernel.org
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'net/mptcp/pm.c')
| -rw-r--r-- | net/mptcp/pm.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c index af009661477b..85ee999729a1 100644 --- a/net/mptcp/pm.c +++ b/net/mptcp/pm.c @@ -978,10 +978,7 @@ void mptcp_pm_data_reset(struct mptcp_sock *msk) u8 pm_type = mptcp_get_pm_type(sock_net((struct sock *)msk)); struct mptcp_pm_data *pm = &msk->pm; - pm->add_addr_signaled = 0; - pm->add_addr_accepted = 0; - pm->local_addr_used = 0; - pm->subflows = 0; + memset(&pm->reset, 0, sizeof(pm->reset)); pm->rm_list_tx.nr = 0; pm->rm_list_rx.nr = 0; WRITE_ONCE(pm->pm_type, pm_type); @@ -1002,15 +999,7 @@ void mptcp_pm_data_reset(struct mptcp_sock *msk) 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); - WRITE_ONCE(pm->accept_subflow, 0); } - - WRITE_ONCE(pm->addr_signal, 0); - WRITE_ONCE(pm->remote_deny_join_id0, false); - pm->status = 0; } void mptcp_pm_data_init(struct mptcp_sock *msk) |
