FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
application_local.c File Reference
+ Include dependency graph for application_local.c:

Go to the source code of this file.

Data Structures

struct  ct_segment_
 
struct  ct_segments_
 
struct  ct_main_
 

Typedefs

typedef enum ct_segment_flags_ ct_segment_flags_t
 
typedef struct ct_segment_ ct_segment_t
 
typedef struct ct_segments_ ct_segments_ctx_t
 
typedef struct ct_main_ ct_main_t
 

Enumerations

enum  ct_segment_flags_ { CT_SEGMENT_F_CLIENT_DETACHED = 1 << 0, CT_SEGMENT_F_SERVER_DETACHED = 1 << 1 }
 

Functions

static ct_connection_tct_connection_alloc (u32 thread_index)
 
static ct_connection_tct_connection_get (u32 ct_index, u32 thread_index)
 
static void ct_connection_free (ct_connection_t *ct)
 
static ct_connection_tct_half_open_alloc (void)
 
void ct_half_open_add_reusable (u32 ho_index)
 
session_tct_session_get_peer (session_t *s)
 
void ct_session_endpoint (session_t *ll, session_endpoint_t *sep)
 
static void ct_session_dealloc_fifos (ct_connection_t *ct, svm_fifo_t *rx_fifo, svm_fifo_t *tx_fifo)
 
int ct_session_connect_notify (session_t *ss, session_error_t err)
 
static ct_segment_tct_lookup_free_segment (ct_main_t *cm, segment_manager_t *sm, u32 seg_ctx_index)
 
static ct_segment_tct_alloc_segment (ct_main_t *cm, app_worker_t *server_wrk, u64 table_handle, segment_manager_t *sm, u32 client_wrk_index)
 
static int ct_init_accepted_session (app_worker_t *server_wrk, ct_connection_t *ct, session_t *ls, session_t *ll)
 
static void ct_accept_rpc_wrk_handler (void *accept_args)
 
static int ct_connect (app_worker_t *client_wrk, session_t *ll, session_endpoint_cfg_t *sep)
 
static u32 ct_start_listen (u32 app_listener_index, transport_endpoint_t *tep)
 
static u32 ct_stop_listen (u32 ct_index)
 
static transport_connection_tct_listener_get (u32 ct_index)
 
static transport_connection_tct_half_open_get (u32 ct_index)
 
static void ct_session_cleanup (u32 conn_index, u32 thread_index)
 
static void ct_cleanup_ho (u32 ho_index)
 
static int ct_session_connect (transport_endpoint_cfg_t *tep)
 
static void ct_session_close (u32 ct_index, u32 thread_index)
 
static transport_connection_tct_session_get (u32 ct_index, u32 thread_index)
 
static u8format_ct_connection_id (u8 *s, va_list *args)
 
static int ct_custom_tx (void *session, transport_send_params_t *sp)
 
static int ct_app_rx_evt (transport_connection_t *tc)
 
static u8format_ct_listener (u8 *s, va_list *args)
 
static u8format_ct_half_open (u8 *s, va_list *args)
 
static u8format_ct_connection (u8 *s, va_list *args)
 
static u8format_ct_session (u8 *s, va_list *args)
 
clib_error_tct_enable_disable (vlib_main_t *vm, u8 is_en)
 
int ct_session_tx (session_t *s)
 
static clib_error_tct_transport_init (vlib_main_t *vm)
 

Variables

static ct_main_t ct_main
 
static const transport_proto_vft_t cut_thru_proto
 

Typedef Documentation

◆ ct_main_t

typedef struct ct_main_ ct_main_t

◆ ct_segment_flags_t

◆ ct_segment_t

typedef struct ct_segment_ ct_segment_t

◆ ct_segments_ctx_t

Enumeration Type Documentation

◆ ct_segment_flags_

Enumerator
CT_SEGMENT_F_CLIENT_DETACHED 
CT_SEGMENT_F_SERVER_DETACHED 

Definition at line 19 of file application_local.c.

Function Documentation

◆ ct_accept_rpc_wrk_handler()

static void ct_accept_rpc_wrk_handler ( void *  accept_args)
static

Definition at line 590 of file application_local.c.

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

◆ ct_alloc_segment()

static ct_segment_t* ct_alloc_segment ( ct_main_t cm,
app_worker_t server_wrk,
u64  table_handle,
segment_manager_t sm,
u32  client_wrk_index 
)
static

