X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvcl%2Fvcl_bapi.c;h=afe8824812f11f857e890f21106bcba37ec05ab6;hb=7ff7274c6b23f53830fb52047161bd5cb988abe2;hp=bb2b94f04d8d7182f1ce0022247497db5a51dab4;hpb=9b7e8acf792cced80e6775bc5668d9db415cdb46;p=vpp.git diff --git a/src/vcl/vcl_bapi.c b/src/vcl/vcl_bapi.c index bb2b94f04d8..afe8824812f 100644 --- a/src/vcl/vcl_bapi.c +++ b/src/vcl/vcl_bapi.c @@ -271,7 +271,6 @@ vl_api_app_del_cert_key_pair_reply_t_handler ( _ (APP_DEL_CERT_KEY_PAIR_REPLY, app_del_cert_key_pair_reply) \ _ (APP_WORKER_ADD_DEL_REPLY, app_worker_add_del_reply) -#define vl_print(handle, ...) fformat (handle, __VA_ARGS__) #define vl_endianfun /* define message structures */ #include #undef vl_endianfun @@ -303,12 +302,18 @@ vcl_bapi_hookup (void) return; #define _(N, n) \ - vl_msg_api_set_handlers ( \ - REPLY_MSG_ID_BASE + VL_API_##N, #n, vl_api_##n##_t_handler, \ - vl_noop_handler, vl_api_##n##_t_endian, vl_api_##n##_t_print, \ - sizeof (vl_api_##n##_t), 1, vl_api_##n##_t_print_json, \ - vl_api_##n##_t_tojson, vl_api_##n##_t_fromjson, \ - vl_api_##n##_t_calc_size); + vl_msg_api_config (&(vl_msg_api_msg_config_t){ \ + .id = REPLY_MSG_ID_BASE + VL_API_##N, \ + .name = #n, \ + .handler = vl_api_##n##_t_handler, \ + .endian = vl_api_##n##_t_endian, \ + .format_fn = vl_api_##n##_t_format, \ + .size = sizeof (vl_api_##n##_t), \ + .traced = 1, \ + .tojson = vl_api_##n##_t_tojson, \ + .fromjson = vl_api_##n##_t_fromjson, \ + .calc_size = vl_api_##n##_t_calc_size, \ + }); foreach_sock_msg; #undef _ } @@ -354,7 +359,8 @@ vcl_bapi_send_attach (void) (vcm->cfg.app_scope_local ? APP_OPTIONS_FLAGS_USE_LOCAL_SCOPE : 0) | (vcm->cfg.app_scope_global ? APP_OPTIONS_FLAGS_USE_GLOBAL_SCOPE : 0) | (app_is_proxy ? APP_OPTIONS_FLAGS_IS_PROXY : 0) | - (vcm->cfg.use_mq_eventfd ? APP_OPTIONS_FLAGS_EVT_MQ_USE_EVENTFD : 0); + (vcm->cfg.use_mq_eventfd ? APP_OPTIONS_FLAGS_EVT_MQ_USE_EVENTFD : 0) | + (vcm->cfg.huge_page ? APP_OPTIONS_FLAGS_USE_HUGE_PAGE : 0); bmp->options[APP_OPTIONS_PROXY_TRANSPORT] = (u64) ((vcm->cfg.app_proxy_transport_tcp ? 1 << TRANSPORT_PROTO_TCP : 0) | (vcm->cfg.app_proxy_transport_udp ? 1 << TRANSPORT_PROTO_UDP : 0));