FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
tcp_input.c File Reference
+ 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
 

Functions

static u8 tcp_segment_in_rcv_wnd (tcp_connection_t *tc, u32 seq, u32 end_seq)
 Validate segment sequence number. More...
 
static int tcp_options_parse (tcp_header_t *th, tcp_options_t *to, u8 is_syn)
 Parse TCP header options. More...
 
static int tcp_segment_check_paws (tcp_connection_t *tc)
 RFC1323: Check against wrapped sequence numbers (PAWS). More...
 
static void tcp_update_timestamp (tcp_connection_t *tc, u32 seq, u32 seq_end)
 Update tsval recent. More...
 
static int tcp_segment_validate (tcp_worker_ctx_t *wrk, tcp_connection_t *tc0, vlib_buffer_t *b0, tcp_header_t *th0, u32 *error0)
 Validate incoming segment as per RFC793 p. More...
 
static int tcp_rcv_ack_no_cc (tcp_connection_t *tc, vlib_buffer_t *b, u32 *error)
 
static void tcp_estimate_rtt (tcp_connection_t *tc, u32 mrtt)
 Compute smoothed RTT as per VJ's '88 SIGCOMM and RFC6298. More...
 
void tcp_update_rto (tcp_connection_t *tc)
 
static int tcp_update_rtt (tcp_connection_t *tc, tcp_rate_sample_t *rs, u32 ack)
 Update RTT estimate and RTO timer. More...
 
static void tcp_estimate_initial_rtt (tcp_connection_t *tc)
 
static void tcp_handle_postponed_dequeues (tcp_worker_ctx_t *wrk)
 Dequeue bytes for connections that have received acks in last burst. More...
 
static void tcp_program_dequeue (tcp_worker_ctx_t *wrk, tcp_connection_t *tc)
 
static u32 scoreboard_hole_index (sack_scoreboard_t *sb, sack_scoreboard_hole_t *hole)
 
static u32 scoreboard_hole_bytes (sack_scoreboard_hole_t *hole)
 
sack_scoreboard_hole_tscoreboard_get_hole (sack_scoreboard_t *sb, u32 index)
 
sack_scoreboard_hole_tscoreboard_next_hole (sack_scoreboard_t *sb, sack_scoreboard_hole_t *hole)
 
sack_scoreboard_hole_tscoreboard_prev_hole (sack_scoreboard_t *sb, sack_scoreboard_hole_t *hole)
 
sack_scoreboard_hole_tscoreboard_first_hole (sack_scoreboard_t *sb)
 
sack_scoreboard_hole_tscoreboard_last_hole (sack_scoreboard_t *sb)
 
static void scoreboard_remove_hole (sack_scoreboard_t *sb, sack_scoreboard_hole_t *hole)
 
static sack_scoreboard_hole_tscoreboard_insert_hole (sack_scoreboard_t *sb, u32 prev_index, u32 start, u32 end)
 
static void scoreboard_update_sacked_rxt (sack_scoreboard_t *sb, u32 start, u32 end, u8 has_rxt)
 
static void scoreboard_update_bytes (sack_scoreboard_t *sb, u32 ack, u32 snd_mss)
 
sack_scoreboard_hole_tscoreboard_next_rxt_hole (sack_scoreboard_t *sb, sack_scoreboard_hole_t *start, u8 have_unsent, u8 *can_rescue, u8 *snd_limited)
 Figure out the next hole to retransmit. More...
 
void scoreboard_init_rxt (sack_scoreboard_t *sb, u32 snd_una)
 
void scoreboard_init (sack_scoreboard_t *sb)
 
void scoreboard_clear (sack_scoreboard_t *sb)
 
void scoreboard_clear_reneging (sack_scoreboard_t *sb, u32 start, u32 end)
 
static u8 tcp_scoreboard_is_sane_post_recovery (tcp_connection_t *tc)
 Test that scoreboard is sane after recovery. More...
 
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)
 Try to update snd_wnd based on feedback received from peer. More...
 
static void tcp_cc_init_congestion (tcp_connection_t *tc)
 Init loss recovery/fast recovery. More...
 
static void tcp_cc_congestion_undo (tcp_connection_t *tc)
 
static u8 tcp_cc_is_spurious_timeout_rxt (tcp_connection_t *tc)
 
static u8 tcp_cc_is_spurious_retransmit (tcp_connection_t *tc)
 
static u8 tcp_should_fastrecover_sack (tcp_connection_t *tc)
 
static u8 tcp_should_fastrecover (tcp_connection_t *tc, u8 has_sack)
 
static int tcp_cc_recover (tcp_connection_t *tc)
 
static void tcp_cc_update (tcp_connection_t *tc, tcp_rate_sample_t *rs)
 
static void tcp_cc_handle_event (tcp_connection_t *tc, tcp_rate_sample_t *rs, u32 is_dack)
 One function to rule them all ... More...
 
