42 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 48 #define vl_api_version(n,v) static u32 api_version=(v); 54 #define foreach_avf_plugin_api_msg \ 55 _(AVF_CREATE, avf_create) \ 56 _(AVF_DELETE, avf_delete) 81 rmp->sw_if_index = ntohl (args.sw_if_index);
92 vl_api_avf_delete_reply_t *rmp;
102 rv = VNET_API_ERROR_INVALID_INTERFACE;
114 #define vl_msg_name_crc_list 116 #undef vl_msg_name_crc_list 121 #define _(id,n,crc) \ 122 vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + avm->msg_id_base); 123 foreach_vl_msg_name_crc_avf;
136 name =
format (0,
"avf_%08x%c", api_version, 0);
143 vl_msg_api_set_handlers((VL_API_##N + avm->msg_id_base), \ 145 vl_api_##n##_t_handler, \ 147 vl_api_##n##_t_endian, \ 148 vl_api_##n##_t_print, \ 149 sizeof(vl_api_##n##_t), 1);
vnet_main_t * vnet_get_main(void)
#define REPLY_MACRO2(t, body)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
VLIB_API_INIT_FUNCTION(avf_plugin_api_hookup)
vnet_device_class_t avf_device_class
static void setup_message_id_table(avf_main_t *avm, api_main_t *am)
void avf_create_if(vlib_main_t *vm, avf_create_if_args_t *args)
static clib_error_t * avf_plugin_api_hookup(vlib_main_t *vm)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
API main structure, used by both vpp and binary API clients.
#define vec_free(V)
Free vector's memory (no header).
static vnet_hw_interface_t * vnet_get_sup_hw_interface_api_visible_or_null(vnet_main_t *vnm, u32 sw_if_index)
static void vl_api_avf_delete_t_handler(vl_api_avf_delete_t *mp)
static vlib_main_t * vlib_get_main(void)
void avf_delete_if(vlib_main_t *vm, avf_device_t *ad)
#define foreach_avf_plugin_api_msg
static void vl_api_avf_create_t_handler(vl_api_avf_create_t *mp)
u16 vl_msg_api_get_msg_ids(const char *name, int n)