|
#define | TCP_TICK 0.001 |
| TCP tick period (s) More...
|
|
#define | THZ (u32) (1/TCP_TICK) |
| TCP tick frequency. More...
|
|
#define | TCP_TSTAMP_RESOLUTION TCP_TICK |
| Time stamp resolution. More...
|
|
#define | TCP_PAWS_IDLE 24 * 24 * 60 * 60 * THZ |
| 24 days More...
|
|
#define | TCP_FIB_RECHECK_PERIOD 1 * THZ |
| Recheck every 1s. More...
|
|
#define | TCP_MAX_OPTION_SPACE 40 |
|
#define | TCP_CC_DATA_SZ 24 |
|
#define | TCP_MAX_GSO_SZ 65536 |
|
#define | TCP_RXT_MAX_BURST 10 |
|
#define | TCP_DUPACK_THRESHOLD 3 |
|
#define | TCP_IW_N_SEGMENTS 10 |
|
#define | TCP_ALWAYS_ACK 1 |
| On/off delayed acks. More...
|
|
#define | TCP_USE_SACKS 1 |
| Disable only for testing. More...
|
|
#define | foreach_tcp_fsm_state |
| TCP FSM state definitions as per RFC793. More...
|
|
#define | foreach_tcp_timer |
| TCP timers. More...
|
|
#define | TCP_TIMER_HANDLE_INVALID ((u32) ~0) |
|
#define | TCP_TIMER_TICK 0.1 |
| Timer tick in seconds. More...
|
|
#define | TCP_TO_TIMER_TICK TCP_TICK*10 |
| Factor for converting ticks to timer ticks. More...
|
|
#define | TCP_RTO_MAX 60 * THZ /* Min max RTO (60s) as per RFC6298 */ |
|
#define | TCP_RTO_MIN 0.2 * THZ /* Min RTO (200ms) - lower than standard */ |
|
#define | TCP_RTT_MAX 30 * THZ /* 30s (probably too much) */ |
|
#define | TCP_RTO_SYN_RETRIES 3 /* SYN retries without doubling RTO */ |
|
#define | TCP_RTO_INIT 1 * THZ /* Initial retransmit timer */ |
|
#define | TCP_RTO_BOFF_MAX 8 /* Max number of retries before reset */ |
|
#define | TCP_ESTABLISH_TIME (60 * THZ) /* Connection establish timeout */ |
|
#define | foreach_tcp_cfg_flag |
| Connection configuration flags. More...
|
|
#define | foreach_tcp_connection_flag |
| TCP connection flags. More...
|
|
#define | TCP_SCOREBOARD_TRACE (0) |
|
#define | TCP_MAX_SACK_BLOCKS 256 |
| Max number of SACK blocks stored. More...
|
|
#define | TCP_INVALID_SACK_HOLE_INDEX ((u32)~0) |
|
#define | tcp_scoreboard_trace_add(_tc, _ack) |
|
#define | TCP_BTS_INVALID_INDEX ((u32)~0) |
|
#define | tcp_fastrecovery_on(tc) (tc)->flags |= TCP_CONN_FAST_RECOVERY |
|
#define | tcp_fastrecovery_off(tc) (tc)->flags &= ~TCP_CONN_FAST_RECOVERY |
|
#define | tcp_recovery_on(tc) (tc)->flags |= TCP_CONN_RECOVERY |
|
#define | tcp_recovery_off(tc) (tc)->flags &= ~TCP_CONN_RECOVERY |
|
#define | tcp_in_fastrecovery(tc) ((tc)->flags & TCP_CONN_FAST_RECOVERY) |
|
#define | tcp_in_recovery(tc) ((tc)->flags & (TCP_CONN_RECOVERY)) |
|
#define | tcp_in_slowstart(tc) (tc->cwnd < tc->ssthresh) |
|
#define | tcp_disconnect_pending(tc) ((tc)->flags & TCP_CONN_DCNT_PENDING) |
|
#define | tcp_disconnect_pending_on(tc) ((tc)->flags |= TCP_CONN_DCNT_PENDING) |
|
#define | tcp_disconnect_pending_off(tc) ((tc)->flags &= ~TCP_CONN_DCNT_PENDING) |
|
#define | tcp_fastrecovery_first(tc) ((tc)->flags & TCP_CONN_FRXT_FIRST) |
|
#define | tcp_fastrecovery_first_on(tc) ((tc)->flags |= TCP_CONN_FRXT_FIRST) |
|
#define | tcp_fastrecovery_first_off(tc) ((tc)->flags &= ~TCP_CONN_FRXT_FIRST) |
|
#define | tcp_in_cong_recovery(tc) |
|
#define | tcp_csum_offload(tc) (!((tc)->cfg_flags & TCP_CFG_F_NO_CSUM_OFFLOAD)) |
|
#define | tcp_zero_rwnd_sent(tc) ((tc)->flags & TCP_CONN_ZERO_RWND_SENT) |
|
#define | tcp_zero_rwnd_sent_on(tc) (tc)->flags |= TCP_CONN_ZERO_RWND_SENT |
|
#define | tcp_zero_rwnd_sent_off(tc) (tc)->flags &= ~TCP_CONN_ZERO_RWND_SENT |
|
#define | tcp_error(n, s) TCP_ERROR_##n, |
|
#define | tcp_cfg tcp_main.cfg |
|
#define | tcp_node_index(node_id, is_ip4) ((is_ip4) ? tcp4_##node_id##_node.index : tcp6_##node_id##_node.index) |
|
#define | tcp_trajectory_add_start(b, start) |
|
#define | seq_lt(_s1, _s2) ((i32)((_s1)-(_s2)) < 0) |
|
#define | seq_leq(_s1, _s2) ((i32)((_s1)-(_s2)) <= 0) |
|
#define | seq_gt(_s1, _s2) ((i32)((_s1)-(_s2)) > 0) |
|
#define | seq_geq(_s1, _s2) ((i32)((_s1)-(_s2)) >= 0) |
|
#define | seq_max(_s1, _s2) (seq_gt((_s1), (_s2)) ? (_s1) : (_s2)) |
|
#define | timestamp_lt(_t1, _t2) ((i32)((_t1)-(_t2)) < 0) |
|
#define | timestamp_leq(_t1, _t2) ((i32)((_t1)-(_t2)) <= 0) |
|
#define | tcp_validate_txf_size(_tc, _a) |
|
|
sack_scoreboard_hole_t * | scoreboard_next_rxt_hole (sack_scoreboard_t *sb, sack_scoreboard_hole_t *start, u8 have_sent_1_smss, u8 *can_rescue, u8 *snd_limited) |
| Figure out the next hole to retransmit. More...
|
|
sack_scoreboard_hole_t * | scoreboard_get_hole (sack_scoreboard_t *sb, u32 index) |
|
sack_scoreboard_hole_t * | scoreboard_next_hole (sack_scoreboard_t *sb, sack_scoreboard_hole_t *hole) |
|
sack_scoreboard_hole_t * | scoreboard_prev_hole (sack_scoreboard_t *sb, sack_scoreboard_hole_t *hole) |
|
sack_scoreboard_hole_t * | scoreboard_first_hole (sack_scoreboard_t *sb) |
|
sack_scoreboard_hole_t * | scoreboard_last_hole (sack_scoreboard_t *sb) |
|
void | scoreboard_clear (sack_scoreboard_t *sb) |
|
void | scoreboard_clear_reneging (sack_scoreboard_t *sb, u32 start, u32 end) |
|
void | scoreboard_init (sack_scoreboard_t *sb) |
|
void | scoreboard_init_rxt (sack_scoreboard_t *sb, u32 snd_una) |
|
u8 * | format_tcp_scoreboard (u8 *s, va_list *args) |
|
static void | tcp_cong_recovery_off (tcp_connection_t *tc) |
|
static tcp_main_t * | vnet_get_tcp_main () |
|
static tcp_worker_ctx_t * | tcp_get_worker (u32 thread_index) |
|
static tcp_header_t * | tcp_buffer_hdr (vlib_buffer_t *b) |
|
clib_error_t * | vnet_tcp_enable_disable (vlib_main_t *vm, u8 is_en) |
|
void | tcp_punt_unknown (vlib_main_t *vm, u8 is_ip4, u8 is_add) |
|
static tcp_connection_t * | tcp_connection_get (u32 conn_index, u32 thread_index) |
|
static tcp_connection_t * | tcp_connection_get_if_valid (u32 conn_index, u32 thread_index) |
|
static tcp_connection_t * | tcp_get_connection_from_transport (transport_connection_t *tconn) |
|
static void | tcp_connection_set_state (tcp_connection_t *tc, tcp_state_t state) |
|
void | tcp_connection_close (tcp_connection_t *tc) |
| Begin connection closing procedure. More...
|
|
void | tcp_connection_cleanup (tcp_connection_t *tc) |
| Cleans up connection state. More...
|
|
void | tcp_connection_del (tcp_connection_t *tc) |
| Connection removal. More...
|
|
int | tcp_half_open_connection_cleanup (tcp_connection_t *tc) |
| Try to cleanup half-open connection. More...
|
|
tcp_connection_t * | tcp_connection_alloc (u8 thread_index) |
|
tcp_connection_t * | tcp_connection_alloc_w_base (u8 thread_index, tcp_connection_t *base) |
|
void | tcp_connection_free (tcp_connection_t *tc) |
|
void | tcp_connection_reset (tcp_connection_t *tc) |
| Notify session that connection has been reset. More...
|
|
int | tcp_configure_v4_source_address_range (vlib_main_t *vm, ip4_address_t *start, ip4_address_t *end, u32 table_id) |
| Configure an ipv4 source address range. More...
|
|
int | tcp_configure_v6_source_address_range (vlib_main_t *vm, ip6_address_t *start, ip6_address_t *end, u32 table_id) |
| Configure an ipv6 source address range. More...
|
|
void | tcp_api_reference (void) |
|
u8 * | format_tcp_connection (u8 *s, va_list *args) |
|
u8 * | format_tcp_connection_id (u8 *s, va_list *args) |
|
static tcp_connection_t * | tcp_listener_get (u32 tli) |
|
static tcp_connection_t * | tcp_half_open_connection_get (u32 conn_index) |
|
void | tcp_make_fin (tcp_connection_t *tc, vlib_buffer_t *b) |
| Convert buffer to FIN-ACK. More...
|
|
void | tcp_make_synack (tcp_connection_t *ts, vlib_buffer_t *b) |
| Convert buffer to SYN-ACK. More...
|
|
void | tcp_send_reset_w_pkt (tcp_connection_t *tc, vlib_buffer_t *pkt, u32 thread_index, u8 is_ip4) |
| Send reset without reusing existing buffer. More...
|
|
void | tcp_send_reset (tcp_connection_t *tc) |
| Build and set reset packet for connection. More...
|
|
void | tcp_send_syn (tcp_connection_t *tc) |
| Send SYN. More...
|
|
void | tcp_send_synack (tcp_connection_t *tc) |
|
void | tcp_send_fin (tcp_connection_t *tc) |
| Send FIN. More...
|
|
void | tcp_send_ack (tcp_connection_t *tc) |
|
void | tcp_update_burst_snd_vars (tcp_connection_t *tc) |
| Update burst send vars. More...
|
|
void | tcp_update_rto (tcp_connection_t *tc) |
|
void | tcp_flush_frames_to_output (tcp_worker_ctx_t *wrk) |
| Flush v4 and v6 tcp and ip-lookup tx frames for thread index. More...
|
|
void | tcp_send_window_update_ack (tcp_connection_t *tc) |
| Send window update ack. More...
|
|
void | tcp_program_ack (tcp_connection_t *tc) |
|
void | tcp_program_dupack (tcp_connection_t *tc) |
|
void | tcp_program_retransmit (tcp_connection_t *tc) |
|
void | tcp_bt_init (tcp_connection_t *tc) |
| Byte tracker initialize. More...
|
|
void | tcp_bt_cleanup (tcp_connection_t *tc) |
| Byte tracker cleanup. More...
|
|
void | tcp_bt_flush_samples (tcp_connection_t *tc) |
| Flush byte tracker samples. More...
|
|
void | tcp_bt_track_tx (tcp_connection_t *tc, u32 len) |
| Track a tcp tx burst. More...
|
|
void | tcp_bt_track_rxt (tcp_connection_t *tc, u32 start, u32 end) |
| Track a tcp retransmission. More...
|
|
void | tcp_bt_sample_delivery_rate (tcp_connection_t *tc, tcp_rate_sample_t *rs) |
| Generate a delivery rate sample from recently acked bytes. More...
|
|
void | tcp_bt_check_app_limited (tcp_connection_t *tc) |
| Check if sample to be generated is app limited. More...
|
|
int | tcp_bt_is_sane (tcp_byte_tracker_t *bt) |
| Check if the byte tracker is in sane state. More...
|
|
u8 * | format_tcp_bt (u8 *s, va_list *args) |
|
static u32 | tcp_end_seq (tcp_header_t *th, u32 len) |
|
static u32 | tcp_bytes_out (const tcp_connection_t *tc) |
| Our estimate of the number of bytes that have left the network. More...
|
|
static u32 | tcp_flight_size (const tcp_connection_t *tc) |
| Our estimate of the number of bytes in flight (pipe size) More...
|
|
static u32 | tcp_initial_cwnd (const tcp_connection_t *tc) |
| Initial cwnd as per RFC5681. More...
|
|
static void | tcp_cwnd_accumulate (tcp_connection_t *tc, u32 thresh, u32 bytes) |
|
static u32 | tcp_loss_wnd (const tcp_connection_t *tc) |
|
static u32 | tcp_available_snd_wnd (const tcp_connection_t *tc) |
|
static u32 | tcp_available_output_snd_space (const tcp_connection_t *tc) |
|
static u32 | tcp_available_cc_snd_space (const tcp_connection_t *tc) |
| Estimate of how many bytes we can still push into the network. More...
|
|
static u8 | tcp_is_lost_fin (tcp_connection_t *tc) |
|
u32 | tcp_snd_space (tcp_connection_t *tc) |
|
int | tcp_fastrecovery_prr_snd_space (tcp_connection_t *tc) |
| Estimate send space using proportional rate reduction (RFC6937) More...
|
|
fib_node_index_t | tcp_lookup_rmt_in_fib (tcp_connection_t *tc) |
|
void | tcp_update_sack_list (tcp_connection_t *tc, u32 start, u32 end) |
| Build SACK list as per RFC2018. More...
|
|
u32 | tcp_sack_list_bytes (tcp_connection_t *tc) |
|
static u32 | tcp_time_now (void) |
|
static u32 | tcp_time_now_w_thread (u32 thread_index) |
|
static u32 | tcp_tstamp (tcp_connection_t *tc) |
| Generate timestamp for tcp connection. More...
|
|
static f64 | tcp_time_now_us (u32 thread_index) |
|
static u32 | tcp_set_time_now (tcp_worker_ctx_t *wrk) |
|
u32 | tcp_session_push_header (transport_connection_t *tconn, vlib_buffer_t *b) |
|
int | tcp_session_custom_tx (void *conn, u32 max_burst_size) |
|
void | tcp_connection_timers_init (tcp_connection_t *tc) |
| Initialize all connection timers as invalid. More...
|
|
void | tcp_connection_timers_reset (tcp_connection_t *tc) |
| Stop all connection timers. More...
|
|
void | tcp_init_snd_vars (tcp_connection_t *tc) |
| Initialize connection send variables. More...
|
|
void | tcp_connection_init_vars (tcp_connection_t *tc) |
| Initialize tcp connection variables. More...
|
|
void | tcp_connection_tx_pacer_update (tcp_connection_t *tc) |
|
void | tcp_connection_tx_pacer_reset (tcp_connection_t *tc, u32 window, u32 start_bucket) |
|
static void | tcp_cc_rcv_ack (tcp_connection_t *tc, tcp_rate_sample_t *rs) |
|
static void | tcp_cc_rcv_cong_ack (tcp_connection_t *tc, tcp_cc_ack_t ack_type, tcp_rate_sample_t *rs) |
|
static void | tcp_cc_congestion (tcp_connection_t *tc) |
|
static void | tcp_cc_loss (tcp_connection_t *tc) |
|
static void | tcp_cc_recovered (tcp_connection_t *tc) |
|
static void | tcp_cc_undo_recovery (tcp_connection_t *tc) |
|
static void | tcp_cc_event (tcp_connection_t *tc, tcp_cc_event_t evt) |
|
static u64 | tcp_cc_get_pacing_rate (tcp_connection_t *tc) |
|
static void | tcp_timer_set (tcp_connection_t *tc, u8 timer_id, u32 interval) |
|
static void | tcp_timer_reset (tcp_connection_t *tc, u8 timer_id) |
|
static void | tcp_timer_update (tcp_connection_t *tc, u8 timer_id, u32 interval) |
|
static void | tcp_retransmit_timer_set (tcp_connection_t *tc) |
|
static void | tcp_retransmit_timer_reset (tcp_connection_t *tc) |
|
static void | tcp_retransmit_timer_force_update (tcp_connection_t *tc) |
|
static void | tcp_persist_timer_set (tcp_connection_t *tc) |
|
static void | tcp_persist_timer_update (tcp_connection_t *tc) |
|
static void | tcp_persist_timer_reset (tcp_connection_t *tc) |
|
static void | tcp_retransmit_timer_update (tcp_connection_t *tc) |
|
static u8 | tcp_timer_is_active (tcp_connection_t *tc, tcp_timers_e timer) |
|
void | tcp_rcv_sacks (tcp_connection_t *tc, u32 ack) |
|
u8 * | tcp_scoreboard_replay (u8 *s, tcp_connection_t *tc, u8 verbose) |
|
void | tcp_cc_algo_register (tcp_cc_algorithm_type_e type, const tcp_cc_algorithm_t *vft) |
| Register exiting cc algo type. More...
|
|
tcp_cc_algorithm_type_e | tcp_cc_algo_new_type (const tcp_cc_algorithm_t *vft) |
| Register new cc algo type. More...
|
|
tcp_cc_algorithm_t * | tcp_cc_algo_get (tcp_cc_algorithm_type_e type) |
|
static void * | tcp_cc_data (tcp_connection_t *tc) |
|
void | newreno_rcv_cong_ack (tcp_connection_t *tc, tcp_cc_ack_t ack_type, tcp_rate_sample_t *rs) |
|
static void * | vlib_buffer_push_tcp_net_order (vlib_buffer_t *b, u16 sp, u16 dp, u32 seq, u32 ack, u8 tcp_hdr_opts_len, u8 flags, u16 wnd) |
| Push TCP header to buffer. More...
|
|
static void * | vlib_buffer_push_tcp (vlib_buffer_t *b, u16 sp_net, u16 dp_net, u32 seq, u32 ack, u8 tcp_hdr_opts_len, u8 flags, u16 wnd) |
| Push TCP header to buffer. More...
|
|