static void tcp_handle_old_ack (tcp_connection_t *tc, tcp_rate_sample_t *rs)
 
static u8 tcp_ack_is_dupack (tcp_connection_t *tc, vlib_buffer_t *b, u32 prev_snd_wnd, u32 prev_snd_una)
 Check if duplicate ack as per RFC5681 Sec. More...
 
static u8 tcp_ack_is_cc_event (tcp_connection_t *tc, vlib_buffer_t *b, u32 prev_snd_wnd, u32 prev_snd_una, u8 *is_dack)
 Checks if ack is a congestion control event. More...
 
static int tcp_rcv_ack (tcp_worker_ctx_t *wrk, tcp_connection_t *tc, vlib_buffer_t *b, tcp_header_t *th, u32 *error)
 Process incoming ACK. More...
 
static void tcp_program_disconnect (tcp_worker_ctx_t *wrk, tcp_connection_t *tc)
 
static void tcp_handle_disconnects (tcp_worker_ctx_t *wrk)
 
static void tcp_rcv_fin (tcp_worker_ctx_t *wrk, tcp_connection_t *tc, vlib_buffer_t *b, u32 *error)
 
static u8 tcp_sack_vector_is_sane (sack_block_t *sacks)
 
void tcp_update_sack_list (tcp_connection_t *tc, u32 start, u32 end)
 Build SACK list as per RFC2018. More...
 
u32 tcp_sack_list_bytes (tcp_connection_t *tc)
 
static int tcp_session_enqueue_data (tcp_connection_t *tc, vlib_buffer_t *b, u16 data_len)
 Enqueue data for delivery to application. More...
 
static int 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_buffer_discard_bytes (vlib_buffer_t *b, u32 n_bytes_to_drop)
 
static int tcp_segment_rcv (tcp_worker_ctx_t *wrk, tcp_connection_t *tc, vlib_buffer_t *b)
 Receive buffer for connection and handle acks. More...
 
static u8format_tcp_rx_trace (u8 *s, va_list *args)
 
static u8format_tcp_rx_trace_short (u8 *s, va_list *args)
 
static 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)
 
static void tcp_established_trace_frame (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_ip4)
 
static void tcp_node_inc_counter_i (vlib_main_t *vm, u32 tcp4_node, u32 tcp6_node, u8 is_ip4, u32 evt, u32 val)
 
static uword tcp46_established_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_ip4)
 
VLIB_NODE_FN() tcp4_established_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)
 
static u8 tcp_lookup_is_valid (tcp_connection_t *tc, vlib_buffer_t *b, tcp_header_t *hdr)
 
static tcp_connection_ttcp_lookup_connection (u32 fib_index, vlib_buffer_t *b, u8 thread_index, u8 is_ip4)
 Lookup transport connection. More...
 
static tcp_connection_ttcp_lookup_listener (vlib_buffer_t *b, u32 fib_index, int is_ip4)
 
static void tcp_check_tx_offload (tcp_connection_t *tc, int is_ipv4)
 
static uword tcp46_syn_sent_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, int is_ip4)
 
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_syn_sent_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
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...
 
VLIB_NODE_FN() tcp4_rcv_process_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)
 
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...
 
VLIB_NODE_FN() tcp4_listen_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)
 
static void tcp_input_trace_frame (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t **bs, u32 n_bufs, u8 is_ip4)
 
static void tcp_input_set_error_next (tcp_main_t *tm, u16 *next, u32 *error, u8 is_ip4)
 
static tcp_connection_ttcp_input_lookup_buffer (vlib_buffer_t *b, u8 thread_index, u32 *error, u8 is_ip4, u8 is_nolookup)
 
static void tcp_input_dispatch_buffer (tcp_main_t *tm, tcp_connection_t *tc, vlib_buffer_t *b, u16 *next, u32 *error)
 
static uword tcp46_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_ip4, u8 is_nolookup)
 
VLIB_NODE_FN() tcp4_input_nolookup_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() tcp4_input_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)
 
static void tcp_dispatch_table_init (tcp_main_t *tm)
 
static clib_error_ttcp_input_init (vlib_main_t *vm)
 

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...
 

Macro Definition Documentation

◆ filter_flags

#define filter_flags   (TCP_FLAG_SYN|TCP_FLAG_ACK|TCP_FLAG_RST|TCP_FLAG_FIN)

Definition at line 3440 of file tcp_input.c.

◆ foreach_tcp4_input_next

#define foreach_tcp4_input_next
Value:
_ (DROP, "ip4-drop") \
_ (LISTEN, "tcp4-listen") \
_ (RCV_PROCESS, "tcp4-rcv-process") \
_ (SYN_SENT, "tcp4-syn-sent") \
_ (ESTABLISHED, "tcp4-established") \
_ (RESET, "tcp4-reset") \
_ (PUNT, "ip4-punt")
DROP
Definition: error.def:41

