FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
tcp_output.c File Reference
+ Include dependency graph for tcp_output.c:

Go to the source code of this file.

Data Structures

struct  tcp_tx_trace_t
 

Macros

#define foreach_tcp4_output_next
 
#define foreach_tcp6_output_next
 
#define tcp_error(n, s)   s,
 
#define scoreboard_rescue_rxt_valid(_sb, _tc)
 
#define foreach_tcp4_reset_next
 
#define foreach_tcp6_reset_next
 

Typedefs

typedef enum _tcp_output_next tcp_output_next_t
 
typedef enum _tcp_reset_next tcp_reset_next_t
 

Functions

static u8format_tcp_tx_trace (u8 *s, va_list *args)
 
static u8 tcp_window_compute_scale (u32 window)
 
static u32 tcp_initial_wnd_unscaled (tcp_connection_t *tc)
 TCP's initial window. More...
 
u32 tcp_initial_window_to_advertise (tcp_connection_t *tc)
 Compute initial window and scale factor. More...
 
static void tcp_update_rcv_wnd (tcp_connection_t *tc)
 
static u32 tcp_window_to_advertise (tcp_connection_t *tc, tcp_state_t state)
 Compute and return window to advertise, scaled as per RFC1323. More...
 
static int tcp_make_syn_options (tcp_connection_t *tc, tcp_options_t *opts)
 
static int tcp_make_synack_options (tcp_connection_t *tc, tcp_options_t *opts)
 
static int tcp_make_established_options (tcp_connection_t *tc, tcp_options_t *opts)
 
static int tcp_make_options (tcp_connection_t *tc, tcp_options_t *opts, tcp_state_t state)
 
void tcp_update_burst_snd_vars (tcp_connection_t *tc)
 Update burst send vars. More...
 
static void * tcp_reuse_buffer (vlib_main_t *vm, vlib_buffer_t *b)
 
static void * tcp_init_buffer (vlib_main_t *vm, vlib_buffer_t *b)
 
u16 ip6_tcp_compute_checksum_custom (vlib_main_t *vm, vlib_buffer_t *p0, ip46_address_t *src, ip46_address_t *dst)
 
u16 ip4_tcp_compute_checksum_custom (vlib_main_t *vm, vlib_buffer_t *p0, ip46_address_t *src, ip46_address_t *dst)
 
static u16 tcp_compute_checksum (tcp_connection_t *tc, vlib_buffer_t *b)
 
static void tcp_make_ack_i (tcp_connection_t *tc, vlib_buffer_t *b, tcp_state_t state, u8 flags)
 Prepare ACK. More...
 
static void tcp_make_ack (tcp_connection_t *tc, vlib_buffer_t *b)
 Convert buffer to ACK. More...
 
static void tcp_make_fin (tcp_connection_t *tc, vlib_buffer_t *b)
 Convert buffer to FIN-ACK. More...
 
void tcp_make_syn (tcp_connection_t *tc, vlib_buffer_t *b)
 Convert buffer to SYN. More...
 
static void tcp_make_synack (tcp_connection_t *tc, vlib_buffer_t *b)
 Convert buffer to SYN-ACK. More...
 
static void tcp_enqueue_to_ip_lookup (tcp_worker_ctx_t *wrk, vlib_buffer_t *b, u32 bi, u8 is_ip4, u32 fib_index)
 
static void tcp_enqueue_to_output (tcp_worker_ctx_t *wrk, vlib_buffer_t *b, u32 bi, u8 is_ip4)
 
static int tcp_make_reset_in_place (vlib_main_t *vm, vlib_buffer_t *b, u8 is_ip4)
 
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. More...
 
void tcp_send_reset (tcp_connection_t *tc)
 Build and set reset packet for connection. More...
 
static void tcp_push_ip_hdr (tcp_worker_ctx_t *wrk, tcp_connection_t *tc, vlib_buffer_t *b)
 
void tcp_send_syn (tcp_connection_t *tc)
 Send SYN. More...
 
void tcp_send_synack (tcp_connection_t *tc)
 
void tcp_send_fin (tcp_connection_t *tc)
 Send FIN. More...
 
