![]() |
FD.io VPP
v21.01-8-g9330de53e
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 | tcp_maybe_inc_counter(node_id, err, count) |
| #define | tcp_inc_counter(node_id, err, count) |
| #define | tcp_maybe_inc_err_counter(cnts, err) |
| #define | tcp_inc_err_counter(cnts, err, val) |
| #define | tcp_store_err_counters(node_id, cnts) |
| #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_nolookup_node |
| (constructor) VLIB_REGISTER_NODE (tcp4_input_nolookup_node) More... | |
| vlib_node_registration_t | tcp6_input_nolookup_node |
| (constructor) VLIB_REGISTER_NODE (tcp6_input_nolookup_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 2750 of file tcp_input.c.
| #define foreach_tcp4_input_next |
Definition at line 2732 of file tcp_input.c.
| #define foreach_tcp6_input_next |
Definition at line 2741 of file tcp_input.c.
| #define foreach_tcp_state_next |
Definition at line 31 of file tcp_input.c.
| #define tcp_error | ( | n, | |
| s | |||
| ) | s, |
| #define tcp_inc_counter | ( | node_id, | |
| err, | |||
| count | |||
| ) |
Definition at line 1453 of file tcp_input.c.
| #define tcp_inc_err_counter | ( | cnts, | |
| err, | |||
| val | |||
| ) |
Definition at line 1461 of file tcp_input.c.
| #define tcp_maybe_inc_counter | ( | node_id, | |
| err, | |||
| count | |||
| ) |
Definition at line 1446 of file tcp_input.c.
| #define tcp_maybe_inc_err_counter | ( | cnts, | |
| err | |||
| ) |
Definition at line 1457 of file tcp_input.c.
| #define tcp_next_drop | ( | is_ip4 | ) |
Definition at line 81 of file tcp_input.c.
| #define tcp_next_output | ( | is_ip4 | ) |
Definition at line 78 of file tcp_input.c.
| #define tcp_store_err_counters | ( | node_id, | |
| cnts | |||
| ) |
Definition at line 1465 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 1372 of file tcp_input.c.
|
inlinestatic |
Definition at line 1475 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 2819 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 2546 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 2101 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 1784 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| VLIB_NODE_FN() tcp4_established_node | ( | vlib_main_t * | vm, |
| vlib_node_runtime_t * | node, | ||
| vlib_frame_t * | from_frame | ||
| ) |
| VLIB_NODE_FN() tcp4_input_node | ( | vlib_main_t * | vm, |
| vlib_node_runtime_t * | node, | ||
| vlib_frame_t * | from_frame | ||
| ) |
| VLIB_NODE_FN() tcp4_input_nolookup_node | ( | vlib_main_t * | vm, |
| vlib_node_runtime_t * | node, | ||
| vlib_frame_t * | from_frame | ||
| ) |
| VLIB_NODE_FN() tcp4_listen_node | ( | vlib_main_t * | vm, |
| vlib_node_runtime_t * | node, | ||
| vlib_frame_t * | from_frame | ||
| ) |
| VLIB_NODE_FN() tcp4_rcv_process_node | ( | vlib_main_t * | vm, |
| vlib_node_runtime_t * | node, | ||
| vlib_frame_t * | from_frame | ||
| ) |
| VLIB_NODE_FN() tcp4_syn_sent_node | ( | vlib_main_t * | vm, |
| vlib_node_runtime_t * | node, | ||
| vlib_frame_t * | from_frame | ||
| ) |
| VLIB_NODE_FN() tcp6_established_node | ( | vlib_main_t * | vm, |
| vlib_node_runtime_t * | node, | ||
| vlib_frame_t * | from_frame | ||
| ) |
| VLIB_NODE_FN() tcp6_input_node | ( | vlib_main_t * | vm, |
| vlib_node_runtime_t * | node, | ||
| vlib_frame_t * | from_frame | ||
| ) |
| VLIB_NODE_FN() tcp6_input_nolookup_node | ( | vlib_main_t * | vm, |
| vlib_node_runtime_t * | node, | ||
| vlib_frame_t * | from_frame | ||
| ) |
| VLIB_NODE_FN() tcp6_listen_node | ( | vlib_main_t * | vm, |
| vlib_node_runtime_t * | node, | ||
| vlib_frame_t * | from_frame | ||
| ) |
| VLIB_NODE_FN() tcp6_rcv_process_node | ( | vlib_main_t * | vm, |
| vlib_node_runtime_t * | node, | ||
| vlib_frame_t * | from_frame | ||
| ) |
| VLIB_NODE_FN() tcp6_syn_sent_node | ( | vlib_main_t * | vm, |
| vlib_node_runtime_t * | node, | ||
| vlib_frame_t * | from_frame | ||
| ) |
|
static |
Checks if ack is a congestion control event.
Definition at line 967 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Check if duplicate ack as per RFC5681 Sec.
2
Definition at line 954 of file tcp_input.c.
Here is the caller graph for this function:
|
static |
Definition at line 1252 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 693 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
One function to rule them all ...
and in the darkness bind them
Definition at line 821 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Init loss recovery/fast recovery.
Triggered by dup acks as opposed to timer timeout. Note that cwnd is updated in tcp_cc_handle_event after fast retransmit
Definition at line 667 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 712 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
static |
Definition at line 745 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 797 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 1750 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 1403 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 527 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Compute smoothed RTT as per VJ's '88 SIGCOMM and RFC6298.
Note that although in 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.
A known limitation of the algorithm is that a drop in rtt results in a rttvar increase and bigger RTO.
mrtt must be provided in TCP_TICK multiples, i.e., in us. Note that timestamps are measured as ms ticks so they must be converted before calling this function.
Definition at line 439 of file tcp_input.c.
Here is the caller graph for this function:
|
inlinestatic |
|
static |
Definition at line 1093 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 934 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Dequeue bytes for connections that have received acks in last burst.
Definition at line 562 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 157 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 2794 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
|
static |
Definition at line 2753 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Lookup transport connection.
Definition at line 1679 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 1612 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 1720 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 |
Process incoming ACK.
Definition at line 982 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
static |
Definition at line 1127 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Handle reset packet.
Programs disconnect/reset notification that should be sent later by calling tcp_handle_disconnects
Definition at line 207 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 128 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 112 of file tcp_input.c.
Here is the caller graph for this function:
|
static |
Receive buffer for connection and handle acks.
It handles both in order or out-of-order data.
Definition at line 1285 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 259 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Enqueue data for delivery to application.
Definition at line 1150 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Enqueue out-of-order data.
Definition at line 1201 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 1387 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
static |
Update rtt estimate.
We have potentially three sources of rtt measurements:
TSOPT difference between current and echoed timestamp. It has ms precision and can be computed per ack ACK timing one sequence number is tracked per rtt with us (micro second) precision. rate sample if enabled, all outstanding bytes are tracked with us precision. Every ack and sack are a rtt sample
Middle boxes are known to fiddle with TCP options so we give higher priority to ACK timing.
For now, rate sample rtts are only used under congestion.
Definition at line 473 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 618 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 138 of file tcp_input.c.
Here is the call graph for this function:
Here is the caller graph for this function:| vlib_node_registration_t tcp4_established_node |
(constructor) VLIB_REGISTER_NODE (tcp4_established_node)
Definition at line 1573 of file tcp_input.c.
| vlib_node_registration_t tcp4_input_node |
(constructor) VLIB_REGISTER_NODE (tcp4_input_node)
Definition at line 3007 of file tcp_input.c.
| vlib_node_registration_t tcp4_input_nolookup_node |
(constructor) VLIB_REGISTER_NODE (tcp4_input_nolookup_node)
Definition at line 2953 of file tcp_input.c.
| vlib_node_registration_t tcp4_listen_node |
(constructor) VLIB_REGISTER_NODE (tcp4_listen_node)
Definition at line 2683 of file tcp_input.c.
| vlib_node_registration_t tcp4_rcv_process_node |
(constructor) VLIB_REGISTER_NODE (tcp4_rcv_process_node)
Definition at line 2505 of file tcp_input.c.
| vlib_node_registration_t tcp4_syn_sent_node |
(constructor) VLIB_REGISTER_NODE (tcp4_syn_sent_node)
Definition at line 2059 of file tcp_input.c.
| vlib_node_registration_t tcp6_established_node |
(constructor) VLIB_REGISTER_NODE (tcp6_established_node)
Definition at line 1592 of file tcp_input.c.
| vlib_node_registration_t tcp6_input_node |
(constructor) VLIB_REGISTER_NODE (tcp6_input_node)
Definition at line 3027 of file tcp_input.c.
| vlib_node_registration_t tcp6_input_nolookup_node |
(constructor) VLIB_REGISTER_NODE (tcp6_input_nolookup_node)
Definition at line 2973 of file tcp_input.c.
| vlib_node_registration_t tcp6_listen_node |
(constructor) VLIB_REGISTER_NODE (tcp6_listen_node)
Definition at line 2702 of file tcp_input.c.
| vlib_node_registration_t tcp6_rcv_process_node |
(constructor) VLIB_REGISTER_NODE (tcp6_rcv_process_node)
Definition at line 2524 of file tcp_input.c.
| vlib_node_registration_t tcp6_syn_sent_node |
(constructor) VLIB_REGISTER_NODE (tcp6_syn_sent_node)
Definition at line 2078 of file tcp_input.c.
|
static |
Definition at line 24 of file tcp_input.c.