FD.io VPP  v21.01.1
Vector Packet Processing
tcp_inlines.h File Reference
+ Include dependency graph for tcp_inlines.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static tcp_header_ttcp_buffer_hdr (vlib_buffer_t *b)
 
static tcp_connection_ttcp_connection_get (u32 conn_index, u32 thread_index)
 
static tcp_connection_ttcp_connection_get_if_valid (u32 conn_index, u32 thread_index)
 
static void tcp_connection_set_state (tcp_connection_t *tc, tcp_state_t state)
 
static tcp_connection_ttcp_listener_get (u32 tli)
 
static tcp_connection_ttcp_half_open_connection_get (u32 conn_index)
 
static u32 tcp_bytes_out (const tcp_connection_t *tc)
 Our estimate of the number of bytes that have left the network. More...
 
static u32 tcp_flight_size (const tcp_connection_t *tc)
 Our estimate of the number of bytes in flight (pipe size) More...
 
static u32 tcp_initial_cwnd (const tcp_connection_t *tc)
 Initial cwnd as per RFC5681. More...
 
static void tcp_cwnd_accumulate (tcp_connection_t *tc, u32 thresh, u32 bytes)
 
static u32 tcp_loss_wnd (const tcp_connection_t *tc)
 
static u32 tcp_available_snd_wnd (const tcp_connection_t *tc)
 
static u32 tcp_available_output_snd_space (const tcp_connection_t *tc)
 
static u32 tcp_available_cc_snd_space (const tcp_connection_t *tc)
 Estimate of how many bytes we can still push into the network. More...
 
static u8 tcp_is_lost_fin (tcp_connection_t *tc)
 
static u32 tcp_time_now (void)
 
static u32 tcp_time_now_w_thread (u32 thread_index)
 
static u32 tcp_tstamp (tcp_connection_t *tc)
 Generate timestamp for tcp connection. More...
 
static f64 tcp_time_now_us (u32 thread_index)
 
static u32 tcp_set_time_now (tcp_worker_ctx_t *wrk)
 
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_init_w_buffer (tcp_connection_t *tc, vlib_buffer_t *b, u8 is_ip4)
 Initialize connection by gleaning network and rcv params from buffer. More...
 
static void tcp_update_rto (tcp_connection_t *tc)
 
static u8 tcp_is_descheduled (tcp_connection_t *tc)
 
static void * vlib_buffer_push_tcp_net_order (vlib_buffer_t *b, u16 sp, u16 dp, u32 seq, u32 ack, u8 tcp_hdr_opts_len, u8 flags, u16 wnd)
 Push TCP header to buffer. More...
 
static void * vlib_buffer_push_tcp (vlib_buffer_t *b, u16 sp_net, u16 dp_net, u32 seq, u32 ack, u8 tcp_hdr_opts_len, u8 flags, u16 wnd)
 Push TCP header to buffer. More...
 

Function Documentation

◆ tcp_available_cc_snd_space()

static u32 tcp_available_cc_snd_space ( const tcp_connection_t tc)
inlinestatic

Estimate of how many bytes we can still push into the network.

Definition at line 171 of file tcp_inlines.h.

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

◆ tcp_available_output_snd_space()

static u32 tcp_available_output_snd_space ( const tcp_connection_t tc)
inlinestatic

Definition at line 156 of file tcp_inlines.h.

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

◆ tcp_available_snd_wnd()

static u32 tcp_available_snd_wnd ( const tcp_connection_t tc)
inlinestatic

Definition at line 150 of file tcp_inlines.h.

+ Here is the caller graph for this function:

◆ tcp_buffer_hdr()

static tcp_header_t* tcp_buffer_hdr ( vlib_buffer_t b)
inlinestatic

Definition at line 22 of file tcp_inlines.h.

+ Here is the caller graph for this function:

◆ tcp_bytes_out()

static u32 tcp_bytes_out ( const tcp_connection_t tc)
inlinestatic

Our estimate of the number of bytes that have left the network.

Definition at line 81 of file tcp_inlines.h.

+ Here is the caller graph for this function:

◆ tcp_connection_get()

static tcp_connection_t* tcp_connection_get ( u32  conn_index,
u32  thread_index 
)
inlinestatic

Definition at line 30 of file tcp_inlines.h.

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

◆ tcp_connection_get_if_valid()

static tcp_connection_t* tcp_connection_get_if_valid ( u32  conn_index,
u32  thread_index 
)
inlinestatic

Definition at line 39 of file tcp_inlines.h.

+ Here is the call graph for this function:

◆ tcp_connection_set_state()

static void tcp_connection_set_state ( tcp_connection_t tc,
tcp_state_t  state 
)
inlinestatic

Definition at line 51 of file tcp_inlines.h.

+ Here is the caller graph for this function:

