X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Favf%2Favf_api.c;h=366a983f3732a942ad89b32f3eb4c009121d61d7;hb=5d5f85f5e4003476fb6d9a0ccd6ad58ad90e5138;hp=504fa31eb3deaad044d8c2291c78c91a65bac240;hpb=66bb7dd64ee2377103e18b96f1e6bf6405de44b5;p=vpp.git diff --git a/src/plugins/avf/avf_api.c b/src/plugins/avf/avf_api.c index 504fa31eb3d..366a983f373 100644 --- a/src/plugins/avf/avf_api.c +++ b/src/plugins/avf/avf_api.c @@ -29,6 +29,7 @@ #include #include +#define REPLY_MSG_ID_BASE (am->msg_id_base) #include static void @@ -52,10 +53,8 @@ vl_api_avf_create_t_handler (vl_api_avf_create_t * mp) rv = args.rv; /* *INDENT-OFF* */ - REPLY_MACRO2 (VL_API_AVF_CREATE_REPLY + am->msg_id_base, - ({ - rmp->sw_if_index = ntohl (args.sw_if_index); - })); + REPLY_MACRO2 (VL_API_AVF_CREATE_REPLY, + ({ rmp->sw_if_index = ntohl (args.sw_if_index); })); /* *INDENT-ON* */ } @@ -82,7 +81,7 @@ vl_api_avf_delete_t_handler (vl_api_avf_delete_t * mp) AVF_PROCESS_EVENT_DELETE_IF, hw->dev_instance); reply: - REPLY_MACRO (VL_API_AVF_DELETE_REPLY + am->msg_id_base); + REPLY_MACRO (VL_API_AVF_DELETE_REPLY); } /* set tup the API message handling tables */ @@ -93,10 +92,11 @@ avf_plugin_api_hookup (vlib_main_t * vm) avf_main_t *avm = &avf_main; api_main_t *am = vlibapi_get_main (); - am->is_mp_safe[VL_API_AVF_DELETE] = 1; - /* ask for a correctly-sized block of API message decode slots */ avm->msg_id_base = setup_message_id_table (); + + am->is_mp_safe[avm->msg_id_base + VL_API_AVF_DELETE] = 1; + return 0; }