Use NET_CALLOUT_MPSAFE macro.
This commit is contained in:
parent
d111bbbc06
commit
31199c8463
@ -356,7 +356,7 @@ bpfopen(dev, flags, fmt, 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, debug_mpsafenet ? CALLOUT_MPSAFE : 0);
|
||||
callout_init(&d->bd_callout, NET_CALLOUT_MPSAFE);
|
||||
knlist_init(&d->bd_sel.si_note, &d->bd_mtx);
|
||||
|
||||
return (0);
|
||||
|
@ -1220,7 +1220,7 @@ bdginit(void)
|
||||
|
||||
bdgtakeifaces_ptr(); /* XXX does this do anything? */
|
||||
|
||||
callout_init(&bdg_callout, debug_mpsafenet ? CALLOUT_MPSAFE : 0);
|
||||
callout_init(&bdg_callout, NET_CALLOUT_MPSAFE);
|
||||
bdg_timeout(0);
|
||||
return 0 ;
|
||||
}
|
||||
|
@ -2034,7 +2034,7 @@ ip_dn_init(void)
|
||||
ip_dn_io_ptr = dummynet_io;
|
||||
ip_dn_ruledel_ptr = dn_rule_delete;
|
||||
|
||||
callout_init(&dn_timeout, debug_mpsafenet ? CALLOUT_MPSAFE : 0);
|
||||
callout_init(&dn_timeout, NET_CALLOUT_MPSAFE);
|
||||
callout_reset(&dn_timeout, 1, dummynet, NULL);
|
||||
}
|
||||
|
||||
|
@ -3534,7 +3534,7 @@ ipfw_init(void)
|
||||
sizeof(ipfw_dyn_rule), NULL, NULL, NULL, NULL,
|
||||
UMA_ALIGN_PTR, 0);
|
||||
IPFW_DYN_LOCK_INIT();
|
||||
callout_init(&ipfw_timeout, debug_mpsafenet ? CALLOUT_MPSAFE : 0);
|
||||
callout_init(&ipfw_timeout, NET_CALLOUT_MPSAFE);
|
||||
|
||||
bzero(&default_rule, sizeof default_rule);
|
||||
|
||||
|
@ -598,23 +598,20 @@ get_vif_cnt(struct sioc_vif_req *req)
|
||||
static void
|
||||
ip_mrouter_reset(void)
|
||||
{
|
||||
int callout_flag;
|
||||
|
||||
bzero((caddr_t)mfctable, sizeof(mfctable));
|
||||
bzero((caddr_t)nexpire, sizeof(nexpire));
|
||||
|
||||
pim_assert = 0;
|
||||
mrt_api_config = 0;
|
||||
|
||||
callout_flag = debug_mpsafenet ? CALLOUT_MPSAFE : 0;
|
||||
callout_init(&expire_upcalls_ch, callout_flag);
|
||||
callout_init(&expire_upcalls_ch, NET_CALLOUT_MPSAFE);
|
||||
|
||||
bw_upcalls_n = 0;
|
||||
bzero((caddr_t)bw_meter_timers, sizeof(bw_meter_timers));
|
||||
callout_init(&bw_upcalls_ch, callout_flag);
|
||||
callout_init(&bw_meter_ch, callout_flag);
|
||||
callout_init(&bw_upcalls_ch, NET_CALLOUT_MPSAFE);
|
||||
callout_init(&bw_meter_ch, NET_CALLOUT_MPSAFE);
|
||||
|
||||
callout_init(&tbf_reprocess_ch, callout_flag);
|
||||
callout_init(&tbf_reprocess_ch, NET_CALLOUT_MPSAFE);
|
||||
}
|
||||
|
||||
static struct mtx mrouter_mtx; /* used to synch init/done work */
|
||||
|
@ -582,7 +582,6 @@ tcp_newtcpcb(inp)
|
||||
#ifdef INET6
|
||||
int isipv6 = (inp->inp_vflag & INP_IPV6) != 0;
|
||||
#endif /* INET6 */
|
||||
int callout_flag;
|
||||
|
||||
tm = uma_zalloc(tcpcb_zone, M_NOWAIT | M_ZERO);
|
||||
if (tm == NULL)
|
||||
@ -596,12 +595,11 @@ tcp_newtcpcb(inp)
|
||||
tcp_mssdflt;
|
||||
|
||||
/* Set up our timeouts. */
|
||||
callout_flag = debug_mpsafenet ? CALLOUT_MPSAFE : 0;
|
||||
callout_init(tp->tt_rexmt = &tm->tcpcb_mem_rexmt, callout_flag);
|
||||
callout_init(tp->tt_persist = &tm->tcpcb_mem_persist, callout_flag);
|
||||
callout_init(tp->tt_keep = &tm->tcpcb_mem_keep, callout_flag);
|
||||
callout_init(tp->tt_2msl = &tm->tcpcb_mem_2msl, callout_flag);
|
||||
callout_init(tp->tt_delack = &tm->tcpcb_mem_delack, callout_flag);
|
||||
callout_init(tp->tt_rexmt = &tm->tcpcb_mem_rexmt, NET_CALLOUT_MPSAFE);
|
||||
callout_init(tp->tt_persist = &tm->tcpcb_mem_persist, NET_CALLOUT_MPSAFE);
|
||||
callout_init(tp->tt_keep = &tm->tcpcb_mem_keep, NET_CALLOUT_MPSAFE);
|
||||
callout_init(tp->tt_2msl = &tm->tcpcb_mem_2msl, NET_CALLOUT_MPSAFE);
|
||||
callout_init(tp->tt_delack = &tm->tcpcb_mem_delack, NET_CALLOUT_MPSAFE);
|
||||
|
||||
if (tcp_do_rfc1323)
|
||||
tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);
|
||||
|
@ -245,8 +245,7 @@ syncache_init(void)
|
||||
/* Initialize the timer queues. */
|
||||
for (i = 0; i <= SYNCACHE_MAXREXMTS; i++) {
|
||||
TAILQ_INIT(&tcp_syncache.timerq[i]);
|
||||
callout_init(&tcp_syncache.tt_timerq[i],
|
||||
debug_mpsafenet ? CALLOUT_MPSAFE : 0);
|
||||
callout_init(&tcp_syncache.tt_timerq[i], NET_CALLOUT_MPSAFE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -582,7 +582,6 @@ tcp_newtcpcb(inp)
|
||||
#ifdef INET6
|
||||
int isipv6 = (inp->inp_vflag & INP_IPV6) != 0;
|
||||
#endif /* INET6 */
|
||||
int callout_flag;
|
||||
|
||||
tm = uma_zalloc(tcpcb_zone, M_NOWAIT | M_ZERO);
|
||||
if (tm == NULL)
|
||||
@ -596,12 +595,11 @@ tcp_newtcpcb(inp)
|
||||
tcp_mssdflt;
|
||||
|
||||
/* Set up our timeouts. */
|
||||
callout_flag = debug_mpsafenet ? CALLOUT_MPSAFE : 0;
|
||||
callout_init(tp->tt_rexmt = &tm->tcpcb_mem_rexmt, callout_flag);
|
||||
callout_init(tp->tt_persist = &tm->tcpcb_mem_persist, callout_flag);
|
||||
callout_init(tp->tt_keep = &tm->tcpcb_mem_keep, callout_flag);
|
||||
callout_init(tp->tt_2msl = &tm->tcpcb_mem_2msl, callout_flag);
|
||||
callout_init(tp->tt_delack = &tm->tcpcb_mem_delack, callout_flag);
|
||||
callout_init(tp->tt_rexmt = &tm->tcpcb_mem_rexmt, NET_CALLOUT_MPSAFE);
|
||||
callout_init(tp->tt_persist = &tm->tcpcb_mem_persist, NET_CALLOUT_MPSAFE);
|
||||
callout_init(tp->tt_keep = &tm->tcpcb_mem_keep, NET_CALLOUT_MPSAFE);
|
||||
callout_init(tp->tt_2msl = &tm->tcpcb_mem_2msl, NET_CALLOUT_MPSAFE);
|
||||
callout_init(tp->tt_delack = &tm->tcpcb_mem_delack, NET_CALLOUT_MPSAFE);
|
||||
|
||||
if (tcp_do_rfc1323)
|
||||
tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);
|
||||
|
Loading…
Reference in New Issue
Block a user