Definition at line 3422 of file tcp_input.c.

◆ foreach_tcp6_input_next

#define foreach_tcp6_input_next
Value:
_ (DROP, "ip6-drop") \
_ (LISTEN, "tcp6-listen") \
_ (RCV_PROCESS, "tcp6-rcv-process") \
_ (SYN_SENT, "tcp6-syn-sent") \
_ (ESTABLISHED, "tcp6-established") \
_ (RESET, "tcp6-reset") \
_ (PUNT, "ip6-punt")
DROP
Definition: error.def:41

Definition at line 3431 of file tcp_input.c.

◆ foreach_tcp_state_next

#define foreach_tcp_state_next
Value:
_ (DROP4, "ip4-drop") \
_ (DROP6, "ip6-drop") \
_ (TCP4_OUTPUT, "tcp4-output") \
_ (TCP6_OUTPUT, "tcp6-output")

Definition at line 31 of file tcp_input.c.

◆ tcp_error

#define tcp_error (   n,
 
)    s,

◆ tcp_inc_counter

#define tcp_inc_counter (   node_id,
  err,
  count 
)
Value:
tcp_node_inc_counter_i (vm, tcp4_##node_id##_node.index, \
tcp6_##node_id##_node.index, is_ip4, \
err, count)
u8 count
Definition: dhcp.api:208
static void tcp_node_inc_counter_i(vlib_main_t *vm, u32 tcp4_node, u32 tcp6_node, u8 is_ip4, u32 evt, u32 val)
Definition: tcp_input.c:2108
vlib_main_t * vm
Definition: in2out_ed.c:1810
u8 is_ip4
Definition: lisp_gpe.api:232

Definition at line 2124 of file tcp_input.c.

◆ tcp_inc_err_counter

#define tcp_inc_err_counter (   cnts,
  err,
  val 
)
Value:
{ \
cnts[err] += val; \
}

Definition at line 2132 of file tcp_input.c.

◆ tcp_maybe_inc_counter

#define tcp_maybe_inc_counter (   node_id,
  err,
  count 
)
Value:
{ \
if (next0 != tcp_next_drop (is_ip4)) \
tcp_node_inc_counter_i (vm, tcp4_##node_id##_node.index, \
tcp6_##node_id##_node.index, is_ip4, err, \
1); \
}
#define tcp_next_drop(is_ip4)
Definition: tcp_input.c:81
vlib_main_t * vm
Definition: in2out_ed.c:1810
u8 is_ip4
Definition: lisp_gpe.api:232

Definition at line 2117 of file tcp_input.c.

◆ tcp_maybe_inc_err_counter

#define tcp_maybe_inc_err_counter (   cnts,
  err 
)
Value:
{ \
cnts[err] += (next0 != tcp_next_drop (is_ip4)); \
}
#define tcp_next_drop(is_ip4)
Definition: tcp_input.c:81
u8 is_ip4
Definition: lisp_gpe.api:232

Definition at line 2128 of file tcp_input.c.

◆ tcp_next_drop

#define tcp_next_drop (   is_ip4)
Value:
(is_ip4 ? TCP_NEXT_DROP4 \
: TCP_NEXT_DROP6)
u8 is_ip4
Definition: lisp_gpe.api:232

Definition at line 81 of file tcp_input.c.

◆ tcp_next_output

#define tcp_next_output (   is_ip4)
Value:
(is_ip4 ? TCP_NEXT_TCP4_OUTPUT \
: TCP_NEXT_TCP6_OUTPUT)
u8 is_ip4
Definition: lisp_gpe.api:232

Definition at line 78 of file tcp_input.c.

◆ tcp_store_err_counters

#define tcp_store_err_counters (   node_id,
  cnts 
)
Value:
{ \
int i; \
for (i = 0; i < TCP_N_ERROR; i++) \
if (cnts[i]) \
tcp_inc_counter(node_id, i, cnts[i]); \
}
int i

Definition at line 2136 of file tcp_input.c.

Typedef Documentation

◆ tcp_established_next_t

typedef enum _tcp_established_next tcp_established_next_t

◆ tcp_input_next_t

typedef enum _tcp_input_next tcp_input_next_t

◆ tcp_listen_next_t

typedef enum _tcp_listen_next tcp_listen_next_t

◆ tcp_rcv_process_next_t

typedef enum _tcp_rcv_process_next tcp_rcv_process_next_t

◆ tcp_state_next_t

typedef enum _tcp_state_next tcp_state_next_t

◆ tcp_syn_sent_next_t

typedef enum _tcp_syn_sent_next tcp_syn_sent_next_t

Function Documentation

◆ format_tcp_rx_trace()

static u8* format_tcp_rx_trace ( u8 s,
va_list *  args 
)
static

Definition at line 2027 of file tcp_input.c.

+ Here is the call graph for this function:

◆ format_tcp_rx_trace_short()