◆ tcp_cwnd_accumulate()

static void tcp_cwnd_accumulate ( tcp_connection_t tc,
u32  thresh,
u32  bytes 
)
inlinestatic

Definition at line 130 of file tcp_inlines.h.

+ Here is the caller graph for this function:

◆ tcp_flight_size()

static u32 tcp_flight_size ( const tcp_connection_t tc)
inlinestatic

Our estimate of the number of bytes in flight (pipe size)

Definition at line 94 of file tcp_inlines.h.

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

◆ tcp_half_open_connection_get()

static tcp_connection_t* tcp_half_open_connection_get ( u32  conn_index)
inlinestatic

Definition at line 67 of file tcp_inlines.h.

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

◆ tcp_init_w_buffer()

static void tcp_init_w_buffer ( tcp_connection_t tc,
vlib_buffer_t b,
u8  is_ip4 
)
inlinestatic

Initialize connection by gleaning network and rcv params from buffer.

Parameters
tcconnection to initialize
bbuffer whose current data is pointing at ip
is_ip4flag set to 1 if using ip4

Definition at line 328 of file tcp_inlines.h.

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

◆ tcp_initial_cwnd()

static u32 tcp_initial_cwnd ( const tcp_connection_t tc)
inlinestatic

Initial cwnd as per RFC5681.

Definition at line 110 of file tcp_inlines.h.

+ Here is the caller 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 225 of file tcp_inlines.h.

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

◆ tcp_is_descheduled()

static u8 tcp_is_descheduled ( tcp_connection_t tc)
inlinestatic

Definition at line 380 of file tcp_inlines.h.

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

◆ tcp_is_lost_fin()

static u8 tcp_is_lost_fin ( tcp_connection_t tc)
inlinestatic

Definition at line 183 of file tcp_inlines.h.

+ Here is the caller graph for this function:

◆ tcp_listener_get()

static tcp_connection_t* tcp_listener_get ( u32  tli)
inlinestatic

Definition at line 58 of file tcp_inlines.h.

+ Here is the caller graph for this function:

◆ tcp_loss_wnd()

static u32 tcp_loss_wnd ( const tcp_connection_t tc)
inlinestatic

Definition at line 143 of file tcp_inlines.h.

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

◆ tcp_set_time_now()

static u32 tcp_set_time_now ( tcp_worker_ctx_t wrk)
inlinestatic

Definition at line 219 of file tcp_inlines.h.

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

◆ tcp_time_now()

static u32 tcp_time_now ( void  )
inlinestatic

Definition at line 191 of file tcp_inlines.h.

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

◆ tcp_time_now_us()

static f64 tcp_time_now_us ( u32  thread_index)
inlinestatic

Definition at line 213 of file tcp_inlines.h.

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

◆ tcp_time_now_w_thread()

static u32 tcp_time_now_w_thread ( u32  thread_index)
inlinestatic

Definition at line 197 of file tcp_inlines.h.

+ Here is the caller graph for this function:

◆ tcp_tstamp()

static u32 tcp_tstamp ( tcp_connection_t tc)
inlinestatic

Generate timestamp for tcp connection.

Definition at line 206 of file tcp_inlines.h.

+ Here is the caller graph for this function:

◆ tcp_update_rto()

static void tcp_update_rto ( tcp_connection_t tc)
inlinestatic

Definition at line 373 of file tcp_inlines.h.

+ Here is the caller graph for this function:

◆ vlib_buffer_push_tcp()

static void* vlib_buffer_push_tcp ( vlib_buffer_t b,
u16  sp_net,
u16  dp_net,
u32  seq,
u32  ack,
u8  tcp_hdr_opts_len,
u8  flags,
u16  wnd 
)
inlinestatic

Push TCP header to buffer.

Parameters
b- buffer to write the header to
sp_net- source port net order
dp_net- destination port net order
seq- sequence number host order
ack- ack number host order
tcp_hdr_opts_len- header and options length in bytes
flags- header flags
wnd- window size
Returns
- pointer to start of TCP header

Definition at line 438 of file tcp_inlines.h.

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

◆ vlib_buffer_push_tcp_net_order()

static void* vlib_buffer_push_tcp_net_order ( vlib_buffer_t b,
u16  sp,
u16  dp,
u32  seq,
u32  ack,
u8  tcp_hdr_opts_len,
u8  flags,
u16  wnd 
)
inlinestatic

Push TCP header to buffer.

Parameters
vm- vlib_main
b- buffer to write the header to
sp_net- source port net order
dp_net- destination port net order
seq- sequence number net order
ack- ack number net order
tcp_hdr_opts_len- header and options length in bytes
flags- header flags
wnd- window size
Returns
- pointer to start of TCP header

Definition at line 401 of file tcp_inlines.h.

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