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;
100 rv = VNET_API_ERROR_INVALID_INTERFACE;
112 #define vl_msg_name_crc_list 114 #undef vl_msg_name_crc_list 119 #define _(id,n,crc) \ 120 vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + avm->msg_id_base); 121 foreach_vl_msg_name_crc_avf;
134 name =
format (0,
"avf_%08x%c", api_version, 0);
141 vl_msg_api_set_handlers((VL_API_##N + avm->msg_id_base), \ 143 vl_api_##n##_t_handler, \ 145 vl_api_##n##_t_endian, \ 146 vl_api_##n##_t_print, \ 147 sizeof(vl_api_##n##_t), 1);
vnet_main_t * vnet_get_main(void)
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
#define REPLY_MACRO2(t, body)
VLIB_API_INIT_FUNCTION(avf_plugin_api_hookup)
vnet_device_class_t avf_device_class
memset(h->entries, 0, sizeof(h->entries[0])*entries)
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 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)