Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net wg: Just call callout_halt directly.
details: https://anonhg.NetBSD.org/src/rev/8c5b2308e869
branches: trunk
changeset: 975561:8c5b2308e869
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 31 20:25:11 2020 +0000
description:
wg: Just call callout_halt directly.
No functional change, just makes it easier to read where callout_halt
happens.
diffstat:
sys/net/if_wg.c | 23 ++++-------------------
1 files changed, 4 insertions(+), 19 deletions(-)
diffs (72 lines):
diff -r bc4ccef5e108 -r 8c5b2308e869 sys/net/if_wg.c
--- a/sys/net/if_wg.c Mon Aug 31 20:24:49 2020 +0000
+++ b/sys/net/if_wg.c Mon Aug 31 20:25:11 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wg.c,v 1.39 2020/08/31 20:24:49 riastradh Exp $ */
+/* $NetBSD: if_wg.c,v 1.40 2020/08/31 20:25:11 riastradh Exp $ */
/*
* Copyright (C) Ryota Ozaki <ozaki.ryota%gmail.com@localhost>
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.39 2020/08/31 20:24:49 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.40 2020/08/31 20:25:11 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -673,7 +673,6 @@
static void wg_schedule_rekey_timer(struct wg_peer *);
static void wg_schedule_session_dtor_timer(struct wg_peer *);
-static void wg_stop_session_dtor_timer(struct wg_peer *);
static bool wg_is_underload(struct wg_softc *, struct wg_peer *, int);
static void wg_calculate_keys(struct wg_session *, const bool);
@@ -1394,7 +1393,7 @@
* session, so clear it now.
*/
WG_TRACE("Session destroying, but force to clear");
- wg_stop_session_dtor_timer(wgp);
+ callout_halt(&wgp->wgp_session_dtor_timer, NULL);
wg_clear_states(wgs);
wgs->wgs_state = WGS_STATE_UNKNOWN;
}
@@ -1531,13 +1530,6 @@
mutex_exit(wgp->wgp_lock);
}
-static void
-wg_stop_handshake_timeout_timer(struct wg_peer *wgp)
-{
-
- callout_halt(&wgp->wgp_handshake_timeout_timer, NULL);
-}
-
static struct socket *
wg_get_so_by_af(struct wg_worker *wgw, const int af)
{
@@ -1887,7 +1879,7 @@
wg_clear_states(wgs);
WG_TRACE("WGS_STATE_ESTABLISHED");
- wg_stop_handshake_timeout_timer(wgp);
+ callout_halt(&wgp->wgp_handshake_timeout_timer, NULL);
mutex_enter(wgp->wgp_lock);
wg_swap_sessions(wgp);
@@ -2308,13 +2300,6 @@
callout_schedule(&wgp->wgp_session_dtor_timer, hz);
}
-static void
-wg_stop_session_dtor_timer(struct wg_peer *wgp)
-{
-
- callout_halt(&wgp->wgp_session_dtor_timer, NULL);
-}
-
static bool
sockaddr_port_match(const struct sockaddr *sa1, const struct sockaddr *sa2)
{
Home |
Main Index |
Thread Index |
Old Index