FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
vlib_api.c File Reference

Binary API messaging via shared memory Low-level, primary provisioning interface. More...

+ Include dependency graph for vlib_api.c:

Go to the source code of this file.

Macros

#define TRACE_VLIB_MEMORY_QUEUE   0
 
#define vl_typedefs   /* define message structures */
 
#define vl_print(handle, ...)   vlib_cli_output (handle, __VA_ARGS__)
 
#define vl_printfun
 
#define vl_endianfun
 
#define foreach_vlib_api_msg
 
#define foreach_rpc_api_msg
 
#define foreach_plugin_trace_msg   _(TRACE_PLUGIN_MSG_IDS,trace_plugin_msg_ids)
 

Functions

static void * vl_api_trace_plugin_msg_ids_t_print (vl_api_trace_plugin_msg_ids_t *a, void *handle)
 
static void vl_api_get_first_msg_id_t_handler (vl_api_get_first_msg_id_t *mp)
 
void vl_api_api_versions_t_handler (vl_api_api_versions_t *mp)
 
static int vlib_api_init (void)
 
static void send_one_plugin_msg_ids_msg (u8 *name, u16 first_msg_id, u16 last_msg_id)
 
void vl_api_save_msg_table (void)
 
clib_error_tvat_builtin_main_init (vlib_main_t *vm)
 
static uword vl_api_clnt_process (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
 
void vl_mem_api_enable_disable (vlib_main_t *vm, int enable)
 
static uword api_rx_from_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static void vl_api_rpc_call_t_handler (vl_api_rpc_call_t *mp)
 
static void vl_api_rpc_call_reply_t_handler (vl_api_rpc_call_reply_t *mp)
 
void vl_api_send_pending_rpc_requests (vlib_main_t *vm)
 
static void vl_api_rpc_call_main_thread_inline (void *fp, u8 *data, u32 data_length, u8 force_rpc)
 
void vl_api_rpc_call_main_thread (void *fp, u8 *data, u32 data_length)
 
void vl_api_force_rpc_call_main_thread (void *fp, u8 *data, u32 data_length)
 
static void vl_api_trace_plugin_msg_ids_t_handler (vl_api_trace_plugin_msg_ids_t *mp)
 
static clib_error_trpc_api_hookup (vlib_main_t *vm)
 
 VLIB_API_INIT_FUNCTION (rpc_api_hookup)
 

Variables

u64 vector_rate_histogram [SLEEP_N_BUCKETS]
 
vlib_node_registration_t vl_api_clnt_node
 (constructor) VLIB_REGISTER_NODE (vl_api_clnt_node) More...
 
static vlib_node_registration_t api_rx_from_node_node
 (constructor) VLIB_REGISTER_NODE (api_rx_from_node_node) More...
 
void * rpc_call_main_thread_cb_fn
 

Detailed Description

Binary API messaging via shared memory Low-level, primary provisioning interface.

Definition in file vlib_api.c.

Macro Definition Documentation

◆ foreach_plugin_trace_msg

#define foreach_plugin_trace_msg   _(TRACE_PLUGIN_MSG_IDS,trace_plugin_msg_ids)

Definition at line 676 of file vlib_api.c.

◆ foreach_rpc_api_msg

#define foreach_rpc_api_msg
Value:
_(RPC_CALL,rpc_call) \
_(RPC_CALL_REPLY,rpc_call_reply)

Definition at line 672 of file vlib_api.c.

◆ foreach_vlib_api_msg

#define foreach_vlib_api_msg
Value:
_(GET_FIRST_MSG_ID, get_first_msg_id) \
_(API_VERSIONS, api_versions)

Definition at line 145 of file vlib_api.c.

◆ TRACE_VLIB_MEMORY_QUEUE

#define TRACE_VLIB_MEMORY_QUEUE   0

Definition at line 41 of file vlib_api.c.

◆ vl_endianfun

#define vl_endianfun

Definition at line 67 of file vlib_api.c.

◆ vl_print

#define vl_print (   handle,
  ... 
)    vlib_cli_output (handle, __VA_ARGS__)

Definition at line 50 of file vlib_api.c.

◆ vl_printfun

#define vl_printfun

Definition at line 51 of file vlib_api.c.

◆ vl_typedefs

#define vl_typedefs   /* define message structures */

Definition at line 45 of file vlib_api.c.

Function Documentation

◆ api_rx_from_node()

static uword api_rx_from_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 454 of file vlib_api.c.

+ Here is the call graph for this function:

◆ rpc_api_hookup()

static clib_error_t* rpc_api_hookup ( vlib_main_t vm)
static

Definition at line 691 of file vlib_api.c.

+ Here is the call graph for this function:

◆ send_one_plugin_msg_ids_msg()

static void send_one_plugin_msg_ids_msg ( u8 name,
u16  first_msg_id,
u16  last_msg_id 
)
static

