27 #define TCP_TICK 0.001 28 #define THZ (u32) (1/TCP_TICK) 29 #define TCP_TSTAMP_RESOLUTION TCP_TICK 30 #define TCP_PAWS_IDLE 24 * 24 * 60 * 60 * THZ 31 #define TCP_FIB_RECHECK_PERIOD 1 * THZ 32 #define TCP_MAX_OPTION_SPACE 40 33 #define TCP_CC_DATA_SZ 24 35 #define TCP_DUPACK_THRESHOLD 3 36 #define TCP_MAX_RX_FIFO_SIZE 32 << 20 37 #define TCP_MIN_RX_FIFO_SIZE 4 << 10 38 #define TCP_IW_N_SEGMENTS 10 39 #define TCP_ALWAYS_ACK 1 40 #define TCP_USE_SACKS 1 43 #define foreach_tcp_fsm_state \ 46 _(SYN_SENT, "SYN_SENT") \ 47 _(SYN_RCVD, "SYN_RCVD") \ 48 _(ESTABLISHED, "ESTABLISHED") \ 49 _(CLOSE_WAIT, "CLOSE_WAIT") \ 50 _(FIN_WAIT_1, "FIN_WAIT_1") \ 51 _(LAST_ACK, "LAST_ACK") \ 52 _(CLOSING, "CLOSING") \ 53 _(FIN_WAIT_2, "FIN_WAIT_2") \ 54 _(TIME_WAIT, "TIME_WAIT") 56 typedef enum _tcp_state
58 #define _(sym, str) TCP_STATE_##sym, 70 #define foreach_tcp_timer \ 71 _(RETRANSMIT, "RETRANSMIT") \ 72 _(DELACK, "DELAYED ACK") \ 73 _(PERSIST, "PERSIST") \ 75 _(WAITCLOSE, "WAIT CLOSE") \ 76 _(RETRANSMIT_SYN, "RETRANSMIT SYN") \ 77 _(ESTABLISH, "ESTABLISH") \ 78 _(ESTABLISH_AO, "ESTABLISH_AO") \ 80 typedef enum _tcp_timers
82 #define _(sym, str) TCP_TIMER_##sym, 95 #define TCP_TIMER_HANDLE_INVALID ((u32) ~0) 98 #define TCP_TO_TIMER_TICK TCP_TICK*10 100 #define TCP_DELACK_TIME 1 101 #define TCP_ESTABLISH_TIME 750 102 #define TCP_SYN_RCVD_TIME 600 103 #define TCP_2MSL_TIME 300 104 #define TCP_CLOSEWAIT_TIME 20 105 #define TCP_TIMEWAIT_TIME 100 106 #define TCP_FINWAIT1_TIME 600 107 #define TCP_CLEANUP_TIME 1 108 #define TCP_TIMER_PERSIST_MIN 2 110 #define TCP_RTO_MAX 60 * THZ 111 #define TCP_RTO_MIN 0.2 * THZ 112 #define TCP_RTT_MAX 30 * THZ 113 #define TCP_RTO_SYN_RETRIES 3 114 #define TCP_RTO_INIT 1 * THZ 117 #define foreach_tcp_connection_flag \ 118 _(SNDACK, "Send ACK") \ 119 _(FINSNT, "FIN sent") \ 120 _(RECOVERY, "Recovery") \ 121 _(FAST_RECOVERY, "Fast Recovery") \ 122 _(DCNT_PENDING, "Disconnect pending") \ 123 _(HALF_OPEN_DONE, "Half-open completed") \ 124 _(FINPNDG, "FIN pending") \ 125 _(FRXT_PENDING, "Fast-retransmit pending") \ 126 _(FRXT_FIRST, "Fast-retransmit first again") \ 127 _(DEQ_PENDING, "Pending dequeue acked") \ 128 _(PSH_PENDING, "PSH pending") \ 129 _(FINRCVD, "FIN received") \ 131 typedef enum _tcp_connection_flag_bits
133 #define _(sym, str) TCP_CONN_##sym##_BIT, 139 typedef enum _tcp_connection_flag
141 #define _(sym, str) TCP_CONN_##sym = 1 << TCP_CONN_##sym##_BIT, 147 #define TCP_SCOREBOARD_TRACE (0) 148 #define TCP_MAX_SACK_BLOCKS 256 149 #define TCP_INVALID_SACK_HOLE_INDEX ((u32)~0) 151 typedef struct _scoreboard_trace_elt
160 typedef struct _sack_scoreboard_hole
169 typedef struct _sack_scoreboard
175 u32 last_sacked_bytes;
176 u32 last_bytes_delivered;
184 #if TCP_SCOREBOARD_TRACE 190 #if TCP_SCOREBOARD_TRACE 191 #define tcp_scoreboard_trace_add(_tc, _ack) \ 193 static u64 _group = 0; \ 194 sack_scoreboard_t *_sb = &_tc->sack_sb; \ 195 sack_block_t *_sack, *_sacks; \ 196 scoreboard_trace_elt_t *_elt; \ 199 _sacks = _tc->rcv_opts.sacks; \ 200 for (i = 0; i < vec_len (_sacks); i++) \ 202 _sack = &_sacks[i]; \ 203 vec_add2 (_sb->trace, _elt, 1); \ 204 _elt->start = _sack->start; \ 205 _elt->end = _sack->end; \ 206 _elt->ack = _elt->end == _ack ? _ack : 0; \ 207 _elt->snd_una_max = _elt->end == _ack ? _tc->snd_una_max : 0; \ 208 _elt->group = _group; \ 212 #define tcp_scoreboard_trace_add(_tc, _ack) 217 start,
u8 have_sent_1_smss,
233 typedef enum _tcp_cc_algorithm_type
241 typedef enum _tcp_cc_ack_t
248 typedef struct _tcp_connection
281 u32 tsval_recent_age;
318 u32 limited_transmit;
327 struct _tcp_cc_algorithm
339 #define tcp_fastrecovery_on(tc) (tc)->flags |= TCP_CONN_FAST_RECOVERY 340 #define tcp_fastrecovery_off(tc) (tc)->flags &= ~TCP_CONN_FAST_RECOVERY 341 #define tcp_recovery_on(tc) (tc)->flags |= TCP_CONN_RECOVERY 342 #define tcp_recovery_off(tc) (tc)->flags &= ~TCP_CONN_RECOVERY 343 #define tcp_in_fastrecovery(tc) ((tc)->flags & TCP_CONN_FAST_RECOVERY) 344 #define tcp_in_recovery(tc) ((tc)->flags & (TCP_CONN_RECOVERY)) 345 #define tcp_in_slowstart(tc) (tc->cwnd < tc->ssthresh) 346 #define tcp_disconnect_pending(tc) ((tc)->flags & TCP_CONN_DCNT_PENDING) 347 #define tcp_disconnect_pending_on(tc) ((tc)->flags |= TCP_CONN_DCNT_PENDING) 348 #define tcp_disconnect_pending_off(tc) ((tc)->flags &= ~TCP_CONN_DCNT_PENDING) 349 #define tcp_fastrecovery_first(tc) ((tc)->flags & TCP_CONN_FRXT_FIRST) 350 #define tcp_fastrecovery_first_on(tc) ((tc)->flags |= TCP_CONN_FRXT_FIRST) 351 #define tcp_fastrecovery_first_off(tc) ((tc)->flags &= ~TCP_CONN_FRXT_FIRST) 353 #define tcp_in_cong_recovery(tc) ((tc)->flags & \ 354 (TCP_CONN_FAST_RECOVERY | TCP_CONN_RECOVERY)) 359 tc->flags &= ~(TCP_CONN_FAST_RECOVERY | TCP_CONN_RECOVERY);
363 typedef enum _tcp_error
365 #define tcp_error(n,s) TCP_ERROR_##n, 371 typedef struct _tcp_lookup_dispatch
428 typedef struct _tcp_main
439 u8 log2_tstamp_clocks_per_tick;
440 f64 tstamp_ticks_per_clock;
453 u32 bytes_per_buffer;
459 uword *cc_algo_by_name;
476 u32 preallocated_connections;
477 u32 preallocated_half_open_connections;
481 u32 last_v4_address_rotor;
482 u32 last_v6_address_rotor;
492 f64 buffer_fail_fraction;
522 return &
tcp_main.wrk_ctx[thread_index];
533 #if (VLIB_BUFFER_TRACE_TRAJECTORY) 534 #define tcp_trajectory_add_start(b, start) \ 536 (*vlib_buffer_trace_trajectory_cb) (b, start); \ 539 #define tcp_trajectory_add_start(b, start) 558 if (
tcp_main.connections[thread_index] == 0)
614 u32 thread_index,
u8 is_ip4);
639 #define seq_lt(_s1, _s2) ((i32)((_s1)-(_s2)) < 0) 640 #define seq_leq(_s1, _s2) ((i32)((_s1)-(_s2)) <= 0) 641 #define seq_gt(_s1, _s2) ((i32)((_s1)-(_s2)) > 0) 642 #define seq_geq(_s1, _s2) ((i32)((_s1)-(_s2)) >= 0) 643 #define seq_max(_s1, _s2) (seq_gt((_s1), (_s2)) ? (_s1) : (_s2)) 646 #define timestamp_lt(_t1, _t2) ((i32)((_t1)-(_t2)) < 0) 647 #define timestamp_leq(_t1, _t2) ((i32)((_t1)-(_t2)) <= 0) 656 return tc->sack_sb.sacked_bytes + tc->sack_sb.lost_bytes;
658 return tc->rcv_dupacks * tc->snd_mss;
669 flight_size = (int) (tc->snd_nxt - tc->snd_una) -
tcp_bytes_out (tc)
676 (
"Negative: %u %u %u dupacks %u sacked bytes %u flags %d",
678 tc->snd_rxt_bytes, tc->rcv_dupacks, tc->sack_sb.sacked_bytes,
692 if (tc->snd_mss > 2190)
693 return 2 * tc->snd_mss;
694 else if (tc->snd_mss > 1095)
695 return 3 * tc->snd_mss;
697 return 4 * tc->snd_mss;
709 tc->cwnd_acc_bytes += bytes;
710 if (tc->cwnd_acc_bytes >= thresh)
712 u32 inc = tc->cwnd_acc_bytes / thresh;
713 tc->cwnd_acc_bytes -= inc * thresh;
714 tc->cwnd += inc * tc->snd_mss;
715 tc->cwnd =
clib_min (tc->cwnd, tc->tx_fifo_size);
728 return clib_min (tc->cwnd, tc->snd_wnd);
735 int flight_size = (int) (tc->snd_nxt - tc->snd_una);
737 if (available_wnd <= flight_size)
740 return available_wnd - flight_size;
752 if (available_wnd <= flight_size)
755 return available_wnd - flight_size;
761 if ((tc->flags & TCP_CONN_FINSNT) && tc->snd_una_max - tc->snd_una == 1)
793 return tcp_main.wrk_ctx[thread_index].time_now;
823 tc->cc_algo->rcv_ack (tc);
824 tc->tsecr_last_ack = tc->rcv_opts.tsecr;
832 tc->timers[timer_id] =
833 tw_timer_start_16t_2w_512sl (&
tcp_main.
834 wrk_ctx[tc->c_thread_index].timer_wheel,
835 tc->c_c_index, timer_id, interval);
845 tw_timer_stop_16t_2w_512sl (&
tcp_main.
846 wrk_ctx[tc->c_thread_index].timer_wheel,
847 tc->timers[timer_id]);
856 tw_timer_update_16t_2w_512sl (&
tcp_main.
857 wrk_ctx[tc->c_thread_index].timer_wheel,
858 tc->timers[timer_id], interval);
860 tc->timers[timer_id] =
861 tw_timer_start_16t_2w_512sl (&
tcp_main.
862 wrk_ctx[tc->c_thread_index].timer_wheel,
863 tc->c_c_index, timer_id, interval);
869 ASSERT (tc->snd_una != tc->snd_una_max);
913 if (tc->snd_una == tc->snd_nxt)
916 if (tc->snd_wnd < tc->snd_mss)
930 #define tcp_validate_txf_size(_tc, _a) \ 931 ASSERT(_tc->state != TCP_STATE_ESTABLISHED \ 932 || transport_max_tx_dequeue (&_tc->connection) >= _a) 945 return (
void *) tc->cc_data;
976 th->seq_number = seq;
977 th->ack_number = ack;
978 th->data_offset_and_reserved = (tcp_hdr_opts_len >> 2) << 4;
982 th->urgent_pointer = 0;
1005 clib_host_to_net_u32 (seq),
1006 clib_host_to_net_u32 (ack),
1007 tcp_hdr_opts_len, flags,
1008 clib_host_to_net_u16 (wnd));
vlib_node_registration_t tcp6_listen_node
(constructor) VLIB_REGISTER_NODE (tcp6_listen_node)
static vlib_cli_command_t trace
(constructor) VLIB_CLI_COMMAND (trace)
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
u32 * pending_acks
vector of pending acks
u32 * pending_disconnects
vector of pending disconnect notifications
void scoreboard_clear(sack_scoreboard_t *sb)
static f64 tcp_time_now_us(u32 thread_index)
static void tcp_retransmit_timer_set(tcp_connection_t *tc)
void tcp_make_fin(tcp_connection_t *tc, vlib_buffer_t *b)
Convert buffer to FIN-ACK.
struct _sack_block sack_block_t
void tcp_cc_init_congestion(tcp_connection_t *tc)
Init loss recovery/fast recovery.
struct _scoreboard_trace_elt scoreboard_trace_elt_t
void tcp_connection_timers_reset(tcp_connection_t *tc)
Stop all connection timers.
static f64 transport_time_now(u32 thread_index)
#define TCP_TO_TIMER_TICK
vlib_node_registration_t tcp4_output_node
(constructor) VLIB_REGISTER_NODE (tcp4_output_node)
void scoreboard_init(sack_scoreboard_t *sb)
static u32 tcp_bytes_out(const tcp_connection_t *tc)
Our estimate of the number of bytes that have left the network.
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
static tcp_connection_t * tcp_connection_get_if_valid(u32 conn_index, u32 thread_index)
void tcp_connection_del(tcp_connection_t *tc)
Connection removal.
struct _sack_scoreboard sack_scoreboard_t
void tcp_update_sack_list(tcp_connection_t *tc, u32 start, u32 end)
Build SACK list as per RFC2018.
u32 tcp_snd_space(tcp_connection_t *tc)
static tcp_connection_t * tcp_half_open_connection_get(u32 conn_index)
sack_scoreboard_hole_t * scoreboard_last_hole(sack_scoreboard_t *sb)
sack_scoreboard_hole_t * scoreboard_next_hole(sack_scoreboard_t *sb, sack_scoreboard_hole_t *hole)
#define VLIB_BUFFER_PRE_DATA_SIZE
static_always_inline void clib_spinlock_unlock_if_init(clib_spinlock_t *p)
struct _tcp_main tcp_main_t
vlib_node_registration_t tcp6_output_node
(constructor) VLIB_REGISTER_NODE (tcp6_output_node)
static u64 clib_cpu_time_now(void)
timer_expiration_handler tcp_timer_retransmit_handler
u8 * format_tcp_scoreboard(u8 *s, va_list *args)
u32 tcp_session_push_header(transport_connection_t *tconn, vlib_buffer_t *b)
struct _tcp_lookup_dispatch tcp_lookup_dispatch_t
void tcp_connection_tx_pacer_update(tcp_connection_t *tc)
void tcp_update_burst_snd_vars(tcp_connection_t *tc)
Update burst send vars.
struct _tcp_connection tcp_connection_t
static u32 tcp_available_cc_snd_space(const tcp_connection_t *tc)
Estimate of how many bytes we can still push into the network.
static u32 tcp_available_snd_wnd(const tcp_connection_t *tc)
static tcp_connection_t * tcp_get_connection_from_transport(transport_connection_t *tconn)
void tcp_connection_cleanup(tcp_connection_t *tc)
Cleans up connection state.
static void tcp_cc_rcv_ack(tcp_connection_t *tc)
format_function_t format_tcp_flags
u32 * ongoing_fast_rxt
vector of connections now doing fast rxt
struct _tcp_header tcp_header_t
void tcp_connection_reset(tcp_connection_t *tc)
Notify session that connection has been reset.
u32 * pending_deq_acked
vector of pending ack dequeues
struct _sack_scoreboard_hole sack_scoreboard_hole_t
vlib_node_registration_t tcp4_syn_sent_node
(constructor) VLIB_REGISTER_NODE (tcp4_syn_sent_node)
u8 * tcp_scoreboard_replay(u8 *s, tcp_connection_t *tc, u8 verbose)
static void tcp_connection_set_state(tcp_connection_t *tc, tcp_state_t state)
sack_scoreboard_hole_t * scoreboard_get_hole(sack_scoreboard_t *sb, u32 index)
static u32 tcp_available_output_snd_space(const tcp_connection_t *tc)
int tcp_retransmit_first_unacked(tcp_worker_ctx_t *wrk, tcp_connection_t *tc)
Retransmit first unacked segment.
static tcp_header_t * tcp_buffer_hdr(vlib_buffer_t *b)
static timer_callback_t * timers
tw_timer_wheel_16t_2w_512sl_t timer_wheel
worker timer wheel
enum _tcp_state tcp_state_t
vhost_vring_state_t state
timer_expiration_handler tcp_timer_retransmit_syn_handler
static u32 tcp_time_now(void)
static ct_connection_t * connections
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.
void tcp_api_reference(void)
#define TCP_EVT_DBG(_evt, _args...)
static void tcp_timer_set(tcp_connection_t *tc, u8 timer_id, u32 interval)
void tcp_do_fastretransmits(tcp_worker_ctx_t *wrk)
struct tcp_worker_ctx_ tcp_worker_ctx_t
vlib_main_t * vm
convenience pointer to this thread's vlib main
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
timer_expiration_handler tcp_timer_persist_handler
u32 * postponed_fast_rxt
vector of connections that will do fast rxt
vlib_node_registration_t tcp6_syn_sent_node
(constructor) VLIB_REGISTER_NODE (tcp6_syn_sent_node)
u32 tcp_sack_list_bytes(tcp_connection_t *tc)
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.
void tcp_rcv_sacks(tcp_connection_t *tc, u32 ack)
int tcp_fast_retransmit_sack(tcp_worker_ctx_t *wrk, tcp_connection_t *tc, u32 burst_size)
Do fast retransmit with SACKs.
clib_error_t * vnet_tcp_enable_disable(vlib_main_t *vm, u8 is_en)
void tcp_send_syn(tcp_connection_t *tc)
Send SYN.
static void * tcp_cc_data(tcp_connection_t *tc)
sack_scoreboard_hole_t * scoreboard_prev_hole(sack_scoreboard_t *sb, sack_scoreboard_hole_t *hole)
#define TCP_TIMER_HANDLE_INVALID
static u32 tcp_flight_size(const tcp_connection_t *tc)
Our estimate of the number of bytes in flight (pipe size)
tcp_connection_t * tcp_connection_alloc(u8 thread_index)
void tcp_connection_tx_pacer_reset(tcp_connection_t *tc, u32 window, u32 start_bucket)
void tcp_cc_algo_register(tcp_cc_algorithm_type_e type, const tcp_cc_algorithm_t *vft)
enum _tcp_cc_ack_t tcp_cc_ack_t
static void tcp_cwnd_accumulate(tcp_connection_t *tc, u32 thresh, u32 bytes)
static void tcp_timer_reset(tcp_connection_t *tc, u8 timer_id)
vlib_node_registration_t tcp4_listen_node
(constructor) VLIB_REGISTER_NODE (tcp4_listen_node)
enum _tcp_error tcp_error_t
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.
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.
static_always_inline uword vlib_get_thread_index(void)
void tcp_send_reset(tcp_connection_t *tc)
Build and set reset packet for connection.
void tcp_punt_unknown(vlib_main_t *vm, u8 is_ip4, u8 is_add)
format_function_t format_tcp_state
void tcp_program_ack(tcp_worker_ctx_t *wrk, tcp_connection_t *tc)
#define clib_warning(format, args...)
enum _tcp_timers tcp_timers_e
struct _transport_connection transport_connection_t
int tcp_half_open_connection_cleanup(tcp_connection_t *tc)
Try to cleanup half-open connection.
u32 fib_node_index_t
A typedef of a node index.
void tcp_connection_timers_init(tcp_connection_t *tc)
Initialize all connection timers as invalid.
void tcp_make_synack(tcp_connection_t *ts, vlib_buffer_t *b)
Convert buffer to SYN-ACK.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
format_function_t format_tcp_rcv_sacks
vlib_node_registration_t tcp6_input_node
(constructor) VLIB_REGISTER_NODE (tcp6_input_node)
fib_node_index_t tcp_lookup_rmt_in_fib(tcp_connection_t *tc)
void tcp_program_fastretransmit(tcp_worker_ctx_t *wrk, tcp_connection_t *tc)
void tcp_send_synack(tcp_connection_t *tc)
static void tcp_timer_update(tcp_connection_t *tc, u8 timer_id, u32 interval)
enum _tcp_cc_algorithm_type tcp_cc_algorithm_type_e
void tcp_flush_frames_to_output(tcp_worker_ctx_t *wrk)
Flush v4 and v6 tcp and ip-lookup tx frames for thread index.
enum _tcp_connection_flag_bits tcp_connection_flag_bits_e
void tcp_connection_init_vars(tcp_connection_t *tc)
Initialize tcp connection variables.
vlib_node_registration_t tcp4_rcv_process_node
(constructor) VLIB_REGISTER_NODE (tcp4_rcv_process_node)
u8 * format_tcp_connection(u8 *s, va_list *args)
static u32 tcp_end_seq(tcp_header_t *th, u32 len)
vlib_node_registration_t tcp6_established_node
(constructor) VLIB_REGISTER_NODE (tcp6_established_node)
#define tcp_fastrecovery_first_off(tc)
void tcp_flush_frame_to_output(tcp_worker_ctx_t *wrk, u8 is_ip4)
Flush tx frame populated by retransmits and timer pops.
struct _tcp_cc_algorithm tcp_cc_algorithm_t
static u32 tcp_time_now_w_thread(u32 thread_index)
struct _vlib_node_registration vlib_node_registration_t
struct tcp_iss_seed_ tcp_iss_seed_t
static void tcp_persist_timer_update(tcp_connection_t *tc)
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.
static void * vlib_buffer_push_uninit(vlib_buffer_t *b, u8 size)
Prepend uninitialized data to buffer.
vlib_node_registration_t tcp4_input_node
(constructor) VLIB_REGISTER_NODE (tcp4_input_node)
tcp_cc_algorithm_t * tcp_cc_algo_get(tcp_cc_algorithm_type_e type)
static u32 tcp_initial_cwnd(const tcp_connection_t *tc)
Initial cwnd as per RFC5681.
vlib_node_registration_t tcp6_rcv_process_node
(constructor) VLIB_REGISTER_NODE (tcp6_rcv_process_node)
#define foreach_tcp_fsm_state
TCP FSM state definitions as per RFC793.
void tcp_send_fin(tcp_connection_t *tc)
Send FIN.
#define foreach_tcp_connection_flag
TCP connection flags.
#define foreach_tcp_timer
TCP timers.
void() timer_expiration_handler(u32 index)
static u8 tcp_is_lost_fin(tcp_connection_t *tc)
sack_scoreboard_hole_t * scoreboard_first_hole(sack_scoreboard_t *sb)
static tcp_worker_ctx_t * tcp_get_worker(u32 thread_index)
static void tcp_retransmit_timer_update(tcp_connection_t *tc)
VLIB buffer representation.
int tcp_fast_retransmit_no_sack(tcp_worker_ctx_t *wrk, tcp_connection_t *tc, u32 burst_size)
Fast retransmit without SACK info.
int tcp_fast_retransmit(tcp_worker_ctx_t *wrk, tcp_connection_t *tc, u32 burst_size)
Do fast retransmit.
void tcp_init_snd_vars(tcp_connection_t *tc)
Initialize connection send variables.
void tcp_connection_close(tcp_connection_t *tc)
Begin connection closing procedure.
static void tcp_retransmit_timer_force_update(tcp_connection_t *tc)
static tcp_connection_t * tcp_connection_get(u32 conn_index, u32 thread_index)
void tcp_update_rto(tcp_connection_t *tc)
u32 * pending_fast_rxt
vector of connections needing fast rxt
void tcp_init_mss(tcp_connection_t *tc)
enum _tcp_connection_flag tcp_connection_flags_e
format_function_t format_tcp_sacks
#define TCP_TIMER_PERSIST_MIN
#define tcp_opts_sack_permitted(_to)
void tcp_send_acks(tcp_worker_ctx_t *wrk)
void newreno_rcv_cong_ack(tcp_connection_t *tc, tcp_cc_ack_t ack_type)
static u32 tcp_loss_wnd(const tcp_connection_t *tc)
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.
static void tcp_persist_timer_set(tcp_connection_t *tc)
static tcp_main_t * vnet_get_tcp_main()
static void tcp_cong_recovery_off(tcp_connection_t *tc)
timer_expiration_handler tcp_timer_delack_handler
void tcp_connection_free(tcp_connection_t *tc)
static_always_inline void clib_spinlock_lock_if_init(clib_spinlock_t *p)
static void tcp_retransmit_timer_reset(tcp_connection_t *tc)
void tcp_program_dupack(tcp_worker_ctx_t *wrk, tcp_connection_t *tc)
void tcp_cc_fastrecovery_exit(tcp_connection_t *tc)
static u32 tcp_set_time_now(tcp_worker_ctx_t *wrk)
static u8 tcp_timer_is_active(tcp_connection_t *tc, tcp_timers_e timer)
static tcp_connection_t * tcp_listener_get(u32 tli)
u32 * tx_buffers
tx buffer free list
vlib_node_registration_t tcp4_established_node
(constructor) VLIB_REGISTER_NODE (tcp4_established_node)
static void tcp_persist_timer_reset(tcp_connection_t *tc)