|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
35 typedef enum _tcp_error
37 #define tcp_error(n,s) TCP_ERROR_##n,
43 typedef struct _tcp_lookup_dispatch
48 #define foreach_tcp_wrk_stat \
49 _(timer_expirations, u64, "timer expirations") \
50 _(rxt_segs, u64, "segments retransmitted") \
51 _(tr_events, u32, "timer retransmit events") \
52 _(to_closewait, u32, "timeout close-wait") \
53 _(to_closewait2, u32, "timeout close-wait w/data") \
54 _(to_finwait1, u32, "timeout fin-wait-1") \
55 _(to_finwait2, u32, "timeout fin-wait-2") \
56 _(to_lastack, u32, "timeout last-ack") \
57 _(to_closing, u32, "timeout closing") \
58 _(tr_abort, u32, "timer retransmit abort") \
59 _(rst_unread, u32, "reset on close due to unread data") \
60 _(no_buffer, u32, "out of buffers") \
64 #define _(name, type, str) type name;
128 #define tcp_worker_stats_inc(_wrk,_stat,_val) \
129 _wrk->stats._stat += _val
207 typedef struct _tcp_main
216 u32 bytes_per_buffer;
219 u32 ipl_next_node[2];
231 uword *cc_algo_by_name;
246 u32 last_v4_addr_rotor;
249 u32 last_v6_addr_rotor;
272 #define tcp_cfg tcp_main.cfg
273 #define tcp_node_index(node_id, is_ip4) \
274 ((is_ip4) ? tcp4_##node_id##_node.index : tcp6_##node_id##_node.index)
335 ip6_address_t * start,
347 #define tcp_validate_txf_size(_tc, _a) \
348 ASSERT(_tc->state != TCP_STATE_ESTABLISHED \
349 || transport_max_tx_dequeue (&_tc->connection) >= _a)
tcp_connection_t * tcp_connection_alloc_w_base(u8 thread_index, tcp_connection_t **base)
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.
void tcp_connection_close(tcp_connection_t *tc)
Begin connection closing procedure.
u32 time_tstamp
Time measured in TCP_TSTAMP_TICK used for time stamps.
fib_node_index_t tcp_lookup_rmt_in_fib(tcp_connection_t *tc)
int tcp_half_open_connection_cleanup(tcp_connection_t *tc)
Try to cleanup half-open connection.
u32 finwait2_time
Timer ticks to wait in fin-wait2 for fin.
#define foreach_tcp_wrk_stat
u32 max_gso_size
Maxium allowed GSO packet size.
void tcp_connection_del(tcp_connection_t *tc)
Connection removal.
void tcp_connection_cleanup(tcp_connection_t *tc)
Cleans up connection state.
void tcp_connection_timers_reset(tcp_connection_t *tc)
Stop all connection timers.
format_function_t format_tcp_state
u32 * pending_deq_acked
vector of pending ack dequeues
void tcp_init_snd_vars(tcp_connection_t *tc)
Initialize connection send variables.
vlib_node_registration_t tcp6_output_node
(constructor) VLIB_REGISTER_NODE (tcp6_output_node)
struct tcp_configuration_ tcp_configuration_t
u16 default_mtu
Default MTU to be used when establishing connections.
void tcp_send_synack(tcp_connection_t *tc)
void tcp_send_ack(tcp_connection_t *tc)
struct tcp_free_req_ tcp_cleanup_req_t
u32 max_rx_fifo
Max rx fifo size for a session (in bytes).
struct _tcp_connection tcp_connection_t
tcp_connection_t * tcp_connection_alloc(u8 thread_index)
u16 initial_cwnd_multiplier
Initial CWND multiplier, which multiplies MSS to determine initial CWND.
static tcp_main_t * vnet_get_tcp_main()
u8 enable_tx_pacing
Enable tx pacing for new connections.
timer_expiration_handler tcp_timer_persist_handler
static tcp_worker_ctx_t * tcp_get_worker(u32 thread_index)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
u32 min_rx_fifo
Min rx fifo for a session (in bytes)
format_function_t format_tcp_connection
struct _transport_connection transport_connection_t
struct _tcp_lookup_dispatch tcp_lookup_dispatch_t
u32 * pending_disconnects
vector of pending disconnect notifications
vlib_node_registration_t tcp4_input_node
(constructor) VLIB_REGISTER_NODE (tcp4_input_node)
struct _tcp_main tcp_main_t
format_function_t format_tcp_rcv_sacks
u32 * pending_resets
vector of pending reset notifications
tcp_timer_wheel_t timer_wheel
worker timer wheel
ip6_address_t * ip6_src_addrs
void tcp_program_cleanup(tcp_worker_ctx_t *wrk, tcp_connection_t *tc)
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
tcp_cc_algorithm_type_e cc_algo
Default congestion control algorithm type.
vlib_node_registration_t tcp4_output_node
(constructor) VLIB_REGISTER_NODE (tcp4_output_node)
u32 tco_next_node[2]
Session layer edge indices to tcp output.
void tcp_send_window_update_ack(tcp_connection_t *tc)
Send window update ack.
struct tcp_iss_seed_ tcp_iss_seed_t
void tcp_check_gso(tcp_connection_t *tc)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
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.
f32 cleanup_time
Time to wait (sec) before cleaning up the connection.
u32 * tx_buffers
tx buffer free list
enum _tcp_error tcp_error_t
void tcp_send_syn(tcp_connection_t *tc)
Send SYN.
clib_error_t * vnet_tcp_enable_disable(vlib_main_t *vm, u8 is_en)
vlib_node_registration_t tcp6_listen_node
(constructor) VLIB_REGISTER_NODE (tcp6_listen_node)
tcp_connection_t * connections
worker's pool of connections
format_function_t format_tcp_connection_id
f64 end
end of the time range
enum _tcp_cc_algorithm_type tcp_cc_algorithm_type_e
format_function_t format_tcp_flags
u32 fib_node_index_t
A typedef of a node index.
u8 allow_tso
Allow use of TSO whenever available.
vlib_node_registration_t tcp4_syn_sent_node
(constructor) VLIB_REGISTER_NODE (tcp4_syn_sent_node)
u8 cached_opts[40]
cached 'on the wire' options for bursts
f64 time_us
Time used for high precision (us) measurements in seconds.
void tcp_program_ack(tcp_connection_t *tc)
void tcp_program_dupack(tcp_connection_t *tc)
void tcp_connection_tx_pacer_reset(tcp_connection_t *tc, u32 window, u32 start_bucket)
vlib_node_registration_t tcp4_established_node
(constructor) VLIB_REGISTER_NODE (tcp4_established_node)
vlib_node_registration_t tcp6_input_node
(constructor) VLIB_REGISTER_NODE (tcp6_input_node)
struct _vlib_node_registration vlib_node_registration_t
vlib_node_registration_t tcp6_rcv_process_node
(constructor) VLIB_REGISTER_NODE (tcp6_rcv_process_node)
u32 preallocated_connections
Number of preallocated connections.
void tcp_punt_unknown(vlib_main_t *vm, u8 is_ip4, u8 is_add)
void tcp_update_burst_snd_vars(tcp_connection_t *tc)
Update burst send vars.
void tcp_program_retransmit(tcp_connection_t *tc)
u8 csum_offload
Set if csum offloading is enabled.
void tcp_send_reset(tcp_connection_t *tc)
Build and set reset packet for connection.
vlib_node_registration_t tcp6_syn_sent_node
(constructor) VLIB_REGISTER_NODE (tcp6_syn_sent_node)
u32 finwait1_time
Timer ticks to wait in fin-wait1 to send fin and rcv fin-ack.
u32 alloc_err_timeout
Timer ticks to wait for free buffer.
void tcp_connection_free(tcp_connection_t *tc)
vlib_node_registration_t tcp4_rcv_process_node
(constructor) VLIB_REGISTER_NODE (tcp4_rcv_process_node)
u32 lastack_time
Timer ticks to wait in last ack for ack.
struct tcp_worker_ctx_ tcp_worker_ctx_t
int tcp_session_custom_tx(void *conn, transport_send_params_t *sp)
void() timer_expiration_handler(tcp_connection_t *tc)
void tcp_connection_tx_pacer_update(tcp_connection_t *tc)
clib_time_type_t free_time
vlib_node_registration_t tcp6_established_node
(constructor) VLIB_REGISTER_NODE (tcp6_established_node)
struct _tcp_cc_algorithm tcp_cc_algorithm_t
u32 closing_time
Timer ticks to wait in closing for fin ack.
vlib_main_t * vm
convenience pointer to this thread's vlib main
void tcp_reschedule(tcp_connection_t *tc)
u32 timewait_time
Timer ticks to wait in time-wait.
struct tcp_wrk_stats_ tcp_wrk_stats_t
u32 tcp_session_push_header(transport_connection_t *tconn, vlib_buffer_t *b)
timer_expiration_handler tcp_timer_retransmit_handler
f64 buffer_fail_fraction
Fault-injection.
ip4_address_t * ip4_src_addrs
Vectors of src addresses.
tw_timer_wheel_tcp_twsl_t tcp_timer_wheel_t
void tcp_connection_timers_init(tcp_connection_t *tc)
Initialize all connection timers as invalid.
int tcp_fastrecovery_prr_snd_space(tcp_connection_t *tc)
Estimate send space using proportional rate reduction (RFC6937)
timer_expiration_handler tcp_timer_retransmit_syn_handler
u32 tcp_snd_space(tcp_connection_t *tc)
u32 closewait_time
Timer ticks to wait for close from app.
vlib_node_registration_t tcp4_listen_node
(constructor) VLIB_REGISTER_NODE (tcp4_listen_node)
tcp_cleanup_req_t * pending_cleanups
void tcp_connection_init_vars(tcp_connection_t *tc)
Initialize tcp connection variables.
u32 rwnd_min_update_ack
Min rwnd, as number of snd_mss segments, for update ack to be sent after a zero rwnd advertisement.
format_function_t format_tcp_sacks
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.
void tcp_send_fin(tcp_connection_t *tc)
Send FIN.
VLIB buffer representation.