static u8* format_tcp_rx_trace_short ( u8 s,
va_list *  args 
)
static

Definition at line 2043 of file tcp_input.c.

+ Here is the call graph for this function:

◆ scoreboard_clear()

void scoreboard_clear ( sack_scoreboard_t sb)

Definition at line 927 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scoreboard_clear_reneging()

void scoreboard_clear_reneging ( sack_scoreboard_t sb,
u32  start,
u32  end 
)

Definition at line 946 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scoreboard_first_hole()

sack_scoreboard_hole_t* scoreboard_first_hole ( sack_scoreboard_t sb)

Definition at line 673 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ scoreboard_get_hole()

sack_scoreboard_hole_t* scoreboard_get_hole ( sack_scoreboard_t sb,
u32  index 
)

Definition at line 649 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ scoreboard_hole_bytes()

static u32 scoreboard_hole_bytes ( sack_scoreboard_hole_t hole)
static

Definition at line 643 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ scoreboard_hole_index()

static u32 scoreboard_hole_index ( sack_scoreboard_t sb,
sack_scoreboard_hole_t hole 
)
static

Definition at line 636 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ scoreboard_init()

void scoreboard_init ( sack_scoreboard_t sb)

Definition at line 919 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ scoreboard_init_rxt()

void scoreboard_init_rxt ( sack_scoreboard_t sb,
u32  snd_una 
)

Definition at line 905 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scoreboard_insert_hole()

static sack_scoreboard_hole_t* scoreboard_insert_hole ( sack_scoreboard_t sb,
u32  prev_index,
u32  start,
u32  end 
)
static

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:

◆ scoreboard_last_hole()

sack_scoreboard_hole_t* scoreboard_last_hole ( sack_scoreboard_t sb)

Definition at line 681 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ scoreboard_next_hole()

sack_scoreboard_hole_t* scoreboard_next_hole ( sack_scoreboard_t sb,
sack_scoreboard_hole_t hole 
)

Definition at line 657 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ scoreboard_next_rxt_hole()

sack_scoreboard_hole_t* scoreboard_next_rxt_hole ( sack_scoreboard_t sb,
sack_scoreboard_hole_t start,
u8  have_unsent,
u8 can_rescue,
u8 snd_limited 
)

Figure out the next hole to retransmit.

Follows logic proposed in RFC6675 Sec. 4, NextSeg()

Definition at line 845 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scoreboard_prev_hole()

sack_scoreboard_hole_t* scoreboard_prev_hole ( sack_scoreboard_t sb,
sack_scoreboard_hole_t hole 
)

Definition at line 665 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ scoreboard_remove_hole()

static void scoreboard_remove_hole ( sack_scoreboard_t sb,
sack_scoreboard_hole_t hole 
)
static

Definition at line 689 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scoreboard_update_bytes()

static void scoreboard_update_bytes ( sack_scoreboard_t sb,
u32  ack,
u32  snd_mss 
)
inlinestatic

Definition at line 772 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scoreboard_update_sacked_rxt()

static void scoreboard_update_sacked_rxt ( sack_scoreboard_t sb,
u32  start,
u32  end,
u8  has_rxt 
)
inlinestatic

Definition at line 761 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp46_established_inline()

static uword tcp46_established_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  is_ip4 
)
inlinestatic

Definition at line 2146 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp46_input_inline()

static uword tcp46_input_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  is_ip4,
u8  is_nolookup 
)
inlinestatic

Definition at line 3607 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp46_listen_inline()

static uword tcp46_listen_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
int  is_ip4 
)
inlinestatic

LISTEN state processing as per RFC 793 p.

65

Definition at line 3197 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp46_rcv_process_inline()

static uword tcp46_rcv_process_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
int  is_ip4 
)
inlinestatic

Handles reception for all states except LISTEN, SYN-SENT and ESTABLISHED as per RFC793 p.

64

Definition at line 2765 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp46_syn_sent_inline()

static uword tcp46_syn_sent_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
int  is_ip4 
)
inlinestatic

Definition at line 2455 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp4_established_node()

VLIB_NODE_FN() tcp4_established_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 2229 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp4_input_node()

VLIB_NODE_FN() tcp4_input_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 3771 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp4_input_nolookup_node()

VLIB_NODE_FN() tcp4_input_nolookup_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 3715 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp4_listen_node()

VLIB_NODE_FN() tcp4_listen_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 3360 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp4_rcv_process_node()

VLIB_NODE_FN() tcp4_rcv_process_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 3141 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp4_syn_sent_node()

VLIB_NODE_FN() tcp4_syn_sent_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 2708 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp6_established_node()

VLIB_NODE_FN() tcp6_established_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 2236 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp6_input_node()

VLIB_NODE_FN() tcp6_input_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 3778 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp6_input_nolookup_node()

VLIB_NODE_FN() tcp6_input_nolookup_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 3723 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp6_listen_node()

VLIB_NODE_FN() tcp6_listen_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 3366 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp6_rcv_process_node()

VLIB_NODE_FN() tcp6_rcv_process_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 3148 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp6_syn_sent_node()

VLIB_NODE_FN() tcp6_syn_sent_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 2715 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp_ack_is_cc_event()

static u8 tcp_ack_is_cc_event ( tcp_connection_t tc,
vlib_buffer_t b,
u32  prev_snd_wnd,
u32  prev_snd_una,
u8 is_dack 
)
static

Checks if ack is a congestion control event.

Definition at line 1552 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_ack_is_dupack()

static u8 tcp_ack_is_dupack ( tcp_connection_t tc,
vlib_buffer_t b,
u32  prev_snd_wnd,
u32  prev_snd_una 
)
inlinestatic

Check if duplicate ack as per RFC5681 Sec.

2

Definition at line 1539 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_buffer_discard_bytes()

static int tcp_buffer_discard_bytes ( vlib_buffer_t b,
u32  n_bytes_to_drop 
)
static

Definition at line 1921 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_can_delack()

static int tcp_can_delack ( tcp_connection_t tc)
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 1905 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_cc_congestion_undo()

static void tcp_cc_congestion_undo ( tcp_connection_t tc)
static

Definition at line 1268 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_cc_handle_event()

static void tcp_cc_handle_event ( tcp_connection_t tc,
tcp_rate_sample_t rs,
u32  is_dack 
)
static

One function to rule them all ...

and in the darkness bind them

Definition at line 1404 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_cc_init_congestion()

static void tcp_cc_init_congestion ( tcp_connection_t tc)
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 1242 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_cc_is_spurious_retransmit()

static u8 tcp_cc_is_spurious_retransmit ( tcp_connection_t tc)
inlinestatic

Definition at line 1287 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_cc_is_spurious_timeout_rxt()

static u8 tcp_cc_is_spurious_timeout_rxt ( tcp_connection_t tc)
inlinestatic

Definition at line 1278 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_cc_recover()

static int tcp_cc_recover ( tcp_connection_t tc)
static

Definition at line 1329 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_cc_update()

static void tcp_cc_update ( tcp_connection_t tc,
tcp_rate_sample_t rs 
)
static

Definition at line 1380 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_check_tx_offload()

static void tcp_check_tx_offload ( tcp_connection_t tc,
int  is_ipv4 
)
inlinestatic

Definition at line 2421 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_dispatch_table_init()

static void tcp_dispatch_table_init ( tcp_main_t tm)
static

Definition at line 3827 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_established_trace_frame()

static void tcp_established_trace_frame ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
u8  is_ip4 
)
static

Definition at line 2074 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_estimate_initial_rtt()

static void tcp_estimate_initial_rtt ( tcp_connection_t tc)
static

Definition at line 551 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_estimate_rtt()

static void tcp_estimate_rtt ( tcp_connection_t tc,
u32  mrtt 
)
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 454 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_handle_disconnects()

static void tcp_handle_disconnects ( tcp_worker_ctx_t wrk)
static

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:

◆ tcp_handle_old_ack()

static void tcp_handle_old_ack ( tcp_connection_t tc,
tcp_rate_sample_t rs 
)
static

Definition at line 1519 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_handle_postponed_dequeues()

static void tcp_handle_postponed_dequeues ( tcp_worker_ctx_t wrk)
static

Dequeue bytes for connections that have received acks in last burst.

Definition at line 582 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_input_dispatch_buffer()

static void tcp_input_dispatch_buffer ( tcp_main_t tm,
tcp_connection_t tc,
vlib_buffer_t b,
u16 next,
u32 error 
)
inlinestatic

Definition at line 3580 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_input_init()

static clib_error_t* tcp_input_init ( vlib_main_t vm)
static

Definition at line 4057 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp_input_lookup_buffer()

static tcp_connection_t* tcp_input_lookup_buffer ( vlib_buffer_t b,
u8  thread_index,
u32 error,
u8  is_ip4,
u8  is_nolookup 
)
inlinestatic

Definition at line 3484 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_input_set_error_next()

static void tcp_input_set_error_next ( tcp_main_t tm,
u16 next,
u32 error,
u8  is_ip4 
)
static

Definition at line 3465 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_input_trace_frame()

static void tcp_input_trace_frame ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_buffer_t **  bs,
u32  n_bufs,
u8  is_ip4 
)
static

Definition at line 3443 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_lookup_connection()

static tcp_connection_t* tcp_lookup_connection ( u32  fib_index,
vlib_buffer_t b,
u8  thread_index,
u8  is_ip4 
)
static

Lookup transport connection.

Definition at line 2350 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_lookup_is_valid()

static u8 tcp_lookup_is_valid ( tcp_connection_t tc,
vlib_buffer_t b,
tcp_header_t hdr 
)
static