static void tcp_push_hdr_i (tcp_connection_t *tc, vlib_buffer_t *b, u32 snd_nxt, u8 compute_opts, u8 maybe_burst, u8 update_snd_nxt)
 Push TCP header and update connection variables. More...
 
static u32 tcp_buffer_len (vlib_buffer_t *b)
 
u32 tcp_session_push_header (transport_connection_t *tconn, vlib_buffer_t *b)
 
void tcp_send_ack (tcp_connection_t *tc)
 
void tcp_program_ack (tcp_connection_t *tc)
 
void tcp_program_dupack (tcp_connection_t *tc)
 
void tcp_program_retransmit (tcp_connection_t *tc)
 
void tcp_send_window_update_ack (tcp_connection_t *tc)
 Send window update ack. More...
 
static int tcp_prepare_segment (tcp_worker_ctx_t *wrk, tcp_connection_t *tc, u32 offset, u32 max_deq_bytes, vlib_buffer_t **b)
 Allocate a new buffer and build a new tcp segment. More...
 
static u32 tcp_prepare_retransmit_segment (tcp_worker_ctx_t *wrk, tcp_connection_t *tc, u32 offset, u32 max_deq_bytes, vlib_buffer_t **b)
 Build a retransmit segment. More...
 
static void tcp_check_sack_reneging (tcp_connection_t *tc)
 
static void tcp_cc_init_rxt_timeout (tcp_connection_t *tc)
 Reset congestion control, switch cwnd to loss window and try again. More...
 
void tcp_timer_retransmit_handler (tcp_connection_t *tc)
 
void tcp_timer_retransmit_syn_handler (tcp_connection_t *tc)
 SYN retransmit timer handler. More...
 
void tcp_timer_persist_handler (tcp_connection_t *tc)
 Got 0 snd_wnd from peer, try to do something about it. More...
 
int tcp_retransmit_first_unacked (tcp_worker_ctx_t *wrk, tcp_connection_t *tc)
 Retransmit first unacked segment. More...
 
static int tcp_transmit_unsent (tcp_worker_ctx_t *wrk, tcp_connection_t *tc, u32 burst_size)
 
int tcp_fastrecovery_prr_snd_space (tcp_connection_t *tc)
 Estimate send space using proportional rate reduction (RFC6937) More...
 
static u8 tcp_retransmit_should_retry_head (tcp_connection_t *tc, sack_scoreboard_t *sb)
 
static u8 tcp_max_tx_deq (tcp_connection_t *tc)
 
static int tcp_retransmit_sack (tcp_worker_ctx_t *wrk, tcp_connection_t *tc, u32 burst_size)
 Do retransmit with SACKs. More...
 
static int tcp_retransmit_no_sack (tcp_worker_ctx_t *wrk, tcp_connection_t *tc, u32 burst_size)
 Fast retransmit without SACK info. More...
 
static int tcp_send_acks (tcp_connection_t *tc, u32 max_burst_size)
 
static int tcp_do_retransmit (tcp_connection_t *tc, u32 max_burst_size)
 
int tcp_session_custom_tx (void *conn, transport_send_params_t *sp)
 
static void tcp_output_handle_link_local (tcp_connection_t *tc0, vlib_buffer_t *b0, u16 *next0, u32 *error0)
 
static void tcp46_output_trace_frame (vlib_main_t *vm, vlib_node_runtime_t *node, u32 *to_next, u32 n_bufs)
 
static void tcp_output_push_ip (vlib_main_t *vm, vlib_buffer_t *b0, tcp_connection_t *tc0, u8 is_ip4)
 
static void tcp_check_if_gso (tcp_connection_t *tc, vlib_buffer_t *b)
 
static void tcp_output_handle_packet (tcp_connection_t *tc0, vlib_buffer_t *b0, vlib_node_runtime_t *error_node, u16 *next0, u8 is_ip4)
 
static uword tcp46_output_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_ip4)
 
VLIB_NODE_FN() tcp4_output_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() tcp6_output_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static uword tcp46_send_reset_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, u8 is_ip4)
 
VLIB_NODE_FN() tcp4_reset_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() tcp6_reset_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 

Variables

static char * tcp_error_strings []
 
vlib_node_registration_t tcp4_output_node
 (constructor) VLIB_REGISTER_NODE (tcp4_output_node) More...
 
