Lines Matching refs:tp

226 	struct tcpcb *tp = arg;  in tcp_delack()  local
235 if ((tp->t_flags & (TF_DEAD | TF_DELACK)) != TF_DELACK) { in tcp_delack()
239 if (!callout_expired(&tp->t_delack_ch)) { in tcp_delack()
244 tp->t_flags |= TF_ACKNOW; in tcp_delack()
246 (void) tcp_output(tp); in tcp_delack()
283 tcp_canceltimers(struct tcpcb *tp) in tcp_canceltimers() argument
288 TCP_TIMER_DISARM(tp, i); in tcp_canceltimers()
303 struct tcpcb *tp = arg; in tcp_timer_rexmt() local
311 if ((tp->t_flags & TF_DEAD) != 0) { in tcp_timer_rexmt()
315 if (!callout_expired(&tp->t_timer[TCPT_REXMT])) { in tcp_timer_rexmt()
321 if ((tp->t_flags & TF_PMTUD_PEND) && tp->t_inpcb && in tcp_timer_rexmt()
322 SEQ_GEQ(tp->t_pmtud_th_seq, tp->snd_una) && in tcp_timer_rexmt()
323 SEQ_LT(tp->t_pmtud_th_seq, (int)(tp->snd_una + tp->t_ourmss))) { in tcp_timer_rexmt()
327 tp->t_flags &= ~TF_PMTUD_PEND; in tcp_timer_rexmt()
330 icmp.icmp_nextmtu = tp->t_pmtud_nextmtu; in tcp_timer_rexmt()
331 icmp.icmp_ip.ip_len = tp->t_pmtud_ip_len; in tcp_timer_rexmt()
332 icmp.icmp_ip.ip_hl = tp->t_pmtud_ip_hl; in tcp_timer_rexmt()
333 icmpsrc.sin_addr = in4p_faddr(tp->t_inpcb); in tcp_timer_rexmt()
347 so = tp->t_inpcb->inp_socket; in tcp_timer_rexmt()
348 ostate = tp->t_state; in tcp_timer_rexmt()
354 tcp_free_sackholes(tp); in tcp_timer_rexmt()
355 tp->snd_fack = tp->snd_una; in tcp_timer_rexmt()
363 if (++tp->t_rxtshift > TCP_MAXRXTSHIFT) { in tcp_timer_rexmt()
364 tp->t_rxtshift = TCP_MAXRXTSHIFT; in tcp_timer_rexmt()
366 tp = tcp_drop(tp, tp->t_softerror ? in tcp_timer_rexmt()
367 tp->t_softerror : ETIMEDOUT); in tcp_timer_rexmt()
371 rto = TCP_REXMTVAL(tp); in tcp_timer_rexmt()
372 if (rto < tp->t_rttmin) in tcp_timer_rexmt()
373 rto = tp->t_rttmin; in tcp_timer_rexmt()
374 TCPT_RANGESET(tp->t_rxtcur, rto * tcp_backoff[tp->t_rxtshift], in tcp_timer_rexmt()
375 tp->t_rttmin, TCPTV_REXMTMAX); in tcp_timer_rexmt()
376 TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur); in tcp_timer_rexmt()
386 if (tp->t_mtudisc && tp->t_rxtshift > TCP_MAXRXTSHIFT / 6) { in tcp_timer_rexmt()
390 tp->t_mtudisc = 0; in tcp_timer_rexmt()
403 if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) { in tcp_timer_rexmt()
404 inpcb_losing(tp->t_inpcb); in tcp_timer_rexmt()
413 tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT); in tcp_timer_rexmt()
414 tp->t_srtt = 0; in tcp_timer_rexmt()
416 tp->snd_nxt = tp->snd_una; in tcp_timer_rexmt()
417 tp->snd_high = tp->snd_max; in tcp_timer_rexmt()
421 tp->t_rtttime = 0; in tcp_timer_rexmt()
427 if (tp->t_state == TCPS_SYN_SENT) in tcp_timer_rexmt()
428 tp->t_flags |= TF_SYN_REXMT; in tcp_timer_rexmt()
433 tp->t_congctl->slow_retransmit(tp); in tcp_timer_rexmt()
435 (void) tcp_output(tp); in tcp_timer_rexmt()
439 if (tp && so->so_options & SO_DEBUG) in tcp_timer_rexmt()
440 tcp_trace(TA_USER, ostate, tp, NULL, in tcp_timer_rexmt()
450 struct tcpcb *tp = arg; in tcp_timer_persist() local
458 if ((tp->t_flags & TF_DEAD) != 0) { in tcp_timer_persist()
462 if (!callout_expired(&tp->t_timer[TCPT_PERSIST])) { in tcp_timer_persist()
469 so = tp->t_inpcb->inp_socket; in tcp_timer_persist()
470 ostate = tp->t_state; in tcp_timer_persist()
485 rto = TCP_REXMTVAL(tp); in tcp_timer_persist()
486 if (rto < tp->t_rttmin) in tcp_timer_persist()
487 rto = tp->t_rttmin; in tcp_timer_persist()
488 if (tp->t_rxtshift == TCP_MAXRXTSHIFT && in tcp_timer_persist()
489 ((tcp_now - tp->t_rcvtime) >= tcp_maxpersistidle || in tcp_timer_persist()
490 (tcp_now - tp->t_rcvtime) >= rto * tcp_totbackoff)) { in tcp_timer_persist()
492 tp = tcp_drop(tp, ETIMEDOUT); in tcp_timer_persist()
496 tcp_setpersist(tp); in tcp_timer_persist()
497 tp->t_force = 1; in tcp_timer_persist()
498 (void) tcp_output(tp); in tcp_timer_persist()
499 tp->t_force = 0; in tcp_timer_persist()
503 if (tp && so->so_options & SO_DEBUG) in tcp_timer_persist()
504 tcp_trace(TA_USER, ostate, tp, NULL, in tcp_timer_persist()
514 struct tcpcb *tp = arg; in tcp_timer_keep() local
521 if ((tp->t_flags & TF_DEAD) != 0) { in tcp_timer_keep()
525 if (!callout_expired(&tp->t_timer[TCPT_KEEP])) { in tcp_timer_keep()
533 ostate = tp->t_state; in tcp_timer_keep()
542 if (TCPS_HAVEESTABLISHED(tp->t_state) == 0) in tcp_timer_keep()
544 so = tp->t_inpcb->inp_socket; in tcp_timer_keep()
547 tp->t_state <= TCPS_CLOSE_WAIT) { in tcp_timer_keep()
548 if ((tp->t_maxidle > 0) && in tcp_timer_keep()
549 ((tcp_now - tp->t_rcvtime) >= in tcp_timer_keep()
550 tp->t_keepidle + tp->t_maxidle)) in tcp_timer_keep()
566 (void)tcp_respond(tp, tp->t_template, in tcp_timer_keep()
567 NULL, NULL, tp->rcv_nxt, in tcp_timer_keep()
568 tp->snd_una - 1, 0); in tcp_timer_keep()
570 TCP_TIMER_ARM(tp, TCPT_KEEP, tp->t_keepintvl); in tcp_timer_keep()
572 TCP_TIMER_ARM(tp, TCPT_KEEP, tp->t_keepidle); in tcp_timer_keep()
575 if (tp && so->so_options & SO_DEBUG) in tcp_timer_keep()
576 tcp_trace(TA_USER, ostate, tp, NULL, in tcp_timer_keep()
585 (void) tcp_drop(tp, ETIMEDOUT); in tcp_timer_keep()
593 struct tcpcb *tp = arg; in tcp_timer_2msl() local
600 if ((tp->t_flags & TF_DEAD) != 0) { in tcp_timer_2msl()
604 if (!callout_expired(&tp->t_timer[TCPT_2MSL])) { in tcp_timer_2msl()
614 tcp_free_sackholes(tp); in tcp_timer_2msl()
615 tp->snd_fack = tp->snd_una; in tcp_timer_2msl()
618 so = tp->t_inpcb->inp_socket; in tcp_timer_2msl()
619 ostate = tp->t_state; in tcp_timer_2msl()
628 if (tp->t_state != TCPS_TIME_WAIT && in tcp_timer_2msl()
629 ((tp->t_maxidle == 0) || in tcp_timer_2msl()
630 ((tcp_now - tp->t_rcvtime) <= tp->t_maxidle))) in tcp_timer_2msl()
631 TCP_TIMER_ARM(tp, TCPT_2MSL, tp->t_keepintvl); in tcp_timer_2msl()
633 tp = tcp_close(tp); in tcp_timer_2msl()
636 if (tp && so->so_options & SO_DEBUG) in tcp_timer_2msl()
637 tcp_trace(TA_USER, ostate, tp, NULL, in tcp_timer_2msl()