Lines Matching refs:fp

394 	sctp_faddr_t	*fp;  in sctp_heartbeat_timer()  local
436 for (fp = sctp->sctp_faddrs; fp != NULL; fp = fp->sf_next) { in sctp_heartbeat_timer()
438 pp_max_retr = MIN(sctp_pp_early_abort, fp->sf_max_retr); in sctp_heartbeat_timer()
440 pp_max_retr = fp->sf_max_retr; in sctp_heartbeat_timer()
452 if (fp->sf_state == SCTP_FADDRS_UNREACH) { in sctp_heartbeat_timer()
453 sctp_get_dest(sctp, fp); in sctp_heartbeat_timer()
454 if (fp->sf_state == SCTP_FADDRS_UNREACH) { in sctp_heartbeat_timer()
455 if (fp->sf_hb_enabled && in sctp_heartbeat_timer()
456 ++fp->sf_strikes > pp_max_retr && in sctp_heartbeat_timer()
457 sctp_faddr_dead(sctp, fp, in sctp_heartbeat_timer()
462 fp->sf_hb_expiry = now + SET_HB_INTVL(fp); in sctp_heartbeat_timer()
466 fp->sf_hb_expiry = now; in sctp_heartbeat_timer()
473 if (!fp->sf_hb_enabled && fp->sf_state != in sctp_heartbeat_timer()
489 if (now >= fp->sf_hb_expiry) { in sctp_heartbeat_timer()
490 if (fp->sf_hb_pending) { in sctp_heartbeat_timer()
497 switch (fp->sf_state) { in sctp_heartbeat_timer()
506 fp->sf_rtt_updates = 0; in sctp_heartbeat_timer()
507 fp->sf_strikes++; in sctp_heartbeat_timer()
508 if (fp->sf_strikes > pp_max_retr) { in sctp_heartbeat_timer()
509 if (sctp_faddr_dead(sctp, fp, in sctp_heartbeat_timer()
518 fp->sf_rto = in sctp_heartbeat_timer()
522 SCTP_CALC_RXT(sctp, fp, in sctp_heartbeat_timer()
524 fp->sf_hb_expiry = now + in sctp_heartbeat_timer()
525 fp->sf_rto; in sctp_heartbeat_timer()
530 fp->sf_hb_expiry = now + in sctp_heartbeat_timer()
531 SET_HB_INTVL(fp); in sctp_heartbeat_timer()
541 if (fp->sf_suna > 0) { in sctp_heartbeat_timer()
542 fp->sf_hb_expiry = now + in sctp_heartbeat_timer()
543 SET_HB_INTVL(fp); in sctp_heartbeat_timer()
546 fp->sf_hb_expiry = now + fp->sf_rto; in sctp_heartbeat_timer()
559 if (fp->sf_state != SCTP_FADDRS_UNCONFIRMED || in sctp_heartbeat_timer()
561 sctp_send_heartbeat(sctp, fp); in sctp_heartbeat_timer()
564 if (fp->sf_hb_expiry < earliest_expiry || earliest_expiry == 0) in sctp_heartbeat_timer()
565 earliest_expiry = fp->sf_hb_expiry; in sctp_heartbeat_timer()
588 sctp_rexmit_timer(sctp_t *sctp, sctp_faddr_t *fp) in sctp_rexmit_timer() argument
595 ASSERT(fp != NULL); in sctp_rexmit_timer()
598 SCTP_PRINTADDR(fp->sf_faddr))); in sctp_rexmit_timer()
600 fp->sf_timer_running = 0; in sctp_rexmit_timer()
603 pp_max_retr = fp->sf_max_retr; in sctp_rexmit_timer()
607 pp_max_retr = MIN(sctp_pp_early_abort, fp->sf_max_retr); in sctp_rexmit_timer()
613 if (fp->sf_strikes >= sctp->sctp_max_init_rxt) { in sctp_rexmit_timer()
634 if (fp->sf_strikes >= pp_max_retr) { in sctp_rexmit_timer()
635 if (sctp_faddr_dead(sctp, fp, SCTP_FADDRS_DOWN) == -1) { in sctp_rexmit_timer()
659 sctp_rexmit(sctp, fp); in sctp_rexmit_timer()
674 mp = sctp_init_mp(sctp, fp); in sctp_rexmit_timer()
677 (void) conn_ip_output(mp, fp->sf_ixa); in sctp_rexmit_timer()
691 (void) conn_ip_output(mp, fp->sf_ixa); in sctp_rexmit_timer()
716 fp->sf_strikes++; in sctp_rexmit_timer()
718 SCTP_CALC_RXT(sctp, fp, rto_max); in sctp_rexmit_timer()
720 SCTP_FADDR_TIMER_RESTART(sctp, fp, fp->sf_rto); in sctp_rexmit_timer()
727 sctp_update_rtt(sctp_t *sctp, sctp_faddr_t *fp, clock_t delta) in sctp_update_rtt() argument
735 dprint(5, ("sctp_update_rtt: fp = %p, rtt = %d\n", (void *)fp, rtt)); in sctp_update_rtt()
738 if (fp->sf_srtt == -1) { in sctp_update_rtt()
739 fp->sf_srtt = rtt; in sctp_update_rtt()
740 fp->sf_rttvar = rtt / 2; in sctp_update_rtt()
741 fp->sf_rto = 3 * rtt; /* == rtt + 4 * rttvar ( == rtt / 2) */ in sctp_update_rtt()
749 abs = fp->sf_srtt - rtt; in sctp_update_rtt()
751 fp->sf_rttvar = (3 * fp->sf_rttvar + abs) >> 2; in sctp_update_rtt()
752 fp->sf_rttvar = fp->sf_rttvar != 0 ? fp->sf_rttvar : 1; in sctp_update_rtt()
754 fp->sf_srtt = (7 * fp->sf_srtt + rtt) >> 3; in sctp_update_rtt()
755 fp->sf_rto = fp->sf_srtt + 4 * fp->sf_rttvar; in sctp_update_rtt()
759 fp->sf_srtt, fp->sf_rttvar, fp->sf_rto)); in sctp_update_rtt()
762 if (fp->sf_rto < sctp->sctp_rto_min) { in sctp_update_rtt()
763 fp->sf_rto = sctp->sctp_rto_min; in sctp_update_rtt()
765 if (fp->sf_rto > sctp->sctp_rto_max) { in sctp_update_rtt()
766 fp->sf_rto = sctp->sctp_rto_max; in sctp_update_rtt()
769 SCTP_MAX_RTO(sctp, fp); in sctp_update_rtt()
770 fp->sf_rtt_updates++; in sctp_update_rtt()
776 sctp_faddr_t *fp; in sctp_free_faddr_timers() local
778 for (fp = sctp->sctp_faddrs; fp != NULL; fp = fp->sf_next) { in sctp_free_faddr_timers()
779 if (fp->sf_timer_mp != NULL) { in sctp_free_faddr_timers()
780 sctp_timer_free(fp->sf_timer_mp); in sctp_free_faddr_timers()
781 fp->sf_timer_mp = NULL; in sctp_free_faddr_timers()
782 fp->sf_timer_running = 0; in sctp_free_faddr_timers()
784 if (fp->sf_rc_timer_mp != NULL) { in sctp_free_faddr_timers()
785 sctp_timer_free(fp->sf_rc_timer_mp); in sctp_free_faddr_timers()
786 fp->sf_rc_timer_mp = NULL; in sctp_free_faddr_timers()
787 fp->sf_rc_timer_running = 0; in sctp_free_faddr_timers()
795 sctp_faddr_t *fp; in sctp_stop_faddr_timers() local
797 for (fp = sctp->sctp_faddrs; fp != NULL; fp = fp->sf_next) { in sctp_stop_faddr_timers()
798 SCTP_FADDR_TIMER_STOP(fp); in sctp_stop_faddr_timers()
799 SCTP_FADDR_RC_TIMER_STOP(fp); in sctp_stop_faddr_timers()