vlib_node_registration_t tcp6_output_node
 (constructor) VLIB_REGISTER_NODE (tcp6_output_node) More...
 
vlib_node_registration_t tcp4_reset_node
 (constructor) VLIB_REGISTER_NODE (tcp4_reset_node) More...
 
vlib_node_registration_t tcp6_reset_node
 (constructor) VLIB_REGISTER_NODE (tcp6_reset_node) More...
 

Macro Definition Documentation

◆ foreach_tcp4_output_next

#define foreach_tcp4_output_next
Value:
_ (DROP, "error-drop") \
_ (IP_LOOKUP, "ip4-lookup") \
_ (IP_REWRITE, "ip4-rewrite") \
_ (IP_ARP, "ip4-arp")
DROP
Definition: error.def:41

Definition at line 29 of file tcp_output.c.

◆ foreach_tcp4_reset_next

#define foreach_tcp4_reset_next
Value:
_(DROP, "error-drop") \
_(IP_LOOKUP, "ip4-lookup")
DROP
Definition: error.def:41

Definition at line 2349 of file tcp_output.c.

◆ foreach_tcp6_output_next

#define foreach_tcp6_output_next
Value:
_ (DROP, "error-drop") \
_ (IP_LOOKUP, "ip6-lookup") \
_ (IP_REWRITE, "ip6-rewrite") \
_ (IP_ARP, "ip6-discover-neighbor")
DROP
Definition: error.def:41

Definition at line 35 of file tcp_output.c.

◆ foreach_tcp6_reset_next

#define foreach_tcp6_reset_next
Value:
_(DROP, "error-drop") \
_(IP_LOOKUP, "ip6-lookup")
DROP
Definition: error.def:41

Definition at line 2353 of file tcp_output.c.

◆ scoreboard_rescue_rxt_valid

#define scoreboard_rescue_rxt_valid (   _sb,
  _tc 
)
Value:
(seq_geq (_sb->rescue_rxt, _tc->snd_una) \
&& seq_leq (_sb->rescue_rxt, _tc->snd_congestion))
#define seq_leq(_s1, _s2)
Definition: tcp_packet.h:178
#define seq_geq(_s1, _s2)
Definition: tcp_packet.h:180

Definition at line 1696 of file tcp_output.c.

◆ tcp_error

#define tcp_error (   n,
 
)    s,

Typedef Documentation

◆ tcp_output_next_t

typedef enum _tcp_output_next tcp_output_next_t

◆ tcp_reset_next_t

typedef enum _tcp_reset_next tcp_reset_next_t

Function Documentation

◆ format_tcp_tx_trace()

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

Definition at line 54 of file tcp_output.c.

+ Here is the call graph for this function:

◆ ip4_tcp_compute_checksum_custom()

u16 ip4_tcp_compute_checksum_custom ( vlib_main_t vm,
vlib_buffer_t p0,
ip46_address_t *  src,
ip46_address_t *  dst 
)

Definition at line 387 of file tcp_output.c.

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

◆ ip6_tcp_compute_checksum_custom()

u16 ip6_tcp_compute_checksum_custom ( vlib_main_t vm,
vlib_buffer_t p0,
ip46_address_t *  src,
ip46_address_t *  dst 
)

Definition at line 361 of file tcp_output.c.

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

◆ tcp46_output_inline()

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

Definition at line 2178 of file tcp_output.c.

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

◆ tcp46_output_trace_frame()

static void tcp46_output_trace_frame ( vlib_main_t vm,
vlib_node_runtime_t node,
u32 to_next,
u32  n_bufs 
)
static

Definition at line 2078 of file tcp_output.c.

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

◆ tcp46_send_reset_inline()

static uword tcp46_send_reset_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
u8  is_ip4 
)
static

Definition at line 2358 of file tcp_output.c.

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

◆ tcp4_output_node()

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

Definition at line 2290 of file tcp_output.c.

+ Here is the call graph for this function:

◆ tcp4_reset_node()

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

Definition at line 2417 of file tcp_output.c.

+ Here is the call graph for this function:

◆ tcp6_output_node()

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

Definition at line 2296 of file tcp_output.c.

+ Here is the call graph for this function:

◆ tcp6_reset_node()

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

