MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tcp_timer_activate

Function tcp_timer_activate

freebsd/netinet/tcp_timer.c:892–941  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

890}
891
892void
893tcp_timer_activate(struct tcpcb *tp, uint32_t timer_type, u_int delta)
894{
895 struct callout *t_callout;
896 callout_func_t *f_callout;
897 struct inpcb *inp = tp->t_inpcb;
898 int cpu = inp_to_cpuid(inp);
899
900#ifdef TCP_OFFLOAD
901 if (tp->t_flags & TF_TOE)
902 return;
903#endif
904
905 if (tp->t_timers->tt_flags & TT_STOPPED)
906 return;
907
908 switch (timer_type) {
909 case TT_DELACK:
910 t_callout = &tp->t_timers->tt_delack;
911 f_callout = tcp_timer_delack;
912 break;
913 case TT_REXMT:
914 t_callout = &tp->t_timers->tt_rexmt;
915 f_callout = tcp_timer_rexmt;
916 break;
917 case TT_PERSIST:
918 t_callout = &tp->t_timers->tt_persist;
919 f_callout = tcp_timer_persist;
920 break;
921 case TT_KEEP:
922 t_callout = &tp->t_timers->tt_keep;
923 f_callout = tcp_timer_keep;
924 break;
925 case TT_2MSL:
926 t_callout = &tp->t_timers->tt_2msl;
927 f_callout = tcp_timer_2msl;
928 break;
929 default:
930 if (tp->t_fb->tfb_tcp_timer_activate) {
931 tp->t_fb->tfb_tcp_timer_activate(tp, timer_type, delta);
932 return;
933 }
934 panic("tp %p bad timer_type %#x", tp, timer_type);
935 }
936 if (delta == 0) {
937 callout_stop(t_callout);
938 } else {
939 callout_reset_on(t_callout, delta, f_callout, tp, cpu);
940 }
941}
942
943int
944tcp_timer_active(struct tcpcb *tp, uint32_t timer_type)

Callers 15

tcp_timers_unsuspendFunction · 0.85
tcp_sack_partialackFunction · 0.85
tcp_output.cFile · 0.85
tcp_setpersistFunction · 0.85
tcp_syncache.cFile · 0.85
cc_ecnpkt_handlerFunction · 0.85
tcp_do_segmentFunction · 0.85
tcp_prr_partialackFunction · 0.85
tcp_newreno_partial_ackFunction · 0.85
tcp_default_fb_initFunction · 0.85
toe_connect_failedFunction · 0.85
tcp_usr_connectFunction · 0.85

Calls 2

inp_to_cpuidFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected