![]() |
FD.io VPP
v18.04-17-g3a0d853
Vector Packet Processing
|
Include dependency graph for tcp_input.c:Go to the source code of this file.
Data Structures | |
| struct | tcp_rx_trace_t |
Macros | |
| #define | tcp_error(n, s) s, |
| #define | foreach_tcp_state_next |
| #define | tcp_next_output(is_ip4) |
| #define | tcp_next_drop(is_ip4) |
| #define | foreach_tcp4_input_next |
| #define | foreach_tcp6_input_next |
| #define | filter_flags (TCP_FLAG_SYN|TCP_FLAG_ACK|TCP_FLAG_RST|TCP_FLAG_FIN) |
Typedefs | |
| typedef enum _tcp_established_next | tcp_established_next_t |
| typedef enum _tcp_rcv_process_next | tcp_rcv_process_next_t |
| typedef enum _tcp_syn_sent_next | tcp_syn_sent_next_t |
| typedef enum _tcp_listen_next | tcp_listen_next_t |
| typedef enum _tcp_state_next | tcp_state_next_t |
| typedef enum _tcp_input_next | tcp_input_next_t |
Variables | |
| static char * | tcp_error_strings [] |
| vlib_node_registration_t | tcp4_established_node |
| (constructor) VLIB_REGISTER_NODE (tcp4_established_node) More... | |
| vlib_node_registration_t | tcp6_established_node |
| (constructor) VLIB_REGISTER_NODE (tcp6_established_node) More... | |
| vlib_node_registration_t | tcp4_syn_sent_node |
| (constructor) VLIB_REGISTER_NODE (tcp4_syn_sent_node) More... | |
| vlib_node_registration_t | tcp6_syn_sent_node |
| (constructor) VLIB_REGISTER_NODE (tcp6_syn_sent_node) More... | |
| vlib_node_registration_t | tcp4_rcv_process_node |
| (constructor) VLIB_REGISTER_NODE (tcp4_rcv_process_node) More... | |
| vlib_node_registration_t | tcp6_rcv_process_node |
| (constructor) VLIB_REGISTER_NODE (tcp6_rcv_process_node) More... | |
| vlib_node_registration_t | tcp4_listen_node |
| (constructor) VLIB_REGISTER_NODE (tcp4_listen_node) More... | |
| vlib_node_registration_t | tcp6_listen_node |
| (constructor) VLIB_REGISTER_NODE (tcp6_listen_node) More... | |
| vlib_node_registration_t | tcp4_input_node |
| (constructor) VLIB_REGISTER_NODE (tcp4_input_node) More... | |
| vlib_node_registration_t | tcp6_input_node |
| (constructor) VLIB_REGISTER_NODE (tcp6_input_node) More... | |
| #define filter_flags (TCP_FLAG_SYN|TCP_FLAG_ACK|TCP_FLAG_RST|TCP_FLAG_FIN) |
Definition at line 2929 of file tcp_input.c.
| #define foreach_tcp4_input_next |
Definition at line 2911 of file tcp_input.c.
| #define foreach_tcp6_input_next |
Definition at line 2920 of file tcp_input.c.
| #define foreach_tcp_state_next |
Definition at line 29 of file tcp_input.c.
| #define tcp_error | ( | n, | |
| s | |||
| ) | s, |
| #define tcp_next_drop | ( | is_ip4 | ) |
Definition at line 79 of file tcp_input.c.
| #define tcp_next_output | ( | is_ip4 | ) |
Definition at line 76 of file tcp_input.c.
| typedef enum _tcp_established_next tcp_established_next_t |
| typedef enum _tcp_input_next tcp_input_next_t |
| typedef enum _tcp_listen_next tcp_listen_next_t |
| typedef enum _tcp_rcv_process_next tcp_rcv_process_next_t |
| typedef enum _tcp_state_next tcp_state_next_t |
| typedef enum _tcp_syn_sent_next tcp_syn_sent_next_t |
Definition at line 1647 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void scoreboard_init_high_rxt | ( | sack_scoreboard_t * | sb, |
| u32 | seq | ||
| ) |
Definition at line 697 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| sack_scoreboard_hole_t* scoreboard_insert_hole | ( | sack_scoreboard_t * | sb, |
| u32 | prev_index, | ||
| u32 | start, | ||
| u32 | end | ||
| ) |
Definition at line 561 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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.
Follows logic proposed in RFC6675 Sec. 4, NextSeg()
Definition at line 642 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void scoreboard_remove_hole | ( | sack_scoreboard_t * | sb, |
| sack_scoreboard_hole_t * | hole | ||
| ) |
Definition at line 526 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void scoreboard_update_bytes | ( | tcp_connection_t * | tc, |
| sack_scoreboard_t * | sb | ||
| ) |
Definition at line 598 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1690 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 2932 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
LISTEN state processing as per RFC 793 p.
65
Definition at line 2679 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Handles reception for all states except LISTEN, SYN-SENT and ESTABLISHED as per RFC793 p.
64
Definition at line 2285 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1956 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1815 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Definition at line 2839 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 2615 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 2220 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Checks if ack is a congestion control event.
Definition at line 514 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Check if duplicate ack as per RFC5681 Sec.
2
Definition at line 501 of file tcp_input.c.
Here is the caller graph for this function:
|
static |
Definition at line 1516 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Check if ACK could be delayed.
If ack can be delayed, it should return true for a full frame. If we're always acking return 0.
Definition at line 1500 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 962 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void tcp_cc_fastrecovery_exit | ( | tcp_connection_t * | tc | ) |
|
static |
One function to rule them all ...
and in the darkness bind them
Definition at line 1044 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void tcp_cc_init | ( | tcp_connection_t * | tc | ) |
Definition at line 1204 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void tcp_cc_init_congestion | ( | tcp_connection_t * | tc | ) |
|
static |
| int tcp_cc_recover | ( | tcp_connection_t * | tc | ) |
Definition at line 985 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 938 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1006 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Dequeue bytes that have been acked and while at it update RTT estimates.
Definition at line 481 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
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 396 of file tcp_input.c.
Here is the caller graph for this function:| clib_error_t* tcp_input_init | ( | vlib_main_t * | vm | ) |
|
static |
Lookup transport connection.
Definition at line 1915 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1877 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1677 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int tcp_options_parse | ( | tcp_header_t * | th, |
| tcp_options_t * | to | ||
| ) |
Parse TCP header options.
| th | TCP header |
| to | TCP options data structure to be populated |
Definition at line 127 of file tcp_input.c.
Here is the caller graph for this function:
|
static |
Process incoming ACK.
Definition at line 1214 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
| void tcp_rcv_sacks | ( | tcp_connection_t * | tc, |
| u32 | ack | ||
| ) |
Definition at line 724 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
| u8 tcp_scoreboard_is_sane_post_recovery | ( | tcp_connection_t * | tc | ) |
Test that scoreboard is sane after recovery.
Returns 1 if scoreboard is empty or if first hole beyond snd_una.
Definition at line 716 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
RFC1323: Check against wrapped sequence numbers (PAWS).
If we have timestamp to echo and it's less than tsval_recent, drop segment but still send an ACK in order to retain TCP's mechanism for detecting and recovering from half-open connections
Or at least that's what the theory says. It seems that this might not work very well with packet reordering and fast retransmit. XXX
Definition at line 236 of file tcp_input.c.
Here is the caller graph for this function:
|
inlinestatic |
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: seq_leq (end_seq, tc->rcv_las + tc->rcv_wnd) && seq_geq (seq, tc->rcv_las) however, is too strict when we have retransmits. Instead we just check that the seq is not beyond the right edge and that the end of the segment is not less than the left edge.
N.B. rcv_nxt and rcv_wnd are both updated in this node if acks are sent, so use rcv_nxt in the right edge window test instead of rcv_las.
Definition at line 113 of file tcp_input.c.
Here is the caller graph for this function:
|
static |
Definition at line 1544 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Validate incoming segment as per RFC793 p.
69 and RFC1323 p. 19
It first verifies if segment has a wrapped sequence number (PAWS) and then does the processing associated to the first four steps (ignoring security and precedence): sequence number, rst bit and syn bit checks.
Definition at line 274 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Enqueue data for delivery to application.
Definition at line 1382 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Enqueue out-of-order data.
Definition at line 1442 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void tcp_set_rx_trace_data | ( | tcp_rx_trace_t * | t0, |
| tcp_connection_t * | tc0, | ||
| tcp_header_t * | th0, | ||
| vlib_buffer_t * | b0, | ||
| u8 | is_ip4 | ||
| ) |
Definition at line 1662 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1034 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
| void tcp_update_rto | ( | tcp_connection_t * | tc | ) |
|
static |
Update RTT estimate and RTO timer.
Measure RTT: We have two sources of RTT measurements: TSOPT and ACK timing. Middle boxes are known to fiddle with TCP options so we should give higher priority to ACK timing.
This should be called only if previously sent bytes have been acked.
return 1 if valid rtt 0 otherwise
Definition at line 437 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void tcp_update_sack_list | ( | tcp_connection_t * | tc, |
| u32 | start, | ||
| u32 | end | ||
| ) |
Build SACK list as per RFC2018.
Makes sure the first block contains the segment that generated the current ACK and the following ones are the ones most recently reported in SACK blocks.
| tc | TCP connection for which the SACK list is updated |
| start | Start sequence number of the newest SACK block |
| end | End sequence of the newest SACK block |
Definition at line 1327 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Try to update snd_wnd based on feedback received from peer.
If successful, and new window is 'effectively' 0, activate persist timer.
Definition at line 897 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Update tsval recent.
Definition at line 246 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| VLIB_NODE_FUNCTION_MULTIARCH | ( | tcp4_established_node | , |
| tcp4_established | |||
| ) |
Here is the caller graph for this function:| VLIB_NODE_FUNCTION_MULTIARCH | ( | tcp6_established_node | , |
| tcp6_established | |||
| ) |
| VLIB_NODE_FUNCTION_MULTIARCH | ( | tcp4_syn_sent_node | , |
| tcp4_syn_sent | |||
| ) |
| VLIB_NODE_FUNCTION_MULTIARCH | ( | tcp6_syn_sent_node | , |
| tcp6_syn_sent_rcv | |||
| ) |
| VLIB_NODE_FUNCTION_MULTIARCH | ( | tcp4_rcv_process_node | , |
| tcp4_rcv_process | |||
| ) |
| VLIB_NODE_FUNCTION_MULTIARCH | ( | tcp6_rcv_process_node | , |
| tcp6_rcv_process | |||
| ) |
| VLIB_NODE_FUNCTION_MULTIARCH | ( | tcp4_listen_node | , |
| tcp4_listen | |||
| ) |
| VLIB_NODE_FUNCTION_MULTIARCH | ( | tcp6_listen_node | , |
| tcp6_listen | |||
| ) |
| VLIB_NODE_FUNCTION_MULTIARCH | ( | tcp4_input_node | , |
| tcp4_input | |||
| ) |
| VLIB_NODE_FUNCTION_MULTIARCH | ( | tcp6_input_node | , |
| tcp6_input | |||
| ) |
| vlib_node_registration_t tcp4_established_node |
(constructor) VLIB_REGISTER_NODE (tcp4_established_node)
Definition at line 82 of file tcp_input.c.
| vlib_node_registration_t tcp4_input_node |
(constructor) VLIB_REGISTER_NODE (tcp4_input_node)
Definition at line 2896 of file tcp_input.c.
| vlib_node_registration_t tcp4_listen_node |
(constructor) VLIB_REGISTER_NODE (tcp4_listen_node)
Definition at line 2672 of file tcp_input.c.
| vlib_node_registration_t tcp4_rcv_process_node |
(constructor) VLIB_REGISTER_NODE (tcp4_rcv_process_node)
Definition at line 2277 of file tcp_input.c.
| vlib_node_registration_t tcp4_syn_sent_node |
(constructor) VLIB_REGISTER_NODE (tcp4_syn_sent_node)
Definition at line 1873 of file tcp_input.c.
| vlib_node_registration_t tcp6_established_node |
(constructor) VLIB_REGISTER_NODE (tcp6_established_node)
Definition at line 83 of file tcp_input.c.
| vlib_node_registration_t tcp6_input_node |
(constructor) VLIB_REGISTER_NODE (tcp6_input_node)
Definition at line 2897 of file tcp_input.c.
| vlib_node_registration_t tcp6_listen_node |
(constructor) VLIB_REGISTER_NODE (tcp6_listen_node)
Definition at line 2673 of file tcp_input.c.
| vlib_node_registration_t tcp6_rcv_process_node |
(constructor) VLIB_REGISTER_NODE (tcp6_rcv_process_node)
Definition at line 2278 of file tcp_input.c.
| vlib_node_registration_t tcp6_syn_sent_node |
(constructor) VLIB_REGISTER_NODE (tcp6_syn_sent_node)
Definition at line 1874 of file tcp_input.c.
|
static |
Definition at line 22 of file tcp_input.c.