Definition at line 2423 of file tcp_output.c.

+ Here is the call graph for this function:

◆ tcp_buffer_len()

static u32 tcp_buffer_len ( vlib_buffer_t b)
inlinestatic

Definition at line 977 of file tcp_output.c.

+ Here is the caller graph for this function:

◆ tcp_cc_init_rxt_timeout()

static void tcp_cc_init_rxt_timeout ( tcp_connection_t tc)
static

Reset congestion control, switch cwnd to loss window and try again.

Definition at line 1275 of file tcp_output.c.

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

◆ tcp_check_if_gso()

static void tcp_check_if_gso ( tcp_connection_t tc,
vlib_buffer_t b 
)
inlinestatic

Definition at line 2118 of file tcp_output.c.

+ Here is the caller graph for this function:

◆ tcp_check_sack_reneging()

static void tcp_check_sack_reneging ( tcp_connection_t tc)
static

Definition at line 1259 of file tcp_output.c.

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

◆ tcp_compute_checksum()

static u16 tcp_compute_checksum ( tcp_connection_t tc,
vlib_buffer_t b 
)
inlinestatic

Definition at line 407 of file tcp_output.c.

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

◆ tcp_do_retransmit()

static int tcp_do_retransmit ( tcp_connection_t tc,
u32  max_burst_size 
)
static

Definition at line 1994 of file tcp_output.c.

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

◆ tcp_enqueue_to_ip_lookup()

static void tcp_enqueue_to_ip_lookup ( tcp_worker_ctx_t wrk,
vlib_buffer_t b,
u32  bi,
u8  is_ip4,
u32  fib_index 
)
static

Definition at line 534 of file tcp_output.c.

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

◆ tcp_enqueue_to_output()

static void tcp_enqueue_to_output ( tcp_worker_ctx_t wrk,
vlib_buffer_t b,
u32  bi,
u8  is_ip4 
)
static

Definition at line 556 of file tcp_output.c.

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

◆ tcp_fastrecovery_prr_snd_space()

int tcp_fastrecovery_prr_snd_space ( tcp_connection_t tc)

Estimate send space using proportional rate reduction (RFC6937)

Definition at line 1653 of file tcp_output.c.

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

◆ tcp_init_buffer()

static void* tcp_init_buffer ( vlib_main_t vm,
vlib_buffer_t b 
)
static

Definition at line 346 of file tcp_output.c.

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

◆ tcp_initial_window_to_advertise()

u32 tcp_initial_window_to_advertise ( tcp_connection_t tc)

Compute initial window and scale factor.

As per RFC1323, window field in SYN and SYN-ACK segments is never scaled.

Definition at line 102 of file tcp_output.c.

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

◆ tcp_initial_wnd_unscaled()

static u32 tcp_initial_wnd_unscaled ( tcp_connection_t tc)
inlinestatic

TCP's initial window.

Definition at line 83 of file tcp_output.c.

+ Here is the caller graph for this function:

◆ tcp_make_ack()

static void tcp_make_ack ( tcp_connection_t tc,
vlib_buffer_t b 
)
inlinestatic

Convert buffer to ACK.

Definition at line 466 of file tcp_output.c.

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

◆ tcp_make_ack_i()

static void tcp_make_ack_i ( tcp_connection_t tc,
vlib_buffer_t b,
tcp_state_t  state,
u8  flags 
)
inlinestatic

Prepare ACK.

Definition at line 433 of file tcp_output.c.

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

◆ tcp_make_established_options()

static int tcp_make_established_options ( tcp_connection_t tc,
tcp_options_t opts 
)
static

Definition at line 228 of file tcp_output.c.

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

◆ tcp_make_fin()

static void tcp_make_fin ( tcp_connection_t tc,
vlib_buffer_t b 
)
static

Convert buffer to FIN-ACK.

Definition at line 477 of file tcp_output.c.

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

◆ tcp_make_options()

static int tcp_make_options ( tcp_connection_t tc,
tcp_options_t opts,
tcp_state_t  state 
)
inlinestatic

Definition at line 263 of file tcp_output.c.

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

◆ tcp_make_reset_in_place()

static int tcp_make_reset_in_place ( vlib_main_t vm,
vlib_buffer_t b,
u8  is_ip4 
)
static

