FD.io VPP  v19.04-6-g6f05f72
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

#define foreach_plugin_trace_msg   _(TRACE_PLUGIN_MSG_IDS,trace_plugin_msg_ids)

Definition at line 679 of file vlib_api.c.

#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.

#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.

#define TRACE_VLIB_MEMORY_QUEUE   0

Definition at line 41 of file vlib_api.c.

#define vl_endianfun

Definition at line 67 of file vlib_api.c.

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

Definition at line 50 of file vlib_api.c.

#define vl_printfun

Definition at line 51 of file vlib_api.c.

#define vl_typedefs   /* define message structures */

Definition at line 45 of file vlib_api.c.

Function Documentation

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:

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:

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:

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:

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:

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:

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:

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:

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:

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.

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:

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:

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:

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:

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.

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.

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:

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 ( rpc_api_hookup  )

+ Here is the caller graph for this function:

Variable Documentation

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.

void* rpc_call_main_thread_cb_fn

Definition at line 1820 of file threads.c.

u64 vector_rate_histogram[SLEEP_N_BUCKETS]

Definition at line 202 of file vlib_api.c.

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.