If debug.mpsafenet is set, initialize TCP callouts as CALLOUT_MPSAFE.
This commit is contained in:
parent
c9f69064af
commit
d330008e3b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130821
@ -576,6 +576,7 @@ 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)
|
||||
@ -589,11 +590,17 @@ tcp_newtcpcb(inp)
|
||||
tcp_mssdflt;
|
||||
|
||||
/* Set up our timeouts. */
|
||||
callout_init(tp->tt_rexmt = &tm->tcpcb_mem_rexmt, 0);
|
||||
callout_init(tp->tt_persist = &tm->tcpcb_mem_persist, 0);
|
||||
callout_init(tp->tt_keep = &tm->tcpcb_mem_keep, 0);
|
||||
callout_init(tp->tt_2msl = &tm->tcpcb_mem_2msl, 0);
|
||||
callout_init(tp->tt_delack = &tm->tcpcb_mem_delack, 0);
|
||||
/*
|
||||
* XXXRW: Are these actually MPSAFE? I think so, but need to
|
||||
* review the timed wait code, as it has some list variables,
|
||||
* etc, that are global.
|
||||
*/
|
||||
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);
|
||||
|
||||
if (tcp_do_rfc1323)
|
||||
tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);
|
||||
|
@ -576,6 +576,7 @@ 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)
|
||||
@ -589,11 +590,17 @@ tcp_newtcpcb(inp)
|
||||
tcp_mssdflt;
|
||||
|
||||
/* Set up our timeouts. */
|
||||
callout_init(tp->tt_rexmt = &tm->tcpcb_mem_rexmt, 0);
|
||||
callout_init(tp->tt_persist = &tm->tcpcb_mem_persist, 0);
|
||||
callout_init(tp->tt_keep = &tm->tcpcb_mem_keep, 0);
|
||||
callout_init(tp->tt_2msl = &tm->tcpcb_mem_2msl, 0);
|
||||
callout_init(tp->tt_delack = &tm->tcpcb_mem_delack, 0);
|
||||
/*
|
||||
* XXXRW: Are these actually MPSAFE? I think so, but need to
|
||||
* review the timed wait code, as it has some list variables,
|
||||
* etc, that are global.
|
||||
*/
|
||||
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);
|
||||
|
||||
if (tcp_do_rfc1323)
|
||||
tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);
|
||||
|
Loading…
Reference in New Issue
Block a user