FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
transport_interface.h File Reference
+ Include dependency graph for transport_interface.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define transport_proto_foreach(VAR, BODY)
 

Typedefs

typedef enum transport_dequeue_type_ transport_tx_fn_type_t
 
typedef enum transport_service_type_ transport_service_type_t
 
typedef struct _transport_proto_vft transport_proto_vft_t
 

Enumerations

enum  transport_dequeue_type_ {
  TRANSPORT_TX_PEEK, TRANSPORT_TX_DEQUEUE, TRANSPORT_TX_INTERNAL, TRANSPORT_TX_DGRAM,
  TRANSPORT_TX_N_FNS
}
 
enum  transport_service_type_ { TRANSPORT_SERVICE_VC, TRANSPORT_SERVICE_CL, TRANSPORT_SERVICE_APP, TRANSPORT_N_SERVICES }
 

Functions

void transport_register_protocol (transport_proto_t transport_proto, const transport_proto_vft_t *vft, fib_protocol_t fib_proto, u32 output_node)
 Register transport virtual function table. More...
 
transport_proto_vft_ttransport_protocol_get_vft (transport_proto_t tp)
 Get transport virtual function table. More...
 
transport_service_type_t transport_protocol_service_type (transport_proto_t)
 
transport_tx_fn_type_t transport_protocol_tx_fn_type (transport_proto_t tp)
 
void transport_update_time (f64 time_now, u8 thread_index)
 
void transport_enable_disable (vlib_main_t *vm, u8 is_en)
 
static u32 transport_elog_track_index (transport_connection_t *tc)
 
void transport_connection_tx_pacer_reset (transport_connection_t *tc, u32 rate_bytes_per_sec, u32 initial_bucket, u64 time_now)
 
void transport_connection_tx_pacer_init (transport_connection_t *tc, u32 rate_bytes_per_sec, u32 initial_bucket)
 Initialize tx pacer for connection. More...
 
void transport_connection_tx_pacer_update (transport_connection_t *tc, u64 bytes_per_sec)
 Update tx pacer pacing rate. More...
 
u32 transport_connection_snd_space (transport_connection_t *tc, u64 time_now, u16 mss)
 Get maximum tx burst allowed for transport connection. More...
 
u32 transport_connection_tx_pacer_burst (transport_connection_t *tc, u64 time_now)
 
void transport_init_tx_pacers_period (void)
 Initialize period for tx pacers. More...
 
static u8 transport_connection_is_tx_paced (transport_connection_t *tc)
 Check if transport connection is paced. More...
 
u8format_transport_pacer (u8 *s, va_list *args)
 
void transport_connection_update_tx_stats (transport_connection_t *tc, u32 bytes)
 Update tx byte stats for transport connection. More...
 
void transport_connection_tx_pacer_update_bytes (transport_connection_t *tc, u32 bytes)
 

Variables

transport_proto_vft_ttp_vfts
 Per-type vector of transport protocol virtual function tables. More...
 

Macro Definition Documentation

◆ transport_proto_foreach

#define transport_proto_foreach (   VAR,
  BODY 
)
Value:
do { \
for (VAR = 0; VAR < vec_len (tp_vfts); VAR++) \
if (tp_vfts[VAR].push_header != 0) \
do { BODY; } while (0); \
} while (0)
transport_proto_vft_t * tp_vfts
Per-type vector of transport protocol virtual function tables.
Definition: transport.c:23
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)

Definition at line 90 of file transport_interface.h.

Typedef Documentation

◆ transport_proto_vft_t

typedef struct _transport_proto_vft transport_proto_vft_t

◆ transport_service_type_t

◆ transport_tx_fn_type_t

Enumeration Type Documentation

◆ transport_dequeue_type_

Enumerator
TRANSPORT_TX_PEEK 

reliable transport protos

TRANSPORT_TX_DEQUEUE 

unreliable transport protos

TRANSPORT_TX_INTERNAL 

apps acting as transports

TRANSPORT_TX_DGRAM 

datagram mode

TRANSPORT_TX_N_FNS 

Definition at line 22 of file transport_interface.h.

◆ transport_service_type_

Enumerator
TRANSPORT_SERVICE_VC 

virtual circuit service

TRANSPORT_SERVICE_CL 

connectionless service

TRANSPORT_SERVICE_APP 

app transport service

TRANSPORT_N_SERVICES 

Definition at line 31 of file transport_interface.h.

Function Documentation

◆ format_transport_pacer()

u8* format_transport_pacer ( u8 s,
va_list *  args 
)

