41 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 44 #define vl_api_version(n,v) static u32 api_version=(v); 51 vl_print (handle, (char *)s); \ 57 #define foreach_pp2_plugin_api_msg \ 58 _(MRVL_PP2_CREATE, mrvl_pp2_create) \ 59 _(MRVL_PP2_DELETE, mrvl_pp2_delete) 62 #define vl_msg_name_crc_list 64 #undef vl_msg_name_crc_list 87 rmp->sw_if_index = ntohl (args.sw_if_index);
96 s =
format (0,
"SCRIPT: mrvl_pp2_create ");
112 vl_api_mrvl_pp2_delete_reply_t *rmp;
119 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
136 s =
format (0,
"SCRIPT: mrvl_pp2_delete ");
146 #define _(id,n,crc) \ 147 vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + pp2->msg_id_base); 148 foreach_vl_msg_name_crc_pp2;
162 name =
format (0,
"mrvl_pp2_%08x%c", api_version, 0);
169 vl_msg_api_set_handlers((VL_API_##N + pp2->msg_id_base), \ 171 vl_api_##n##_t_handler, \ 173 vl_api_##n##_t_endian, \ 174 vl_api_##n##_t_print, \ 175 sizeof(vl_api_##n##_t), 1);
#define foreach_pp2_plugin_api_msg
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)
static void setup_message_id_table(mrvl_pp2_main_t *pp2, api_main_t *am)
mrvl_pp2_main_t mrvl_pp2_main
vnet_device_class_t mrvl_pp2_device_class
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static void vl_api_mrvl_pp2_create_t_handler(vl_api_mrvl_pp2_create_t *mp)
static void * vl_api_mrvl_pp2_create_t_print(vl_api_mrvl_pp2_create_t *mp, void *handle)
API main structure, used by both vpp and binary API clients.
#define vec_free(V)
Free vector's memory (no header).
clib_error_t * mrvl_pp2_plugin_api_hookup(vlib_main_t *vm)
void mrvl_pp2_delete_if(mrvl_pp2_if_t *ppif)
void mrvl_pp2_create_if(mrvl_pp2_create_if_args_t *args)
#define clib_error_free(e)
static void * vl_api_mrvl_pp2_delete_t_print(vl_api_mrvl_pp2_delete_t *mp, void *handle)
mrvl_pp2_if_t * interfaces
static void vl_api_mrvl_pp2_delete_t_handler(vl_api_mrvl_pp2_delete_t *mp)
u16 vl_msg_api_get_msg_ids(const char *name, int n)