|
static u8 | tcp_segment_in_rcv_wnd (tcp_connection_t *tc, u32 seq, u32 end_seq) |
| Validate segment sequence number. More...
|
|
void | tcp_options_parse (tcp_header_t *th, tcp_options_t *to) |
|
static int | tcp_segment_check_paws (tcp_connection_t *tc) |
|
static int | tcp_segment_validate (vlib_main_t *vm, tcp_connection_t *tc0, vlib_buffer_t *b0, tcp_header_t *th0, u32 *next0) |
| Validate incoming segment as per RFC793 p. More...
|
|
static int | tcp_rcv_ack_is_acceptable (tcp_connection_t *tc0, vlib_buffer_t *tb0) |
|
static void | tcp_estimate_rtt (tcp_connection_t *tc, u32 mrtt) |
| Compute smoothed RTT as per VJ's '88 SIGCOMM and RFC6298. More...
|
|
static int | tcp_update_rtt (tcp_connection_t *tc, u32 ack) |
| Update RTT estimate and RTO timer. More...
|
|
static void | tcp_dequeue_acked (tcp_connection_t *tc, u32 ack) |
| Dequeue bytes that have been acked and while at it update RTT estimates. More...
|
|
static u8 | tcp_ack_is_dupack (tcp_connection_t *tc, vlib_buffer_t *b, u32 new_snd_wnd) |
| Check if dupack as per RFC5681 Sec. More...
|
|
void | scoreboard_remove_hole (sack_scoreboard_t *sb, sack_scoreboard_hole_t *hole) |
|
sack_scoreboard_hole_t * | scoreboard_insert_hole (sack_scoreboard_t *sb, sack_scoreboard_hole_t *prev, u32 start, u32 end) |
|
static void | tcp_rcv_sacks (tcp_connection_t *tc, u32 ack) |
|
static void | tcp_update_snd_wnd (tcp_connection_t *tc, u32 seq, u32 ack, u32 snd_wnd) |
| Update snd_wnd. More...
|
|
static void | tcp_cc_congestion (tcp_connection_t *tc) |
|
static void | tcp_cc_recover (tcp_connection_t *tc) |
|
static void | tcp_cc_rcv_ack (tcp_connection_t *tc) |
|
static void | tcp_cc_rcv_dupack (tcp_connection_t *tc, u32 ack) |
|
void | tcp_cc_init (tcp_connection_t *tc) |
|
static int | tcp_rcv_ack (tcp_connection_t *tc, vlib_buffer_t *b, tcp_header_t *th, u32 *next, u32 *error) |
|
static void | tcp_update_sack_list (tcp_connection_t *tc, u32 start, u32 end) |
| Build SACK list as per RFC2018. More...
|
|
static u32 | tcp_session_enqueue_data (tcp_connection_t *tc, vlib_buffer_t *b, u16 data_len) |
| Enqueue data for delivery to application. More...
|
|
static u32 | tcp_session_enqueue_ooo (tcp_connection_t *tc, vlib_buffer_t *b, u16 data_len) |
| Enqueue out-of-order data. More...
|
|
static int | tcp_can_delack (tcp_connection_t *tc) |
| Check if ACK could be delayed. More...
|
|
static int | tcp_segment_rcv (tcp_main_t *tm, tcp_connection_t *tc, vlib_buffer_t *b, u16 n_data_bytes, u32 *next0) |
|
void | delack_timers_init (tcp_main_t *tm, u32 thread_index) |
|
static uword | tcp46_established_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, int is_ip4) |
|
static uword | tcp4_established (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) |
|
static uword | tcp6_established (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) |
|
| VLIB_NODE_FUNCTION_MULTIARCH (tcp4_established_node, tcp4_established) |
|
| VLIB_NODE_FUNCTION_MULTIARCH (tcp6_established_node, tcp6_established) |
|
static uword | tcp46_syn_sent_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, int is_ip4) |
|
static uword | tcp4_syn_sent (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) |
|
static uword | tcp6_syn_sent_rcv (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) |
|
| VLIB_NODE_FUNCTION_MULTIARCH (tcp4_syn_sent_node, tcp4_syn_sent) |
|
| VLIB_NODE_FUNCTION_MULTIARCH (tcp6_syn_sent_node, tcp6_syn_sent_rcv) |
|
static uword | tcp46_rcv_process_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, int is_ip4) |
| Handles reception for all states except LISTEN, SYN-SENT and ESTABLISHED as per RFC793 p. More...
|
|
static uword | tcp4_rcv_process (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) |
|
static uword | tcp6_rcv_process (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) |
|
| VLIB_NODE_FUNCTION_MULTIARCH (tcp4_rcv_process_node, tcp4_rcv_process) |
|
| VLIB_NODE_FUNCTION_MULTIARCH (tcp6_rcv_process_node, tcp6_rcv_process) |
|
static uword | tcp46_listen_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, int is_ip4) |
| LISTEN state processing as per RFC 793 p. More...
|
|
static uword | tcp4_listen (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) |
|
static uword | tcp6_listen (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) |
|
| VLIB_NODE_FUNCTION_MULTIARCH (tcp4_listen_node, tcp4_listen) |
|
| VLIB_NODE_FUNCTION_MULTIARCH (tcp6_listen_node, tcp6_listen) |
|
u8 * | format_tcp_rx_trace (u8 *s, va_list *args) |
|
static uword | tcp46_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, int is_ip4) |
|
static uword | tcp4_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) |
|
static uword | tcp6_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) |
|
| VLIB_NODE_FUNCTION_MULTIARCH (tcp4_input_node, tcp4_input) |
|
| VLIB_NODE_FUNCTION_MULTIARCH (tcp6_input_node, tcp6_input) |
|
void | tcp_update_time (f64 now, u32 thread_index) |
|
static void | tcp_dispatch_table_init (tcp_main_t *tm) |
|
clib_error_t * | tcp_input_init (vlib_main_t *vm) |
|
Compute smoothed RTT as per VJ's '88 SIGCOMM and RFC6298.
Note that although the original article, srtt and rttvar are scaled to minimize round-off errors, here we don't. Instead, we rely on better precision time measurements.
TODO support us rtt resolution
Definition at line 318 of file tcp_input.c.
Validate segment sequence number.
As per RFC793:
Segment Receive Test Length Window
0 0 SEG.SEQ = RCV.NXT 0 >0 RCV.NXT =< SEG.SEQ < RCV.NXT+RCV.WND >0 0 not acceptable >0 >0 RCV.NXT =< SEG.SEQ < RCV.NXT+RCV.WND or RCV.NXT =< SEG.SEQ+SEG.LEN-1 < RCV.NXT+RCV.WND
This ultimately consists in checking if segment falls within the window. The one important difference compared to RFC793 is that we use rcv_las, or the rcv_nxt at last ack sent instead of rcv_nxt since that's the peer's reference when computing our receive window.
This accepts only segments within the window.
Definition at line 101 of file tcp_input.c.