X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fmactime%2Fmactime_top.c;h=60c3e5cca65ffb4be4ae61b91cc7d5e9329f352a;hb=fe45f8f5;hp=473cc5b5c0e53e588e508c1b41c70441850c789f;hpb=7d29e320fb2855a1ddb7a6af09078b8ed636de01;p=vpp.git diff --git a/src/plugins/mactime/mactime_top.c b/src/plugins/mactime/mactime_top.c index 473cc5b5c0e..60c3e5cca65 100644 --- a/src/plugins/mactime/mactime_top.c +++ b/src/plugins/mactime/mactime_top.c @@ -106,7 +106,6 @@ vl_api_mactime_details_t_handler (vl_api_mactime_details_t * mp) } } -#define vl_print(handle, ...) fformat(handle, __VA_ARGS__) #define vl_endianfun /* define message structures */ #include #undef vl_endianfun @@ -143,14 +142,11 @@ connect_to_vpp (char *name) if (mm->msg_id_base == (u16) ~ 0) return -1; -#define _(N,n) \ - vl_msg_api_set_handlers((VL_API_##N + mm->msg_id_base), \ - #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); +#define _(N, n) \ + vl_msg_api_set_handlers ((VL_API_##N + mm->msg_id_base), #n, \ + vl_api_##n##_t_handler, vl_api_##n##_t_endian, \ + vl_api_##n##_t_format, sizeof (vl_api_##n##_t), 1, \ + vl_api_##n##_t_tojson, vl_api_##n##_t_fromjson); foreach_mactime_api_msg; #undef _ @@ -189,17 +185,17 @@ scrape_stats_segment (mt_main_t * mm) mactime_device_t *dev; stat_segment_access_t sa; stat_client_main_t *sm = mm->stat_client_main; - stat_segment_directory_entry_t *ep; + vlib_stats_entry_t *ep; int need_update2 = 0; static u32 *pool_indices; int i, j; vec_reset_length (pool_indices); /* *INDENT-OFF* */ - pool_foreach (dev, mm->devices, - ({ + pool_foreach (dev, mm->devices) + { vec_add1 (pool_indices, dev->pool_index); - })); + } /* *INDENT-ON* */ /* Nothing to do... */ @@ -443,12 +439,12 @@ print_device_table (mt_main_t * mm) { mactime_device_t *dev; - fformat (stdout, "%U", format_device, 0 /* header */ , 0 /* verbose */ ); + fformat (stdout, "%U", format_device, NULL /* header */, 0 /* verbose */); /* *INDENT-OFF* */ - pool_foreach (dev, mm->devices, - ({ + pool_foreach (dev, mm->devices) + { fformat (stdout, "%U", format_device, dev, 0 /* verbose */); - })); + } /* *INDENT-ON* */ }