Definition at line 185 of file vlib_api.c.

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

◆ vat_builtin_main_init()

clib_error_t * vat_builtin_main_init ( vlib_main_t vm)

Definition at line 253 of file vlib_api.c.

+ Here is the caller graph for this function:

◆ vl_api_api_versions_t_handler()

void vl_api_api_versions_t_handler ( vl_api_api_versions_t mp)

Definition at line 109 of file vlib_api.c.

+ Here is the call graph for this function:

◆ vl_api_clnt_process()

static uword vl_api_clnt_process ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t f 
)
static

Definition at line 259 of file vlib_api.c.

+ Here is the call graph for this function:

◆ vl_api_force_rpc_call_main_thread()

void vl_api_force_rpc_call_main_thread ( void *  fp,
u8 data,
u32  data_length 
)

Definition at line 631 of file vlib_api.c.

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

◆ vl_api_get_first_msg_id_t_handler()

static void vl_api_get_first_msg_id_t_handler ( vl_api_get_first_msg_id_t mp)
static

Definition at line 72 of file vlib_api.c.

+ Here is the call graph for this function:

◆ vl_api_rpc_call_main_thread()

void vl_api_rpc_call_main_thread ( void *  fp,
u8 data,
u32  data_length 
)

Definition at line 620 of file vlib_api.c.

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

◆ vl_api_rpc_call_main_thread_inline()

static void vl_api_rpc_call_main_thread_inline ( void *  fp,
u8 data,
u32  data_length,
u8  force_rpc 
)
inlinestatic

Definition at line 576 of file vlib_api.c.

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

◆ vl_api_rpc_call_reply_t_handler()

static void vl_api_rpc_call_reply_t_handler ( vl_api_rpc_call_reply_t *  mp)
static

Definition at line 557 of file vlib_api.c.

◆ vl_api_rpc_call_t_handler()

static void vl_api_rpc_call_t_handler ( vl_api_rpc_call_t mp)
static

Definition at line 513 of file vlib_api.c.

+ Here is the call graph for this function:

◆ vl_api_save_msg_table()

void vl_api_save_msg_table ( void  )

Definition at line 207 of file vlib_api.c.

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

◆ vl_api_send_pending_rpc_requests()

void vl_api_send_pending_rpc_requests ( vlib_main_t vm)

Definition at line 563 of file vlib_api.c.

+ Here is the call graph for this function:

◆ vl_api_trace_plugin_msg_ids_t_handler()

static void vl_api_trace_plugin_msg_ids_t_handler ( vl_api_trace_plugin_msg_ids_t mp)
static

Definition at line 638 of file vlib_api.c.

+ Here is the call graph for this function:

◆ vl_api_trace_plugin_msg_ids_t_print()

static void* vl_api_trace_plugin_msg_ids_t_print ( vl_api_trace_plugin_msg_ids_t a,
void *  handle 
)
inlinestatic

Definition at line 56 of file vlib_api.c.

◆ vl_mem_api_enable_disable()

void vl_mem_api_enable_disable ( vlib_main_t vm,
int  enable 
)

Definition at line 445 of file vlib_api.c.

+ Here is the call graph for this function:

◆ vlib_api_init()

static int vlib_api_init ( void  )
static

Definition at line 153 of file vlib_api.c.

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

◆ VLIB_API_INIT_FUNCTION()

VLIB_API_INIT_FUNCTION ( rpc_api_hookup  )

Variable Documentation

◆ api_rx_from_node_node

vlib_node_registration_t api_rx_from_node_node
static
Initial value:
= {
.function = api_rx_from_node,
.vector_size = 4,
.name = "api-rx-from-node",
}

(constructor) VLIB_REGISTER_NODE (api_rx_from_node_node)

Definition at line 504 of file vlib_api.c.

◆ rpc_call_main_thread_cb_fn

void* rpc_call_main_thread_cb_fn

Definition at line 1634 of file threads.c.

◆ vector_rate_histogram

u64 vector_rate_histogram[SLEEP_N_BUCKETS]

Definition at line 179 of file vlib_api.c.

◆ vl_api_clnt_node

vlib_node_registration_t vl_api_clnt_node
Initial value:
=
{
.function = vl_api_clnt_process,
.name = "api-rx-from-ring",
.state = VLIB_NODE_STATE_DISABLED,
.process_log2_n_stack_bytes = 18,
}

(constructor) VLIB_REGISTER_NODE (vl_api_clnt_node)

Definition at line 434 of file vlib_api.c.

VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
api_rx_from_node
static uword api_rx_from_node(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: vlib_api.c:454
vl_api_clnt_process
static uword vl_api_clnt_process(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
Definition: vlib_api.c:259
VLIB_NODE_TYPE_PROCESS
@ VLIB_NODE_TYPE_PROCESS
Definition: node.h:84