Definition at line 569 of file tcp_output.c.

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

◆ tcp_make_syn()

void tcp_make_syn ( tcp_connection_t tc,
vlib_buffer_t b 
)

Convert buffer to SYN.

Definition at line 486 of file tcp_output.c.

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

◆ tcp_make_syn_options()

static int tcp_make_syn_options ( tcp_connection_t tc,
tcp_options_t opts 
)
static

Definition at line 164 of file tcp_output.c.

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

◆ tcp_make_synack()

static void tcp_make_synack ( tcp_connection_t tc,
vlib_buffer_t b 
)
static

Convert buffer to SYN-ACK.

Definition at line 512 of file tcp_output.c.

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

◆ tcp_make_synack_options()

static int tcp_make_synack_options ( tcp_connection_t tc,
tcp_options_t opts 
)
static

Definition at line 193 of file tcp_output.c.

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

◆ tcp_max_tx_deq()

static u8 tcp_max_tx_deq ( tcp_connection_t tc)
inlinestatic

Definition at line 1690 of file tcp_output.c.

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

◆ tcp_output_handle_link_local()

static void tcp_output_handle_link_local ( tcp_connection_t tc0,
vlib_buffer_t b0,
u16 next0,
u32 error0 
)
static

Definition at line 2046 of file tcp_output.c.

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

◆ tcp_output_handle_packet()

static void tcp_output_handle_packet ( tcp_connection_t tc0,
vlib_buffer_t b0,
vlib_node_runtime_t error_node,
u16 next0,
u8  is_ip4 
)
inlinestatic

Definition at line 2142 of file tcp_output.c.

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

◆ tcp_output_push_ip()

static void tcp_output_push_ip ( vlib_main_t vm,
vlib_buffer_t b0,
tcp_connection_t tc0,
u8  is_ip4 
)
inlinestatic

Definition at line 2102 of file tcp_output.c.

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

◆ tcp_prepare_retransmit_segment()

static u32 tcp_prepare_retransmit_segment ( tcp_worker_ctx_t wrk,
tcp_connection_t tc,
u32  offset,
u32  max_deq_bytes,
vlib_buffer_t **  b 
)
static

Build a retransmit segment.

Returns
the number of bytes in the segment or 0 if there's nothing to retransmit

Definition at line 1216 of file tcp_output.c.

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

◆ tcp_prepare_segment()

static int tcp_prepare_segment ( tcp_worker_ctx_t wrk,
tcp_connection_t tc,
u32  offset,
u32  max_deq_bytes,
vlib_buffer_t **  b 
)
static

Allocate a new buffer and build a new tcp segment.

Parameters
wrktcp worker
tcconnection for which the segment will be allocated
offsetoffset of the first byte in the tx fifo
max_deq_bytesegment size
[out]bpointer to buffer allocated
Returns
the number of bytes in the segment or 0 if buffer cannot be allocated or no data available

Definition at line 1100 of file tcp_output.c.

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

◆ tcp_program_ack()

void tcp_program_ack ( tcp_connection_t tc)

Definition at line 1035 of file tcp_output.c.

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

◆ tcp_program_dupack()

void tcp_program_dupack ( tcp_connection_t tc)

Definition at line 1045 of file tcp_output.c.

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

◆ tcp_program_retransmit()

void tcp_program_retransmit ( tcp_connection_t tc)

Definition at line 1057 of file tcp_output.c.

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

◆ tcp_push_hdr_i()

static void tcp_push_hdr_i ( tcp_connection_t tc,
vlib_buffer_t b,
u32  snd_nxt,
u8  compute_opts,
u8  maybe_burst,
u8  update_snd_nxt 
)
inlinestatic

Push TCP header and update connection variables.

Should only be called for segments with data, not for 'control' packets.

Definition at line 913 of file tcp_output.c.

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

◆ tcp_push_ip_hdr()

static void tcp_push_ip_hdr ( tcp_worker_ctx_t wrk,
tcp_connection_t tc,
vlib_buffer_t b 
)
static

Definition at line 776 of file tcp_output.c.

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

◆ tcp_retransmit_first_unacked()

