FreeBSD kernel IPv4 code
|
Go to the source code of this file.
Functions | |
CTASSERT ((PACE_TMR_MASK &0x80)==0) | |
int | ctf_process_inbound_raw (struct tcpcb *tp, struct socket *so, struct mbuf *m, int has_pkt) |
int | ctf_do_queued_segments (struct socket *so, struct tcpcb *tp, int have_pkt) |
uint32_t | ctf_outstanding (struct tcpcb *tp) |
uint32_t | ctf_flight_size (struct tcpcb *tp, uint32_t rc_sacked) |
int | _ctf_drop_checks (struct tcpopt *to, struct mbuf *m, struct tcphdr *th, struct tcpcb *tp, int32_t *tlenp, int32_t *thf, int32_t *drop_hdrlen, int32_t *ret_val, uint32_t *ts, uint32_t *cnt) |
void | ctf_ack_war_checks (struct tcpcb *tp, uint32_t *ts, uint32_t *cnt) |
void | __ctf_do_dropafterack (struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t thflags, int32_t tlen, int32_t *ret_val, uint32_t *ts, uint32_t *cnt) |
void | ctf_do_dropwithreset (struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t rstreason, int32_t tlen) |
void | ctf_do_drop (struct mbuf *m, struct tcpcb *tp) |
int | __ctf_process_rst (struct mbuf *m, struct tcphdr *th, struct socket *so, struct tcpcb *tp, uint32_t *ts, uint32_t *cnt) |
void | ctf_challenge_ack (struct mbuf *m, struct tcphdr *th, struct tcpcb *tp, int32_t *ret_val) |
int | ctf_ts_check (struct mbuf *m, struct tcphdr *th, struct tcpcb *tp, int32_t tlen, int32_t thflags, int32_t *ret_val) |
int | ctf_ts_check_ac (struct tcpcb *tp, int32_t thflags) |
void | ctf_calc_rwin (struct socket *so, struct tcpcb *tp) |
void | ctf_do_dropwithreset_conn (struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t rstreason, int32_t tlen) |
uint32_t | ctf_fixed_maxseg (struct tcpcb *tp) |
void | ctf_log_sack_filter (struct tcpcb *tp, int num_sack_blks, struct sackblk *sack_blocks) |
uint32_t | ctf_decay_count (uint32_t count, uint32_t decay_percentage) |
int32_t | ctf_progress_timeout_check (struct tcpcb *tp, bool log) |
#define BBR_JR_APP_LIMITED CTF_JR_APP_LIMITED |
Definition at line 63 of file rack_bbr_common.h.
#define BBR_JR_ASSESSING CTF_JR_ASSESSING |
Definition at line 64 of file rack_bbr_common.h.
#define BBR_JR_CWND_LIMITED CTF_JR_CWND_LIMITED |
Definition at line 61 of file rack_bbr_common.h.
#define BBR_JR_PERSISTS CTF_JR_PERSISTS |
Definition at line 65 of file rack_bbr_common.h.
#define BBR_JR_PRR CTF_JR_PRR |
Definition at line 66 of file rack_bbr_common.h.
#define BBR_JR_RWND_LIMITED CTF_JR_RWND_LIMITED |
Definition at line 62 of file rack_bbr_common.h.
#define BBR_JR_SENT_DATA CTF_JR_SENT_DATA |
Definition at line 60 of file rack_bbr_common.h.
#define ctf_do_dropafterack | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f | |||
) | __ctf_do_dropafterack(a, b, c, d, e, f, NULL, NULL) |
Definition at line 113 of file rack_bbr_common.h.
#define ctf_drop_checks | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h | |||
) | _ctf_drop_checks(a, b, c, d, e, f, g, h, NULL, NULL) |
Definition at line 106 of file rack_bbr_common.h.
#define CTF_JR_APP_LIMITED 3 |
Definition at line 54 of file rack_bbr_common.h.
#define CTF_JR_ASSESSING 4 |
Definition at line 55 of file rack_bbr_common.h.
#define CTF_JR_CWND_LIMITED 1 |
Definition at line 52 of file rack_bbr_common.h.
#define CTF_JR_PERSISTS 5 |
Definition at line 56 of file rack_bbr_common.h.
#define CTF_JR_PRR 6 |
Definition at line 57 of file rack_bbr_common.h.
#define CTF_JR_RWND_LIMITED 2 |
Definition at line 53 of file rack_bbr_common.h.
#define CTF_JR_SENT_DATA 0 |
Definition at line 51 of file rack_bbr_common.h.
#define ctf_process_rst | ( | m, | |
t, | |||
s, | |||
p | |||
) | __ctf_process_rst(m, t, s, p, NULL, NULL) |
Definition at line 124 of file rack_bbr_common.h.
#define DUP_ACK_THRESHOLD 3 |
Definition at line 42 of file rack_bbr_common.h.
#define FIVETWELVE_MBPS 64000000 /* 512 megabits in bytes */ |
Definition at line 84 of file rack_bbr_common.h.
#define FORTY_EIGHT_MBPS 6000000 /* 48 megabits in bytes */ |
Definition at line 81 of file rack_bbr_common.h.
#define MS_IN_USEC 1000 |
Definition at line 76 of file rack_bbr_common.h.
#define MSEC_IN_SECOND 1000 |
Definition at line 75 of file rack_bbr_common.h.
#define ONE_POINT_TWO_MEG 150000 /* 1.2 megabits in bytes */ |
Definition at line 85 of file rack_bbr_common.h.
#define PACE_MAX_IP_BYTES 65536 |
Definition at line 73 of file rack_bbr_common.h.
#define PROGRESS_CLEAR 3 |
Definition at line 47 of file rack_bbr_common.h.
#define PROGRESS_DROP 1 |
Definition at line 45 of file rack_bbr_common.h.
#define PROGRESS_START 4 |
Definition at line 48 of file rack_bbr_common.h.
#define PROGRESS_UPDATE 2 |
Definition at line 46 of file rack_bbr_common.h.
#define TCP_MSS_ACCT_ATIMER 60 |
Definition at line 35 of file rack_bbr_common.h.
#define TCP_MSS_ACCT_INPACE 61 |
Definition at line 36 of file rack_bbr_common.h.
#define TCP_MSS_ACCT_JUSTRET 0 |
Definition at line 32 of file rack_bbr_common.h.
#define TCP_MSS_ACCT_LATE 62 |
Definition at line 37 of file rack_bbr_common.h.
#define TCP_MSS_ACCT_PERSIST 2 |
Definition at line 34 of file rack_bbr_common.h.
#define TCP_MSS_ACCT_SIZE 70 |
Definition at line 39 of file rack_bbr_common.h.
#define TCP_MSS_ACCT_SNDACK 1 |
Definition at line 33 of file rack_bbr_common.h.
#define TCP_MSS_SMALL_MAX_SIZE_DIV (TCP_MSS_ACCT_SIZE - TCP_MSS_SMALL_SIZE_OFF) |
Definition at line 40 of file rack_bbr_common.h.
#define TCP_MSS_SMALL_SIZE_OFF 63 /* Point where small sizes enter */ |
Definition at line 38 of file rack_bbr_common.h.
#define TCP_TS_OVERHEAD 12 /* Overhead of having Timestamps on */ |
Definition at line 78 of file rack_bbr_common.h.
#define THIRTY_MBPS 3750000 /* 30 megabits in bytes */ |
Definition at line 82 of file rack_bbr_common.h.
#define TWENTY_THREE_MBPS 2896000 /* 23 megabits in bytes */ |
Definition at line 83 of file rack_bbr_common.h.
#define USE_RTT_AVG 2 |
Definition at line 71 of file rack_bbr_common.h.
#define USE_RTT_HIGH 0 |
Definition at line 69 of file rack_bbr_common.h.
#define USE_RTT_LOW 1 |
Definition at line 70 of file rack_bbr_common.h.
#define USEC_TO_MSEC | ( | x | ) | (x / MS_IN_USEC) |
Definition at line 77 of file rack_bbr_common.h.
#define USECS_IN_SECOND 1000000 |
Definition at line 74 of file rack_bbr_common.h.
void __ctf_do_dropafterack | ( | struct mbuf * | m, |
struct tcpcb * | tp, | ||
struct tcphdr * | th, | ||
int32_t | thflags, | ||
int32_t | tlen, | ||
int32_t * | ret_val, | ||
uint32_t * | ts, | ||
uint32_t * | cnt | ||
) |
Definition at line 724 of file rack_bbr_common.c.
References BANDLIM_RST_OPENPORT, ctf_ack_war_checks(), ctf_do_dropwithreset(), SEQ_GT, tcpcb::snd_max, tcpcb::snd_una, tcpcb::t_state, and TCPS_SYN_RECEIVED.
Referenced by _ctf_drop_checks(), and rack_process_ack().
int __ctf_process_rst | ( | struct mbuf * | m, |
struct tcphdr * | th, | ||
struct socket * | so, | ||
struct tcpcb * | tp, | ||
uint32_t * | ts, | ||
uint32_t * | cnt | ||
) |
Definition at line 767 of file rack_bbr_common.c.
References ctf_do_drop(), KMOD_TCPSTAT_INC, tcpcb::last_ack_sent, tcpcb::rcv_nxt, tcpcb::rcv_wnd, SEQ_GEQ, SEQ_LT, tcpcb::snd_nxt, tcpcb::t_state, tcp_ack_war_cnt, tcp_ack_war_time_window, tcp_close(), TCP_EI_STATUS_CLIENT_RST, tcp_log_end_status(), tcp_respond(), tcp_state_change(), tcp_ts_getticks(), TCPS_CLOSE_WAIT, TCPS_CLOSED, TCPS_CLOSING, TCPS_ESTABLISHED, TCPS_FIN_WAIT_1, TCPS_FIN_WAIT_2, TCPS_LAST_ACK, TCPS_SYN_RECEIVED, TCPS_SYN_SENT, TSTMP_LT, and V_tcp_insecure_rst.
Referenced by rack_do_close_wait(), rack_do_closing(), rack_do_established(), rack_do_fin_wait_1(), rack_do_fin_wait_2(), rack_do_lastack(), and rack_do_syn_recv().
int _ctf_drop_checks | ( | struct tcpopt * | to, |
struct mbuf * | m, | ||
struct tcphdr * | th, | ||
struct tcpcb * | tp, | ||
int32_t * | tlenp, | ||
int32_t * | thf, | ||
int32_t * | drop_hdrlen, | ||
int32_t * | ret_val, | ||
uint32_t * | ts, | ||
uint32_t * | cnt | ||
) |
Definition at line 615 of file rack_bbr_common.c.
References __ctf_do_dropafterack(), ctf_ack_war_checks(), KMOD_TCPSTAT_ADD, KMOD_TCPSTAT_INC, tcpcb::rcv_nxt, tcpcb::rcv_wnd, tcpcb::t_flags, tcp_update_sack_list(), TF_ACKNOW, and TF_SACK_PERMIT.
Referenced by rack_do_close_wait(), rack_do_closing(), rack_do_established(), rack_do_fin_wait_1(), rack_do_fin_wait_2(), rack_do_lastack(), and rack_do_syn_recv().
CTASSERT | ( | (PACE_TMR_MASK &0x80) | = =0 | ) |
Definition at line 579 of file rack_bbr_common.c.
References tcpcb::t_flags, tcp_ack_war_cnt, tcp_ack_war_time_window, tcp_ts_getticks(), TF_ACKNOW, and TSTMP_LT.
Referenced by __ctf_do_dropafterack(), _ctf_drop_checks(), and rack_do_compressed_ack_processing().
void ctf_calc_rwin | ( | struct socket * | so, |
struct tcpcb * | tp | ||
) |
Definition at line 952 of file rack_bbr_common.c.
References tcpcb::rcv_adv, tcpcb::rcv_nxt, and tcpcb::rcv_wnd.
Referenced by bbr_do_close_wait(), bbr_do_closing(), bbr_do_established(), bbr_do_fastnewdata(), bbr_do_fin_wait_1(), bbr_do_fin_wait_2(), bbr_do_lastack(), bbr_do_syn_recv(), bbr_do_syn_sent(), rack_do_close_wait(), rack_do_closing(), rack_do_compressed_ack_processing(), rack_do_established(), rack_do_fastnewdata(), rack_do_fin_wait_1(), rack_do_fin_wait_2(), rack_do_lastack(), rack_do_syn_recv(), and rack_do_syn_sent().
void ctf_challenge_ack | ( | struct mbuf * | m, |
struct tcphdr * | th, | ||
struct tcpcb * | tp, | ||
int32_t * | ret_val | ||
) |
Definition at line 863 of file rack_bbr_common.c.
References ctf_do_drop(), KMOD_TCPSTAT_INC, tcpcb::last_ack_sent, tcpcb::rcv_nxt, tcpcb::rcv_wnd, SEQ_GEQ, SEQ_LT, tcpcb::snd_nxt, tcp_drop(), tcp_respond(), and V_tcp_insecure_syn.
Referenced by bbr_do_close_wait(), bbr_do_closing(), bbr_do_established(), bbr_do_fin_wait_1(), bbr_do_fin_wait_2(), bbr_do_lastack(), rack_do_close_wait(), rack_do_closing(), rack_do_established(), rack_do_fin_wait_1(), rack_do_fin_wait_2(), and rack_do_lastack().
Definition at line 1019 of file rack_bbr_common.c.
References count.
Referenced by rack_do_decay().
void ctf_do_drop | ( | struct mbuf * | m, |
struct tcpcb * | tp | ||
) |
Definition at line 754 of file rack_bbr_common.c.
References INP_WUNLOCK, and tcpcb::t_inpcb.
Referenced by __ctf_process_rst(), bbr_do_close_wait(), bbr_do_closing(), bbr_do_established(), bbr_do_fin_wait_1(), bbr_do_fin_wait_2(), bbr_do_lastack(), bbr_do_syn_recv(), bbr_do_syn_sent(), ctf_challenge_ack(), ctf_ts_check(), rack_do_close_wait(), rack_do_closing(), rack_do_compressed_ack_processing(), rack_do_established(), rack_do_fin_wait_1(), rack_do_fin_wait_2(), rack_do_lastack(), rack_do_syn_recv(), and rack_do_syn_sent().
void ctf_do_dropwithreset | ( | struct mbuf * | m, |
struct tcpcb * | tp, | ||
struct tcphdr * | th, | ||
int32_t | rstreason, | ||
int32_t | tlen | ||
) |
Definition at line 568 of file rack_bbr_common.c.
References INP_WUNLOCK, tcpcb::t_inpcb, and tcp_dropwithreset().
Referenced by __ctf_do_dropafterack(), bbr_check_data_after_close(), bbr_do_syn_recv(), bbr_do_syn_sent(), bbr_process_ack(), rack_check_data_after_close(), rack_do_segment_nounlock(), rack_do_syn_recv(), rack_do_syn_sent(), and rack_process_ack().
void ctf_do_dropwithreset_conn | ( | struct mbuf * | m, |
struct tcpcb * | tp, | ||
struct tcphdr * | th, | ||
int32_t | rstreason, | ||
int32_t | tlen | ||
) |
Definition at line 968 of file rack_bbr_common.c.
References INP_WUNLOCK, tcpcb::t_inpcb, tcp_drop(), and tcp_dropwithreset().
Referenced by bbr_do_close_wait(), bbr_do_closing(), bbr_do_established(), bbr_do_fin_wait_1(), bbr_do_fin_wait_2(), bbr_do_lastack(), bbr_do_segment_nounlock(), rack_do_close_wait(), rack_do_closing(), rack_do_established(), rack_do_fin_wait_1(), rack_do_fin_wait_2(), and rack_do_lastack().
int ctf_do_queued_segments | ( | struct socket * | so, |
struct tcpcb * | tp, | ||
int | have_pkt | ||
) |
Definition at line 527 of file rack_bbr_common.c.
References ctf_process_inbound_raw(), tcpcb::t_in_pkt, and tcpcb::t_tail_pkt.
Referenced by bbr_do_segment(), and rack_do_segment().
Definition at line 979 of file rack_bbr_common.c.
References tcp_fixed_maxseg().
Referenced by rack_ack_received(), rack_calc_thresh_tlp(), rack_check_bottom_drag(), rack_cong_signal(), rack_do_compressed_ack_processing(), rack_do_goodput_measurement(), rack_do_segment_nounlock(), rack_enough_for_measurement(), rack_enter_probertt(), rack_exit_probertt(), rack_fast_output(), rack_fast_rsm_output(), rack_get_measure_window(), rack_get_pacing_delay(), rack_log_ack(), rack_log_output(), rack_mtu_change(), rack_need_set_test(), rack_output(), rack_post_recovery(), rack_process_ack(), rack_set_pace_segments(), rack_start_gp_measurement(), rack_timeout_tlp(), rack_timer_start(), rack_update_rtt(), rack_validate_fo_sendwin_up(), rc_init_window(), and tcp_rack_xmit_timer().
Definition at line 558 of file rack_bbr_common.c.
References ctf_outstanding().
Referenced by bbr_ack_received(), bbr_cong_signal(), bbr_do_segment_nounlock(), bbr_enter_probe_rtt(), bbr_exit_probe_rtt(), bbr_fill_in_logging_data(), bbr_log_output(), bbr_output_wtime(), bbr_post_recovery(), bbr_set_probebw_gains(), bbr_state_change(), bbr_state_startup(), bbr_substate_change(), bbr_update_rsm(), bbr_what_can_we_send(), pace_to_fill_cwnd(), rack_check_bottom_drag(), rack_check_probe_rtt(), rack_do_segment_nounlock(), rack_fast_output(), rack_fast_rsm_output(), rack_log_doseg_done(), rack_log_fsb(), rack_log_input_packet(), rack_log_map_chg(), rack_log_output(), rack_log_pacing_delay_calc(), rack_log_progress_event(), rack_log_retran_reason(), rack_log_rtt_sample(), rack_log_rtt_shrinks(), rack_log_rtt_upd(), rack_log_timely(), rack_log_to_cancel(), rack_log_to_event(), rack_log_to_processing(), rack_log_to_prr(), rack_log_to_start(), rack_log_type_bbrsnd(), rack_log_type_just_return(), rack_log_type_pacing_sizes(), rack_mtu_change(), rack_output(), rack_remxt_tmr(), rack_update_rsm(), rack_what_can_we_send(), and tcp_bbr_partialack().
Definition at line 985 of file rack_bbr_common.c.
References tcp_log_bbr::applimited, sackblk::end, tcp_log_bbr::flex1, tcp_log_bbr::flex2, tcp_log_bbr::flex3, tcp_log_bbr::flex4, tcp_log_bbr::flex5, tcp_log_bbr::flex6, tcp_log_bbr::flex8, inpcb::inp_socket, tcp_log_bbr::pkts_out, sackblk::start, tcpcb::t_inpcb, tcpcb::t_logstate, tcp_get_usecs(), TCP_LOG_EVENTP, TCP_LOG_STATE_OFF, TCP_SACK_FILTER_RES, tcp_log_bbr::timeStamp, and tcp_log_stackspecific::u_bbr.
Referenced by bbr_log_ack(), and rack_log_ack().
Definition at line 545 of file rack_bbr_common.c.
References tcpcb::snd_max, tcpcb::snd_una, tcpcb::t_flags, tcpcb::t_state, TCPS_ESTABLISHED, and TF_SENTFIN.
Referenced by bbr_cwnd_limiting(), bbr_fastack(), bbr_output_wtime(), bbr_process_data(), bbr_set_probebw_gains(), bbr_timeout_tlp(), bbr_what_can_we_send(), ctf_flight_size(), pace_to_fill_cwnd(), rack_fastack(), rack_output(), rack_post_recovery(), rack_process_data(), rack_validate_fo_sendwin_up(), and rack_what_can_we_send().
int ctf_process_inbound_raw | ( | struct tcpcb * | tp, |
struct socket * | so, | ||
struct mbuf * | m, | ||
int | has_pkt | ||
) |
Definition at line 363 of file rack_bbr_common.c.
References ctf_get_enet_type(), inpcb::inp_flags2, INP_MBUF_ACKCMP, INP_UNLOCK_ASSERT, INP_WLOCK_ASSERT, ip::ip_len, ip::ip_tos, KMOD_TCPSTAT_ADD, KMOD_TCPSTAT_INC, M_ACKCMP, tcpcb::t_fb, tcpcb::t_inpcb, tcp_fields_to_host(), tcp_get_usecs(), and tcp_function_block::tfb_do_segment_nounlock.
Referenced by ctf_do_queued_segments().
int32_t ctf_progress_timeout_check | ( | struct tcpcb * | tp, |
bool | log | ||
) |
Definition at line 1045 of file rack_bbr_common.c.
References KMOD_TCPSTAT_INC, tcpcb::t_acktime, tcpcb::t_maxunacktime, TCP_EI_STATUS_PROGRESS, tcp_log_end_status(), and TSTMP_GT.
Referenced by bbr_do_close_wait(), bbr_do_closing(), bbr_do_established(), bbr_do_fin_wait_1(), bbr_do_fin_wait_2(), bbr_do_lastack(), bbr_timeout_persist(), bbr_timeout_rxt(), bbr_timeout_tlp(), rack_do_close_wait(), rack_do_closing(), rack_do_compressed_ack_processing(), rack_do_established(), rack_do_fin_wait_1(), rack_do_fin_wait_2(), rack_do_lastack(), rack_timeout_persist(), rack_timeout_rxt(), and rack_timeout_tlp().
int ctf_ts_check | ( | struct mbuf * | m, |
struct tcphdr * | th, | ||
struct tcpcb * | tp, | ||
int32_t | tlen, | ||
int32_t | thflags, | ||
int32_t * | ret_val | ||
) |
Definition at line 894 of file rack_bbr_common.c.
References ctf_do_drop(), ctf_do_dropafterack, KMOD_TCPSTAT_ADD, KMOD_TCPSTAT_INC, TCP_PAWS_IDLE, tcp_ts_getticks(), tcpcb::ts_recent, and tcpcb::ts_recent_age.
Referenced by bbr_do_close_wait(), bbr_do_closing(), bbr_do_established(), bbr_do_fin_wait_1(), bbr_do_fin_wait_2(), bbr_do_lastack(), bbr_do_syn_recv(), rack_do_close_wait(), rack_do_closing(), rack_do_established(), rack_do_fin_wait_1(), rack_do_fin_wait_2(), rack_do_lastack(), and rack_do_syn_recv().
int ctf_ts_check_ac | ( | struct tcpcb * | tp, |
int32_t | thflags | ||
) |
Definition at line 926 of file rack_bbr_common.c.
References KMOD_TCPSTAT_INC, TCP_PAWS_IDLE, tcp_ts_getticks(), tcpcb::ts_recent, and tcpcb::ts_recent_age.
Referenced by rack_do_compressed_ack_processing().