38 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 45 #define foreach_vpe_api_msg \ 46 _(CREATE_VHOST_USER_IF, create_vhost_user_if) \ 47 _(MODIFY_VHOST_USER_IF, modify_vhost_user_if) \ 48 _(DELETE_VHOST_USER_IF, delete_vhost_user_if) \ 49 _(SW_INTERFACE_VHOST_USER_DUMP, sw_interface_vhost_user_dump) 62 memset (mp, 0,
sizeof (*mp));
63 mp->_vl_msg_id = ntohs (VL_API_SW_INTERFACE_EVENT);
77 u32 sw_if_index = (
u32) ~ 0;
111 vl_api_modify_vhost_user_if_reply_t *rmp;
128 vl_api_delete_vhost_user_if_reply_t *rmp;
159 memset (mp, 0,
sizeof (*mp));
160 mp->_vl_msg_id = ntohs (VL_API_SW_INTERFACE_VHOST_USER_DETAILS);
211 #define vl_msg_name_crc_list 213 #undef vl_msg_name_crc_list 218 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 219 foreach_vl_msg_name_crc_vhost_user;
229 vl_msg_api_set_handlers(VL_API_##N, #n, \ 230 vl_api_##n##_t_handler, \ 232 vl_api_##n##_t_endian, \ 233 vl_api_##n##_t_print, \ 234 sizeof(vl_api_##n##_t), 1);
static clib_error_t * vhost_user_api_hookup(vlib_main_t *vm)
VLIB_API_INIT_FUNCTION(vhost_user_api_hookup)
vnet_main_t * vnet_get_main(void)
Vhost-user interface details structure (fix this)
#define REPLY_MACRO2(t, body)
static void vl_api_delete_vhost_user_if_t_handler(vl_api_delete_vhost_user_if_t *mp)
static void vnet_clear_sw_interface_tag(vnet_main_t *vnm, u32 sw_if_index)
vhost-user interface create request
static void vl_api_modify_vhost_user_if_t_handler(vl_api_modify_vhost_user_if_t *mp)
static void vl_api_create_vhost_user_if_t_handler(vl_api_create_vhost_user_if_t *mp)
void * vl_msg_api_alloc(int nbytes)
int vhost_user_delete_if(vnet_main_t *vnm, vlib_main_t *vm, u32 sw_if_index)
#define foreach_vpe_api_msg
vhost-user interface create response
int vhost_user_dump_ifs(vnet_main_t *vnm, vlib_main_t *vm, vhost_user_intf_details_t **out_vuids)
static void setup_message_id_table(api_main_t *am)
static void send_sw_interface_event_deleted(vpe_api_main_t *am, unix_shared_memory_queue_t *q, u32 sw_if_index)
API main structure, used by both vpp and binary API clients.
int vhost_user_create_if(vnet_main_t *vnm, vlib_main_t *vm, const char *sock_filename, u8 is_server, u32 *sw_if_index, u64 feature_mask, u8 renumber, u32 custom_dev_instance, u8 *hwaddr)
#define vec_free(V)
Free vector's memory (no header).
int vhost_user_modify_if(vnet_main_t *vnm, vlib_main_t *vm, const char *sock_filename, u8 is_server, u32 sw_if_index, u64 feature_mask, u8 renumber, u32 custom_dev_instance)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
vhost-user interface modify request
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
static void vnet_set_sw_interface_tag(vnet_main_t *vnm, u8 *tag, u32 sw_if_index)
static vlib_main_t * vlib_get_main(void)
Interface Event generated by want_interface_events.
#define vec_foreach(var, vec)
Vector iterator.
vhost-user interface delete request
vpe_api_main_t vpe_api_main
static void vl_api_sw_interface_vhost_user_dump_t_handler(vl_api_sw_interface_vhost_user_dump_t *mp)
struct _unix_shared_memory_queue unix_shared_memory_queue_t
static void send_sw_interface_vhost_user_details(vpe_api_main_t *am, unix_shared_memory_queue_t *q, vhost_user_intf_details_t *vui, u32 context)