int tcp_retransmit_first_unacked ( tcp_worker_ctx_t wrk,
tcp_connection_t tc 
)

Retransmit first unacked segment.

Definition at line 1594 of file tcp_output.c.

+ Here is the call graph for this function:

◆ tcp_retransmit_no_sack()

static int tcp_retransmit_no_sack ( tcp_worker_ctx_t wrk,
tcp_connection_t tc,
u32  burst_size 
)
static

Fast retransmit without SACK info.

Definition at line 1858 of file tcp_output.c.

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

◆ tcp_retransmit_sack()

static int tcp_retransmit_sack ( tcp_worker_ctx_t wrk,
tcp_connection_t tc,
u32  burst_size 
)
static

Do retransmit with SACKs.

Definition at line 1704 of file tcp_output.c.

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

◆ tcp_retransmit_should_retry_head()

static u8 tcp_retransmit_should_retry_head ( tcp_connection_t tc,
sack_scoreboard_t sb 
)
inlinestatic

Definition at line 1677 of file tcp_output.c.

+ Here is the caller graph for this function:

◆ tcp_reuse_buffer()

static void* tcp_reuse_buffer ( vlib_main_t vm,
vlib_buffer_t b 
)
static

Definition at line 329 of file tcp_output.c.

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

◆ tcp_send_ack()

void tcp_send_ack ( tcp_connection_t tc)

Definition at line 1015 of file tcp_output.c.

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

◆ tcp_send_acks()

static int tcp_send_acks ( tcp_connection_t tc,
u32  max_burst_size 
)
static

Definition at line 1939 of file tcp_output.c.

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

◆ tcp_send_fin()

void tcp_send_fin ( tcp_connection_t tc)

Send FIN.

Definition at line 863 of file tcp_output.c.

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

◆ tcp_send_reset()

void tcp_send_reset ( tcp_connection_t tc)

Build and set reset packet for connection.

Definition at line 740 of file tcp_output.c.

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

◆ tcp_send_reset_w_pkt()

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.

It extracts connection info out of original packet

Definition at line 652 of file tcp_output.c.

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

◆ tcp_send_syn()

void tcp_send_syn ( tcp_connection_t tc)

Send SYN.

Builds a SYN packet for a half-open connection and sends it to ipx_lookup. The packet is not forwarded through tcpx_output to avoid doing lookups in the half_open pool.

Definition at line 799 of file tcp_output.c.

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

◆ tcp_send_synack()

void tcp_send_synack ( tcp_connection_t tc)

Definition at line 835 of file tcp_output.c.

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

◆ tcp_send_window_update_ack()

void tcp_send_window_update_ack ( tcp_connection_t tc)

Send window update ack.

Ensures that it will be sent only once, after a zero rwnd has been advertised in a previous ack, and only if rwnd has grown beyond a configurable value.

Definition at line 1074 of file tcp_output.c.

+ Here is the call graph for this function:

◆ tcp_session_custom_tx()

int tcp_session_custom_tx ( void *  conn,
transport_send_params_t sp 
)

Definition at line 2013 of file tcp_output.c.

+ Here is the call graph for this function:

◆ tcp_session_push_header()

u32 tcp_session_push_header ( transport_connection_t tconn,
vlib_buffer_t b 
)

Definition at line 986 of file tcp_output.c.

+ Here is the call graph for this function:

◆ tcp_timer_persist_handler()

void tcp_timer_persist_handler ( tcp_connection_t tc)

Got 0 snd_wnd from peer, try to do something about it.

Definition at line 1510 of file tcp_output.c.

+ Here is the call graph for this function:

◆ tcp_timer_retransmit_handler()

void tcp_timer_retransmit_handler ( tcp_connection_t tc)

Definition at line 1298 of file tcp_output.c.

+ Here is the call graph for this function:

◆ tcp_timer_retransmit_syn_handler()

void tcp_timer_retransmit_syn_handler ( tcp_connection_t tc)

SYN retransmit timer handler.

Active open only.

Definition at line 1446 of file tcp_output.c.

+ Here is the call graph for this function:

◆ tcp_transmit_unsent()

static int tcp_transmit_unsent ( tcp_worker_ctx_t wrk,
tcp_connection_t tc,
u32  burst_size 
)
static