Definition at line 394 of file application_local.c.

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

◆ ct_app_rx_evt()

static int ct_app_rx_evt ( transport_connection_t tc)
static

Definition at line 966 of file application_local.c.

+ Here is the call graph for this function:

◆ ct_cleanup_ho()

static void ct_cleanup_ho ( u32  ho_index)
static

Definition at line 797 of file application_local.c.

+ Here is the call graph for this function:

◆ ct_connect()

static int ct_connect ( app_worker_t client_wrk,
session_t ll,
session_endpoint_cfg_t sep 
)
static

Definition at line 697 of file application_local.c.

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

◆ ct_connection_alloc()

static ct_connection_t* ct_connection_alloc ( u32  thread_index)
static

Definition at line 59 of file application_local.c.

+ Here is the caller graph for this function:

◆ ct_connection_free()

static void ct_connection_free ( ct_connection_t ct)
static

Definition at line 82 of file application_local.c.

+ Here is the caller graph for this function:

◆ ct_connection_get()

static ct_connection_t* ct_connection_get ( u32  ct_index,
u32  thread_index 
)
static

Definition at line 74 of file application_local.c.

+ Here is the caller graph for this function:

◆ ct_custom_tx()

static int ct_custom_tx ( void *  session,
transport_send_params_t sp 
)
static

Definition at line 947 of file application_local.c.

+ Here is the call graph for this function:

◆ ct_enable_disable()

clib_error_t* ct_enable_disable ( vlib_main_t vm,
u8  is_en 
)

Definition at line 1043 of file application_local.c.

+ Here is the call graph for this function:

◆ ct_half_open_add_reusable()

void ct_half_open_add_reusable ( u32  ho_index)

Definition at line 110 of file application_local.c.

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

◆ ct_half_open_alloc()

static ct_connection_t* ct_half_open_alloc ( void  )
static

Definition at line 95 of file application_local.c.

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

◆ ct_half_open_get()

static transport_connection_t* ct_half_open_get ( u32  ct_index)
static

Definition at line 775 of file application_local.c.

+ Here is the call graph for this function:

◆ ct_init_accepted_session()

static int ct_init_accepted_session ( app_worker_t server_wrk,
ct_connection_t ct,
session_t ls,
session_t ll 
)
static

Definition at line 480 of file application_local.c.

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

◆ ct_listener_get()

static transport_connection_t* ct_listener_get ( u32  ct_index)
static

Definition at line 769 of file application_local.c.

+ Here is the call graph for this function:

◆ ct_lookup_free_segment()

static ct_segment_t* ct_lookup_free_segment ( ct_main_t cm,
segment_manager_t sm,
u32  seg_ctx_index 
)
inlinestatic

Definition at line 361 of file application_local.c.

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

◆ ct_session_cleanup()

static void ct_session_cleanup ( u32  conn_index,
u32  thread_index 
)
static

Definition at line 781 of file application_local.c.

+ Here is the call graph for this function:

◆ ct_session_close()

static void ct_session_close ( u32  ct_index,
u32  thread_index 
)
static

Definition at line 867 of file application_local.c.

+ Here is the call graph for this function:

◆ ct_session_connect()

static int ct_session_connect ( transport_endpoint_cfg_t tep)
static

Definition at line 803 of file application_local.c.

+ Here is the call graph for this function:

◆ ct_session_connect_notify()

int ct_session_connect_notify ( session_t ss,
session_error_t  err 
)

Definition at line 279 of file application_local.c.

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

◆ ct_session_dealloc_fifos()

static void ct_session_dealloc_fifos ( ct_connection_t ct,
svm_fifo_t rx_fifo,
svm_fifo_t tx_fifo 
)
static

Definition at line 140 of file application_local.c.

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

◆ ct_session_endpoint()

void ct_session_endpoint ( session_t ll,
session_endpoint_t sep 
)

Definition at line 129 of file application_local.c.

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

◆ ct_session_get()

static transport_connection_t* ct_session_get ( u32  ct_index,
u32  thread_index 
)
static

Definition at line 914 of file application_local.c.

+ Here is the call graph for this function:

◆ ct_session_get_peer()

session_t* ct_session_get_peer ( session_t s)

Definition at line 120 of file application_local.c.

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

