mptcp: pm: remove add_ prefix from timer

Similar to the two previous commits, using the 'add' prefix is
confusing, also confirmed by [1].

Now that the structure has been renamed to include 'add_addr' in its
name, easier to know the timer is linked to the ADD_ADDR, no need to
add the confusing prefix, or an unneeded longer one.

While at it, also update the ADD_ADDR timer helper to clearly specify it
is linked to ADD_ADDR, and it is not there to add a new timer.

Link: https://lore.kernel.org/20251117100745.1913963-1-edumazet@google.com [1]
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-12-758e7ca73f4d@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Matthieu Baerts (NGI0) authored and Jakub Kicinski committed 2026-06-11 15:33:39 -07:00
1 parent 7d4dacc8cc
commit 938490767e
1 file changed
+8 -8
+8 -8
View File
@@ -17,7 +17,7 @@ struct mptcp_pm_add_addr {
struct mptcp_addr_info addr;
u8 retrans_times;
bool timer_done;
struct timer_list add_timer;
struct timer_list timer;
struct mptcp_sock *sock;
struct rcu_head rcu;
};
@@ -338,10 +338,10 @@ static unsigned int mptcp_adjust_add_addr_timeout(struct mptcp_sock *msk)
return rto;
}
static void mptcp_pm_add_timer(struct timer_list *timer)
static void mptcp_pm_add_addr_timer(struct timer_list *timer)
{
struct mptcp_pm_add_addr *entry = timer_container_of(entry, timer,
add_timer);
timer);
struct mptcp_sock *msk = entry->sock;
struct sock *sk = (struct sock *)msk;
unsigned int timeout = 0;
@@ -422,9 +422,9 @@ mptcp_pm_announced_del_timer(struct mptcp_sock *msk,
*/
if (stop_timer) {
if (check_id)
sk_stop_timer(sk, &entry->add_timer);
sk_stop_timer(sk, &entry->timer);
else
sk_stop_timer_sync(sk, &entry->add_timer);
sk_stop_timer_sync(sk, &entry->timer);
}
rcu_read_unlock();
@@ -458,12 +458,12 @@ bool mptcp_pm_announced_alloc(struct mptcp_sock *msk,
add_entry->sock = msk;
add_entry->retrans_times = 0;
timer_setup(&add_entry->add_timer, mptcp_pm_add_timer, 0);
timer_setup(&add_entry->timer, mptcp_pm_add_addr_timer, 0);
reset_timer:
add_entry->timer_done = false;
timeout = mptcp_adjust_add_addr_timeout(msk);
if (timeout)
sk_reset_timer(sk, &add_entry->add_timer, jiffies + timeout);
sk_reset_timer(sk, &add_entry->timer, jiffies + timeout);
return true;
}
@@ -482,7 +482,7 @@ static void mptcp_pm_free_announced_list(struct mptcp_sock *msk)
list_for_each_entry_safe(entry, tmp, &free_list, list) {
if (!entry->timer_done)
sk_stop_timer_sync(sk, &entry->add_timer);
sk_stop_timer_sync(sk, &entry->timer);
kfree_rcu(entry, rcu);
}
}