Definition at line 491 of file transport.c.

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

◆ transport_connection_is_tx_paced()

static u8 transport_connection_is_tx_paced ( transport_connection_t tc)
inlinestatic

Check if transport connection is paced.

Definition at line 164 of file transport_interface.h.

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

◆ transport_connection_snd_space()

u32 transport_connection_snd_space ( transport_connection_t tc,
u64  time_now,
u16  mss 
)

Get maximum tx burst allowed for transport connection.

Parameters
tctransport connection
time_nowcurrent cpu time as returned by clib_cpu_time_now
msstransport's mss

Definition at line 585 of file transport.c.

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

◆ transport_connection_tx_pacer_burst()

u32 transport_connection_tx_pacer_burst ( transport_connection_t tc,
u64  time_now 
)

Definition at line 577 of file transport.c.

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

◆ transport_connection_tx_pacer_init()

void transport_connection_tx_pacer_init ( transport_connection_t tc,
u32  rate_bytes_per_sec,
u32  initial_bucket 
)

Initialize tx pacer for connection.

Parameters
tctransport connection
rate_bytes_per_secondinitial byte rate
burst_bytesinitial burst size in bytes

Definition at line 555 of file transport.c.

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

◆ transport_connection_tx_pacer_reset()

void transport_connection_tx_pacer_reset ( transport_connection_t tc,
u32  rate_bytes_per_sec,
u32  initial_bucket,
u64  time_now 
)

Definition at line 538 of file transport.c.

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

◆ transport_connection_tx_pacer_update()

void transport_connection_tx_pacer_update ( transport_connection_t tc,
u64  bytes_per_sec 
)

Update tx pacer pacing rate.

Parameters
tctransport connection
bytes_per_secnew pacing rate

Definition at line 567 of file transport.c.

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

◆ transport_connection_tx_pacer_update_bytes()

void transport_connection_tx_pacer_update_bytes ( transport_connection_t tc,
u32  bytes 
)

Definition at line 611 of file transport.c.

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

◆ transport_connection_update_tx_stats()

void transport_connection_update_tx_stats ( transport_connection_t tc,
u32  bytes 
)

Update tx byte stats for transport connection.

If tx pacing is enabled, this also updates pacer bucket to account for the amount of bytes that have been sent.

Parameters
tctransport connection
pktspackets recently sent
bytesbytes recently sent

Definition at line 603 of file transport.c.

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

◆ transport_elog_track_index()

static u32 transport_elog_track_index ( transport_connection_t tc)
inlinestatic

Definition at line 107 of file transport_interface.h.

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

◆ transport_enable_disable()

void transport_enable_disable ( vlib_main_t vm,
u8  is_en 
)

Definition at line 636 of file transport.c.

◆ transport_init_tx_pacers_period()

void transport_init_tx_pacers_period ( void  )

Initialize period for tx pacers.

Defines a unit of time with respect to number of cpu cycles that is to be used by all tx pacers.

Definition at line 618 of file transport.c.

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

◆ transport_protocol_get_vft()

transport_proto_vft_t* transport_protocol_get_vft ( transport_proto_t  transport_proto)

Get transport virtual function table.

Parameters
type- session type (not protocol type)

Definition at line 256 of file transport.c.

+ Here is the caller graph for this function:

◆ transport_protocol_service_type()

transport_service_type_t transport_protocol_service_type ( transport_proto_t  )

Definition at line 264 of file transport.c.

+ Here is the caller graph for this function:

◆ transport_protocol_tx_fn_type()

transport_tx_fn_type_t transport_protocol_tx_fn_type ( transport_proto_t  tp)

Definition at line 270 of file transport.c.

+ Here is the caller graph for this function:

◆ transport_register_protocol()

void transport_register_protocol ( transport_proto_t  transport_proto,
const transport_proto_vft_t vft,
fib_protocol_t  fib_proto,
u32  output_node 
)

Register transport virtual function table.

Parameters
transport_proto- transport protocol type (i.e., TCP, UDP ..)
vft- virtual function table for transport proto
fib_proto- network layer protocol
output_node- output node index that session layer will hand off buffers to, for requested fib proto

Definition at line 238 of file transport.c.

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

◆ transport_update_time()

void transport_update_time ( f64  time_now,
u8  thread_index 
)

Definition at line 625 of file transport.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ tp_vfts

Per-type vector of transport protocol virtual function tables.

Generate typed init functions for multiple hash table styles...

Definition at line 23 of file transport.c.