summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/contrib/pf/net/if_pfsync.c8
-rw-r--r--sys/net/bpf.c2
-rw-r--r--sys/netgraph/netgraph.h2
-rw-r--r--sys/netinet/ip_carp.c6
-rw-r--r--sys/netinet/ip_dummynet.c2
-rw-r--r--sys/netinet/ip_fw2.c2
-rw-r--r--sys/netinet/ip_mroute.c6
-rw-r--r--sys/netinet/tcp_subr.c8
-rw-r--r--sys/sys/mutex.h1
9 files changed, 16 insertions, 21 deletions
diff --git a/sys/contrib/pf/net/if_pfsync.c b/sys/contrib/pf/net/if_pfsync.c
index ea09731..cd83540 100644
--- a/sys/contrib/pf/net/if_pfsync.c
+++ b/sys/contrib/pf/net/if_pfsync.c
@@ -282,12 +282,12 @@ pfsync_clone_create(struct if_clone *ifc, int unit)
ifp->if_hdrlen = PFSYNC_HDRLEN;
pfsync_setmtu(pfsyncif, ETHERMTU);
#ifdef __FreeBSD__
- callout_init(&pfsyncif->sc_tmo, NET_CALLOUT_MPSAFE);
+ callout_init(&pfsyncif->sc_tmo, CALLOUT_MPSAFE);
#ifdef PFSYNC_TDB
- callout_init(&pfsyncif->sc_tdb_tmo, NET_CALLOUT_MPSAFE);
+ callout_init(&pfsyncif->sc_tdb_tmo, CALLOUT_MPSAFE);
#endif
- callout_init(&pfsyncif->sc_bulk_tmo, NET_CALLOUT_MPSAFE);
- callout_init(&pfsyncif->sc_bulkfail_tmo, NET_CALLOUT_MPSAFE);
+ callout_init(&pfsyncif->sc_bulk_tmo, CALLOUT_MPSAFE);
+ callout_init(&pfsyncif->sc_bulkfail_tmo, CALLOUT_MPSAFE);
#else
timeout_set(&pfsyncif->sc_tmo, pfsync_timeout, pfsyncif);
timeout_set(&pfsyncif->sc_tdb_tmo, pfsync_tdb_timeout, pfsyncif);
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 0443d13..08ec25a 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -405,7 +405,7 @@ bpfopen(struct cdev *dev, int flags, int fmt, struct thread *td)
mac_create_bpfdesc(td->td_ucred, d);
#endif
mtx_init(&d->bd_mtx, devtoname(dev), "bpf cdev lock", MTX_DEF);
- callout_init(&d->bd_callout, NET_CALLOUT_MPSAFE);
+ callout_init(&d->bd_callout, CALLOUT_MPSAFE);
knlist_init(&d->bd_sel.si_note, &d->bd_mtx, NULL, NULL, NULL);
return (0);
diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h
index fdf78c9..4fa20e1 100644
--- a/sys/netgraph/netgraph.h
+++ b/sys/netgraph/netgraph.h
@@ -1097,7 +1097,7 @@ int ng_send_fn1(node_p node, hook_p hook, ng_item_fn *fn,
int ng_uncallout(struct callout *c, node_p node);
int ng_callout(struct callout *c, node_p node, hook_p hook, int ticks,
ng_item_fn *fn, void * arg1, int arg2);
-#define ng_callout_init(c) callout_init(c, NET_CALLOUT_MPSAFE)
+#define ng_callout_init(c) callout_init(c, CALLOUT_MPSAFE)
/* Flags for netgraph functions. */
#define NG_NOFLAGS 0x00000000 /* no special options */
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 4cabe30..172b3ca 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -384,9 +384,9 @@ carp_clone_create(struct if_clone *ifc, int unit, caddr_t params)
sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS;
sc->sc_imo.imo_multicast_vif = -1;
- callout_init(&sc->sc_ad_tmo, NET_CALLOUT_MPSAFE);
- callout_init(&sc->sc_md_tmo, NET_CALLOUT_MPSAFE);
- callout_init(&sc->sc_md6_tmo, NET_CALLOUT_MPSAFE);
+ callout_init(&sc->sc_ad_tmo, CALLOUT_MPSAFE);
+ callout_init(&sc->sc_md_tmo, CALLOUT_MPSAFE);
+ callout_init(&sc->sc_md6_tmo, CALLOUT_MPSAFE);
ifp->if_softc = sc;
if_initname(ifp, CARP_IFNAME, unit);
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c
index bc3100f..c800682 100644
--- a/sys/netinet/ip_dummynet.c
+++ b/sys/netinet/ip_dummynet.c
@@ -2141,7 +2141,7 @@ ip_dn_init(void)
taskqueue_thread_enqueue, &dn_tq);
taskqueue_start_threads(&dn_tq, 1, PI_NET, "dummynet");
- callout_init(&dn_timeout, NET_CALLOUT_MPSAFE);
+ callout_init(&dn_timeout, CALLOUT_MPSAFE);
callout_reset(&dn_timeout, 1, dummynet, NULL);
/* Initialize curr_time adjustment mechanics. */
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index e53e2e8..111b500 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -4937,7 +4937,7 @@ ipfw_init(void)
sizeof(ipfw_dyn_rule), NULL, NULL, NULL, NULL,
UMA_ALIGN_PTR, 0);
IPFW_DYN_LOCK_INIT();
- callout_init(&ipfw_timeout, NET_CALLOUT_MPSAFE);
+ callout_init(&ipfw_timeout, CALLOUT_MPSAFE);
bzero(&default_rule, sizeof default_rule);
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index f9997ce..f5707c0 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -639,12 +639,12 @@ ip_mrouter_reset(void)
pim_assert = 0;
mrt_api_config = 0;
- callout_init(&expire_upcalls_ch, NET_CALLOUT_MPSAFE);
+ callout_init(&expire_upcalls_ch, CALLOUT_MPSAFE);
bw_upcalls_n = 0;
bzero((caddr_t)bw_meter_timers, sizeof(bw_meter_timers));
- callout_init(&bw_upcalls_ch, NET_CALLOUT_MPSAFE);
- callout_init(&bw_meter_ch, NET_CALLOUT_MPSAFE);
+ callout_init(&bw_upcalls_ch, CALLOUT_MPSAFE);
+ callout_init(&bw_meter_ch, CALLOUT_MPSAFE);
}
static void
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 7dfbebb..16d4d92 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -592,12 +592,8 @@ tcp_newtcpcb(struct inpcb *inp)
tcp_mssdflt;
/* Set up our timeouts. */
- if (NET_CALLOUT_MPSAFE)
- callout_init_mtx(&tp->t_timers->tt_timer, &inp->inp_mtx,
- CALLOUT_RETURNUNLOCKED);
- else
- callout_init_mtx(&tp->t_timers->tt_timer, &inp->inp_mtx,
- (CALLOUT_RETURNUNLOCKED|CALLOUT_NETGIANT));
+ callout_init_mtx(&tp->t_timers->tt_timer, &inp->inp_mtx,
+ CALLOUT_RETURNUNLOCKED);
if (tcp_do_rfc1323)
tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h
index 4598cf4..ffe5605 100644
--- a/sys/sys/mutex.h
+++ b/sys/sys/mutex.h
@@ -408,7 +408,6 @@ do { \
} while (0)
#define NET_ASSERT_GIANT() do { \
} while (0)
-#define NET_CALLOUT_MPSAFE CALLOUT_MPSAFE
struct mtx_args {
struct mtx *ma_mtx;
OpenPOWER on IntegriCloud