FD.io VPP  v19.01.3-6-g70449b9b9
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)
 
u8vl_api_serialize_message_table (api_main_t *am, u8 *vector)
 
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)
 
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 679 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 675 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 168 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 457 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 694 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 208 of file vlib_api.c.

+ Here is the call graph for this function:
+ 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 132 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 275 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 634 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 95 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 623 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 579 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 560 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 516 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 230 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 566 of file vlib_api.c.

+ Here is the call graph for this function:

◆ vl_api_serialize_message_table()

u8* vl_api_serialize_message_table ( api_main_t am,
u8 vector 
)

Definition at line 72 of file vlib_api.c.

+ Here is the call graph for this function:
+ Here is the caller 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 641 of file vlib_api.c.

◆ 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 448 of file vlib_api.c.

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

◆ vlib_api_init()

static int vlib_api_init ( void  )
static

Definition at line 176 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  )
+ Here is the caller graph for this function:

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",
}
static uword api_rx_from_node(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: vlib_api.c:457

(constructor) VLIB_REGISTER_NODE (api_rx_from_node_node)

Definition at line 507 of file vlib_api.c.

◆ rpc_call_main_thread_cb_fn

void* rpc_call_main_thread_cb_fn

Definition at line 1803 of file threads.c.

◆ vector_rate_histogram

u64 vector_rate_histogram[SLEEP_N_BUCKETS]

Definition at line 202 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,
}
static uword vl_api_clnt_process(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
Definition: vlib_api.c:275

(constructor) VLIB_REGISTER_NODE (vl_api_clnt_node)

Definition at line 438 of file vlib_api.c.