Definition at line 2283 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_lookup_listener()

static tcp_connection_t* tcp_lookup_listener ( vlib_buffer_t b,
u32  fib_index,
int  is_ip4 
)
static

Definition at line 2391 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_node_inc_counter_i()

static void tcp_node_inc_counter_i ( vlib_main_t vm,
u32  tcp4_node,
u32  tcp6_node,
u8  is_ip4,
u32  evt,
u32  val 
)
inlinestatic

Definition at line 2108 of file tcp_input.c.

+ Here is the call graph for this function:

◆ tcp_options_parse()

static int tcp_options_parse ( tcp_header_t th,
tcp_options_t to,
u8  is_syn 
)
inlinestatic

Parse TCP header options.

Parameters
thTCP header
toTCP options data structure to be populated
is_synset if packet is syn
Returns
-1 if parsing failed

Definition at line 127 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_program_dequeue()

static void tcp_program_dequeue ( tcp_worker_ctx_t wrk,
tcp_connection_t tc 
)
static

Definition at line 624 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_program_disconnect()

static void tcp_program_disconnect ( tcp_worker_ctx_t wrk,
tcp_connection_t tc 
)
static

Definition at line 1667 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_rcv_ack()

static int tcp_rcv_ack ( tcp_worker_ctx_t wrk,
tcp_connection_t tc,
vlib_buffer_t b,
tcp_header_t th,
u32 error 
)
static

Process incoming ACK.

Definition at line 1567 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_rcv_ack_no_cc()

static int tcp_rcv_ack_no_cc ( tcp_connection_t tc,
vlib_buffer_t b,
u32 error 
)
inlinestatic

Definition at line 421 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_rcv_fin()

static void tcp_rcv_fin ( tcp_worker_ctx_t wrk,
tcp_connection_t tc,
vlib_buffer_t b,
u32 error 
)
static

Definition at line 1698 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_rcv_sacks()

void tcp_rcv_sacks ( tcp_connection_t tc,
u32  ack 
)

Definition at line 981 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_sack_list_bytes()

u32 tcp_sack_list_bytes ( tcp_connection_t tc)

Definition at line 1792 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_sack_vector_is_sane()

static u8 tcp_sack_vector_is_sane ( sack_block_t sacks)
static

Definition at line 1720 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_scoreboard_is_sane_post_recovery()

static u8 tcp_scoreboard_is_sane_post_recovery ( tcp_connection_t tc)
static

Test that scoreboard is sane after recovery.

Returns 1 if scoreboard is empty or if first hole beyond snd_una.

Definition at line 970 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_segment_check_paws()

static int tcp_segment_check_paws ( tcp_connection_t tc)
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 241 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_segment_in_rcv_wnd()

static u8 tcp_segment_in_rcv_wnd ( tcp_connection_t tc,
u32  seq,
u32  end_seq 
)
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:

◆ tcp_segment_rcv()

static int tcp_segment_rcv ( tcp_worker_ctx_t wrk,
tcp_connection_t tc,
vlib_buffer_t b 
)
static

Receive buffer for connection and handle acks.

It handles both in order or out-of-order data.

Definition at line 1954 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_segment_validate()

static int tcp_segment_validate ( tcp_worker_ctx_t wrk,
tcp_connection_t tc0,
vlib_buffer_t b0,
tcp_header_t th0,
u32 error0 
)
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.

Returns
0 if segments passes validation.

Definition at line 279 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_session_enqueue_data()

static int tcp_session_enqueue_data ( tcp_connection_t tc,
vlib_buffer_t b,
u16  data_len 
)
static

Enqueue data for delivery to application.

Definition at line 1803 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_session_enqueue_ooo()

static int tcp_session_enqueue_ooo ( tcp_connection_t tc,
vlib_buffer_t b,
u16  data_len 
)
static

Enqueue out-of-order data.

Definition at line 1850 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_set_rx_trace_data()

static 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 
)
static

Definition at line 2058 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_should_fastrecover()

static u8 tcp_should_fastrecover ( tcp_connection_t tc,
u8  has_sack 
)
inlinestatic

Definition at line 1301 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_should_fastrecover_sack()

static u8 tcp_should_fastrecover_sack ( tcp_connection_t tc)
inlinestatic

Definition at line 1293 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_update_rto()

void tcp_update_rto ( tcp_connection_t tc)

Definition at line 478 of file tcp_input.c.

+ Here is the caller graph for this function:

◆ tcp_update_rtt()

static int tcp_update_rtt ( tcp_connection_t tc,
tcp_rate_sample_t rs,
u32  ack 
)
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 497 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_update_sack_list()

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.

Parameters
tcTCP connection for which the SACK list is updated
startStart sequence number of the newest SACK block
endEnd sequence of the newest SACK block

Definition at line 1743 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_update_snd_wnd()