Definition at line 1613 of file tcp_output.c.

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

◆ tcp_update_burst_snd_vars()

void tcp_update_burst_snd_vars ( tcp_connection_t tc)

Update burst send vars.

  • Updates snd_mss to reflect the effective segment size that we can send by taking into account all TCP options, including SACKs.
  • Cache 'on the wire' options for reuse
  • Updates receive window which can be reused for a burst.

This should only be called when doing bursts

Definition at line 298 of file tcp_output.c.

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

◆ tcp_update_rcv_wnd()

static void tcp_update_rcv_wnd ( tcp_connection_t tc)
inlinestatic

Definition at line 114 of file tcp_output.c.

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

◆ tcp_window_compute_scale()

static u8 tcp_window_compute_scale ( u32  window)
static

Definition at line 71 of file tcp_output.c.

+ Here is the caller graph for this function:

◆ tcp_window_to_advertise()

static u32 tcp_window_to_advertise ( tcp_connection_t tc,
tcp_state_t  state 
)
inlinestatic

Compute and return window to advertise, scaled as per RFC1323.

Definition at line 154 of file tcp_output.c.

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

Variable Documentation

◆ tcp4_output_node

vlib_node_registration_t tcp4_output_node
Initial value:
=
{
.name = "tcp4-output",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.protocol_hint = VLIB_NODE_PROTO_HINT_TCP,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_OUTPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_buffer = format_tcp_header,
.format_trace = format_tcp_tx_trace,
}
unsigned int u32
Definition: types.h:88
#define foreach_tcp4_output_next
Definition: tcp_output.c:29
format_function_t format_tcp_header
Definition: format.h:100
static u8 * format_tcp_tx_trace(u8 *s, va_list *args)
Definition: tcp_output.c:54
static char * tcp_error_strings[]
Definition: tcp_output.c:41

(constructor) VLIB_REGISTER_NODE (tcp4_output_node)

Definition at line 2303 of file tcp_output.c.

◆ tcp4_reset_node

vlib_node_registration_t tcp4_reset_node
Initial value:
= {
.name = "tcp4-reset",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_RESET_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_tcp_tx_trace,
}
#define foreach_tcp4_reset_next
Definition: tcp_output.c:2349
unsigned int u32
Definition: types.h:88
static u8 * format_tcp_tx_trace(u8 *s, va_list *args)
Definition: tcp_output.c:54
static char * tcp_error_strings[]
Definition: tcp_output.c:41

(constructor) VLIB_REGISTER_NODE (tcp4_reset_node)

Definition at line 2430 of file tcp_output.c.

◆ tcp6_output_node

vlib_node_registration_t tcp6_output_node
Initial value:
=
{
.name = "tcp6-output",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.protocol_hint = VLIB_NODE_PROTO_HINT_TCP,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_OUTPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_buffer = format_tcp_header,
.format_trace = format_tcp_tx_trace,
}
unsigned int u32
Definition: types.h:88
#define foreach_tcp6_output_next
Definition: tcp_output.c:35
format_function_t format_tcp_header
Definition: format.h:100
static u8 * format_tcp_tx_trace(u8 *s, va_list *args)
Definition: tcp_output.c:54
static char * tcp_error_strings[]
Definition: tcp_output.c:41

(constructor) VLIB_REGISTER_NODE (tcp6_output_node)

Definition at line 2323 of file tcp_output.c.

◆ tcp6_reset_node

vlib_node_registration_t tcp6_reset_node
Initial value:
= {
.name = "tcp6-reset",
.vector_size = sizeof (u32),
.n_errors = TCP_N_ERROR,
.error_strings = tcp_error_strings,
.n_next_nodes = TCP_RESET_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_tcp_tx_trace,
}
unsigned int u32
Definition: types.h:88
static u8 * format_tcp_tx_trace(u8 *s, va_list *args)
Definition: tcp_output.c:54
#define foreach_tcp6_reset_next
Definition: tcp_output.c:2353
static char * tcp_error_strings[]
Definition: tcp_output.c:41

(constructor) VLIB_REGISTER_NODE (tcp6_reset_node)

Definition at line 2446 of file tcp_output.c.

◆ tcp_error_strings

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

Definition at line 41 of file tcp_output.c.