◆ ct_session_tx()

int ct_session_tx ( session_t s)

Definition at line 1081 of file application_local.c.

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

◆ ct_start_listen()

static u32 ct_start_listen ( u32  app_listener_index,
transport_endpoint_t tep 
)
static

Definition at line 743 of file application_local.c.

+ Here is the call graph for this function:

◆ ct_stop_listen()

static u32 ct_stop_listen ( u32  ct_index)
static

Definition at line 760 of file application_local.c.

+ Here is the call graph for this function:

◆ ct_transport_init()

static clib_error_t* ct_transport_init ( vlib_main_t vm)
static

Definition at line 1097 of file application_local.c.

+ Here is the call graph for this function:

◆ format_ct_connection()

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

Definition at line 1004 of file application_local.c.

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

◆ format_ct_connection_id()

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

Definition at line 921 of file application_local.c.

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

◆ format_ct_half_open()

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

Definition at line 992 of file application_local.c.

+ Here is the call graph for this function:

◆ format_ct_listener()

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

Definition at line 979 of file application_local.c.

◆ format_ct_session()

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

Definition at line 1024 of file application_local.c.

+ Here is the call graph for this function:

Variable Documentation

◆ ct_main

ct_main_t ct_main
static

Definition at line 56 of file application_local.c.

◆ cut_thru_proto

const transport_proto_vft_t cut_thru_proto
static
Initial value:
= {
.enable = ct_enable_disable,
.start_listen = ct_start_listen,
.stop_listen = ct_stop_listen,
.get_connection = ct_session_get,
.get_listener = ct_listener_get,
.get_half_open = ct_half_open_get,
.cleanup = ct_session_cleanup,
.cleanup_ho = ct_cleanup_ho,
.connect = ct_session_connect,
.close = ct_session_close,
.custom_tx = ct_custom_tx,
.app_rx_evt = ct_app_rx_evt,
.format_listener = format_ct_listener,
.format_half_open = format_ct_half_open,
.format_connection = format_ct_session,
.transport_options = {
.name = "ct",
.short_name = "C",
.service_type = TRANSPORT_SERVICE_VC,
},
}

Definition at line 1055 of file application_local.c.

format_ct_listener
static u8 * format_ct_listener(u8 *s, va_list *args)
Definition: application_local.c:979
ct_start_listen
static u32 ct_start_listen(u32 app_listener_index, transport_endpoint_t *tep)
Definition: application_local.c:743
ct_custom_tx
static int ct_custom_tx(void *session, transport_send_params_t *sp)
Definition: application_local.c:947
ct_session_close
static void ct_session_close(u32 ct_index, u32 thread_index)
Definition: application_local.c:867
ct_listener_get
static transport_connection_t * ct_listener_get(u32 ct_index)
Definition: application_local.c:769
format_ct_session
static u8 * format_ct_session(u8 *s, va_list *args)
Definition: application_local.c:1024
TRANSPORT_TX_INTERNAL
@ TRANSPORT_TX_INTERNAL
apps acting as transports
Definition: transport_types.h:32
TRANSPORT_SERVICE_VC
@ TRANSPORT_SERVICE_VC
virtual circuit service
Definition: transport_types.h:39
ct_stop_listen
static u32 ct_stop_listen(u32 ct_index)
Definition: application_local.c:760
ct_half_open_get
static transport_connection_t * ct_half_open_get(u32 ct_index)
Definition: application_local.c:775
ct_cleanup_ho
static void ct_cleanup_ho(u32 ho_index)
Definition: application_local.c:797
ct_app_rx_evt
static int ct_app_rx_evt(transport_connection_t *tc)
Definition: application_local.c:966
ct_session_get
static transport_connection_t * ct_session_get(u32 ct_index, u32 thread_index)
Definition: application_local.c:914
format_ct_half_open
static u8 * format_ct_half_open(u8 *s, va_list *args)
Definition: application_local.c:992
ct_session_cleanup
static void ct_session_cleanup(u32 conn_index, u32 thread_index)
Definition: application_local.c:781
ct_enable_disable
clib_error_t * ct_enable_disable(vlib_main_t *vm, u8 is_en)
Definition: application_local.c:1043
ct_session_connect
static int ct_session_connect(transport_endpoint_cfg_t *tep)
Definition: application_local.c:803