static void tcp_update_snd_wnd ( tcp_connection_t tc,
u32  seq,
u32  ack,
u32  snd_wnd 
)
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 1204 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tcp_update_timestamp()

static void tcp_update_timestamp ( tcp_connection_t tc,
u32  seq,
u32  seq_end 
)
inlinestatic

Update tsval recent.

Definition at line 251 of file tcp_input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ tcp4_established_node

vlib_node_registration_t tcp4_established_node
Initial value:
=
{
.name = "tcp4-established",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_ESTABLISHED_N_NEXT,
.next_nodes =
{
#define _(s,n)
},
.format_trace = format_tcp_rx_trace_short,
}
static u8 * format_tcp_rx_trace_short(u8 *s, va_list *args)
Definition: tcp_input.c:2043
unsigned int u32
Definition: types.h:88
#define foreach_tcp_state_next
Definition: tcp_input.c:31
static char * tcp_error_strings[]
Definition: tcp_input.c:24

(constructor) VLIB_REGISTER_NODE (tcp4_established_node)

Definition at line 2244 of file tcp_input.c.

◆ tcp4_input_node

vlib_node_registration_t tcp4_input_node
Initial value:
=
{
.name = "tcp4-input",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_INPUT_N_NEXT,
.next_nodes =
{
#define _(s,n)
},
.format_buffer = format_tcp_header,
.format_trace = format_tcp_rx_trace,
}
static u8 * format_tcp_rx_trace(u8 *s, va_list *args)
Definition: tcp_input.c:2027
unsigned int u32
Definition: types.h:88
#define foreach_tcp4_input_next
Definition: tcp_input.c:3422
format_function_t format_tcp_header
Definition: format.h:100
static char * tcp_error_strings[]
Definition: tcp_input.c:24

(constructor) VLIB_REGISTER_NODE (tcp4_input_node)

Definition at line 3786 of file tcp_input.c.

◆ tcp4_input_nolookup_node

vlib_node_registration_t tcp4_input_nolookup_node
Initial value:
=
{
.name = "tcp4-input-nolookup",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_INPUT_N_NEXT,
.next_nodes =
{
#define _(s,n)
},
.format_buffer = format_tcp_header,
.format_trace = format_tcp_rx_trace,
}
static u8 * format_tcp_rx_trace(u8 *s, va_list *args)
Definition: tcp_input.c:2027
unsigned int u32
Definition: types.h:88
#define foreach_tcp4_input_next
Definition: tcp_input.c:3422
format_function_t format_tcp_header
Definition: format.h:100
static char * tcp_error_strings[]
Definition: tcp_input.c:24

(constructor) VLIB_REGISTER_NODE (tcp4_input_nolookup_node)

Definition at line 3732 of file tcp_input.c.

◆ tcp4_listen_node

vlib_node_registration_t tcp4_listen_node
Initial value:
=
{
.name = "tcp4-listen",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_LISTEN_N_NEXT,
.next_nodes =
{
#define _(s,n)
},
.format_trace = format_tcp_rx_trace_short,
}
static u8 * format_tcp_rx_trace_short(u8 *s, va_list *args)
Definition: tcp_input.c:2043
unsigned int u32
Definition: types.h:88
#define foreach_tcp_state_next
Definition: tcp_input.c:31
static char * tcp_error_strings[]
Definition: tcp_input.c:24

(constructor) VLIB_REGISTER_NODE (tcp4_listen_node)

Definition at line 3373 of file tcp_input.c.

◆ tcp4_rcv_process_node

vlib_node_registration_t tcp4_rcv_process_node
Initial value:
=
{
.name = "tcp4-rcv-process",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_RCV_PROCESS_N_NEXT,
.next_nodes =
{
#define _(s,n)
},
.format_trace = format_tcp_rx_trace_short,
}
static u8 * format_tcp_rx_trace_short(u8 *s, va_list *args)
Definition: tcp_input.c:2043
unsigned int u32
Definition: types.h:88
#define foreach_tcp_state_next
Definition: tcp_input.c:31
static char * tcp_error_strings[]
Definition: tcp_input.c:24

(constructor) VLIB_REGISTER_NODE (tcp4_rcv_process_node)

Definition at line 3156 of file tcp_input.c.

◆ tcp4_syn_sent_node

vlib_node_registration_t tcp4_syn_sent_node
Initial value:
=
{
.name = "tcp4-syn-sent",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_SYN_SENT_N_NEXT,
.next_nodes =
{
#define _(s,n)
},
.format_trace = format_tcp_rx_trace_short,
}
static u8 * format_tcp_rx_trace_short(u8 *s, va_list *args)
Definition: tcp_input.c:2043
unsigned int u32
Definition: types.h:88
#define foreach_tcp_state_next
Definition: tcp_input.c:31
static char * tcp_error_strings[]
Definition: tcp_input.c:24

(constructor) VLIB_REGISTER_NODE (tcp4_syn_sent_node)

