summaryrefslogtreecommitdiffstats
path: root/src/plugins/tracedump/tracedump.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-03-26 11:38:01 +0100
committerDamjan Marion <damarion@cisco.com>2021-03-26 16:35:22 +0100
commit92ccf9bcd2692b4b415f31044560c735d639a35c (patch)
treef5308e25329d6853921b7ea4a74d5c3b6f149b25 /src/plugins/tracedump/tracedump.c
parentfd8deb48c7ad63b47c5d7465ceefcadef0316f93 (diff)
vlib: convert foreach_vlib_main macro to be more gdb and clang-format friendly
Type: improvement Change-Id: I1152e58d7bfcb3c4347147f87a834d45ad51cdfe Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/tracedump/tracedump.c')
-rw-r--r--src/plugins/tracedump/tracedump.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/plugins/tracedump/tracedump.c b/src/plugins/tracedump/tracedump.c
index 7c83ba25dc9..f1073fe247d 100644
--- a/src/plugins/tracedump/tracedump.c
+++ b/src/plugins/tracedump/tracedump.c
@@ -230,26 +230,24 @@ vl_api_trace_dump_t_handler (vl_api_trace_dump_t * mp)
vec_validate (client_trace_cache, vlib_get_n_threads () - 1);
i = 0;
- /* *INDENT-OFF* */
- foreach_vlib_main (
- ({
- vlib_trace_main_t *tm = &this_vlib_main->trace_main;
-
- /* Filter as directed */
- trace_apply_filter(this_vlib_main);
-
- pool_foreach (th, tm->trace_buffer_pool)
- {
- vec_add1 (client_trace_cache[i], th[0]);
- }
-
- /* Sort them by increasing time. */
- if (vec_len (client_trace_cache[i]))
- vec_sort_with_function (client_trace_cache[i], trace_cmp);
-
- i++;
- }));
- /* *INDENT-ON* */
+ foreach_vlib_main ()
+ {
+ vlib_trace_main_t *tm = &this_vlib_main->trace_main;
+
+ /* Filter as directed */
+ trace_apply_filter (this_vlib_main);
+
+ pool_foreach (th, tm->trace_buffer_pool)
+ {
+ vec_add1 (client_trace_cache[i], th[0]);
+ }
+
+ /* Sort them by increasing time. */
+ if (vec_len (client_trace_cache[i]))
+ vec_sort_with_function (client_trace_cache[i], trace_cmp);
+
+ i++;
+ }
vlib_worker_thread_barrier_release (vlib_get_first_main ());
}