Definition at line 2723 of file tcp_input.c.

◆ tcp6_established_node

vlib_node_registration_t tcp6_established_node
Initial value:
=
{
.name = "tcp6-established",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_ESTABLISHED_N_NEXT,
.next_nodes =
{
#define _(s,n)
},
.format_trace = format_tcp_rx_trace_short,
}
static u8 * format_tcp_rx_trace_short(u8 *s, va_list *args)
Definition: tcp_input.c:2043
unsigned int u32
Definition: types.h:88
#define foreach_tcp_state_next
Definition: tcp_input.c:31
static char * tcp_error_strings[]
Definition: tcp_input.c:24

(constructor) VLIB_REGISTER_NODE (tcp6_established_node)

Definition at line 2263 of file tcp_input.c.

◆ tcp6_input_node

vlib_node_registration_t tcp6_input_node
Initial value:
=
{
.name = "tcp6-input",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_INPUT_N_NEXT,
.next_nodes =
{
#define _(s,n)
},
.format_buffer = format_tcp_header,
.format_trace = format_tcp_rx_trace,
}
static u8 * format_tcp_rx_trace(u8 *s, va_list *args)
Definition: tcp_input.c:2027
unsigned int u32
Definition: types.h:88
#define foreach_tcp6_input_next
Definition: tcp_input.c:3431
format_function_t format_tcp_header
Definition: format.h:100
static char * tcp_error_strings[]
Definition: tcp_input.c:24

(constructor) VLIB_REGISTER_NODE (tcp6_input_node)

Definition at line 3806 of file tcp_input.c.

◆ tcp6_input_nolookup_node

vlib_node_registration_t tcp6_input_nolookup_node
Initial value:
=
{
.name = "tcp6-input-nolookup",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_INPUT_N_NEXT,
.next_nodes =
{
#define _(s,n)
},
.format_buffer = format_tcp_header,
.format_trace = format_tcp_rx_trace,
}
static u8 * format_tcp_rx_trace(u8 *s, va_list *args)
Definition: tcp_input.c:2027
unsigned int u32
Definition: types.h:88
#define foreach_tcp6_input_next
Definition: tcp_input.c:3431
format_function_t format_tcp_header
Definition: format.h:100
static char * tcp_error_strings[]
Definition: tcp_input.c:24

(constructor) VLIB_REGISTER_NODE (tcp6_input_nolookup_node)

Definition at line 3752 of file tcp_input.c.

◆ tcp6_listen_node

vlib_node_registration_t tcp6_listen_node
Initial value:
=
{
.name = "tcp6-listen",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_LISTEN_N_NEXT,
.next_nodes =
{
#define _(s,n)
},
.format_trace = format_tcp_rx_trace_short,
}
static u8 * format_tcp_rx_trace_short(u8 *s, va_list *args)
Definition: tcp_input.c:2043
unsigned int u32
Definition: types.h:88
#define foreach_tcp_state_next
Definition: tcp_input.c:31
static char * tcp_error_strings[]
Definition: tcp_input.c:24

(constructor) VLIB_REGISTER_NODE (tcp6_listen_node)

Definition at line 3392 of file tcp_input.c.

◆ tcp6_rcv_process_node

vlib_node_registration_t tcp6_rcv_process_node
Initial value:
=
{
.name = "tcp6-rcv-process",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_RCV_PROCESS_N_NEXT,
.next_nodes =
{
#define _(s,n)
},
.format_trace = format_tcp_rx_trace_short,
}
static u8 * format_tcp_rx_trace_short(u8 *s, va_list *args)
Definition: tcp_input.c:2043
unsigned int u32
Definition: types.h:88
#define foreach_tcp_state_next
Definition: tcp_input.c:31
static char * tcp_error_strings[]
Definition: tcp_input.c:24

(constructor) VLIB_REGISTER_NODE (tcp6_rcv_process_node)

Definition at line 3175 of file tcp_input.c.

◆ tcp6_syn_sent_node

vlib_node_registration_t tcp6_syn_sent_node
Initial value:
=
{
.name = "tcp6-syn-sent",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_SYN_SENT_N_NEXT,
.next_nodes =
{
#define _(s,n)
},
.format_trace = format_tcp_rx_trace_short,
}
static u8 * format_tcp_rx_trace_short(u8 *s, va_list *args)
Definition: tcp_input.c:2043
unsigned int u32
Definition: types.h:88
#define foreach_tcp_state_next
Definition: tcp_input.c:31
static char * tcp_error_strings[]
Definition: tcp_input.c:24

(constructor) VLIB_REGISTER_NODE (tcp6_syn_sent_node)

Definition at line 2742 of file tcp_input.c.

◆ tcp_error_strings

char* tcp_error_strings[]
static
Initial value:
= {
#define tcp_error(n,s)
}

Definition at line 24 of file tcp_input.c.