diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ioam-plugin/ioam/encap/ip6_ioam_trace.c | 10 | ||||
-rw-r--r-- | plugins/ioam-plugin/ioam/lib-pot/pot_util.c | 3 | ||||
-rw-r--r-- | plugins/ioam-plugin/ioam/lib-trace/trace_util.c | 22 |
3 files changed, 21 insertions, 14 deletions
diff --git a/plugins/ioam-plugin/ioam/encap/ip6_ioam_trace.c b/plugins/ioam-plugin/ioam/encap/ip6_ioam_trace.c index e151a96c..5c981405 100644 --- a/plugins/ioam-plugin/ioam/encap/ip6_ioam_trace.c +++ b/plugins/ioam-plugin/ioam/encap/ip6_ioam_trace.c @@ -45,8 +45,8 @@ extern ip6_main_t ip6_main; #define foreach_ip6_hop_by_hop_ioam_trace_stats \ _(PROCESSED, "Pkts with ip6 hop-by-hop trace options") \ _(PROFILE_MISS, "Pkts with ip6 hop-by-hop trace options but no profile set") \ - _(PASSED, "Pkts with TRACE in Policy") \ - _(FAILED, "Pkts with TRACE out of Policy") + _(UPDATED, "Pkts with trace updated") \ + _(FULL, "Pkts with trace options but no space") static char *ip6_hop_by_hop_ioam_trace_stats_strings[] = { #define _(sym,string) string, @@ -270,7 +270,11 @@ ip6_hbh_ioam_trace_data_list_handler (vlib_buffer_t * b, ip6_header_t * ip, *elt = clib_host_to_net_u32 (profile->app_data); elt++; } - ip6_ioam_trace_stats_increment_counter (IP6_IOAM_TRACE_PASSED, 1); + ip6_ioam_trace_stats_increment_counter (IP6_IOAM_TRACE_UPDATED, 1); + } + else + { + ip6_ioam_trace_stats_increment_counter (IP6_IOAM_TRACE_FULL, 1); } return (rv); } diff --git a/plugins/ioam-plugin/ioam/lib-pot/pot_util.c b/plugins/ioam-plugin/ioam/lib-pot/pot_util.c index 893a89ca..a253ad41 100644 --- a/plugins/ioam-plugin/ioam/lib-pot/pot_util.c +++ b/plugins/ioam-plugin/ioam/lib-pot/pot_util.c @@ -310,8 +310,7 @@ static clib_error_t *set_pot_profile_command_fn(vlib_main_t * vm, bits = MAX_BITS; } else - return clib_error_return(0, "unknown input `%U'", - format_unformat_error, input); + break; } if (profile_list_name == 0) { diff --git a/plugins/ioam-plugin/ioam/lib-trace/trace_util.c b/plugins/ioam-plugin/ioam/lib-trace/trace_util.c index 9694a751..ca9adcd1 100644 --- a/plugins/ioam-plugin/ioam/lib-trace/trace_util.c +++ b/plugins/ioam-plugin/ioam/lib-trace/trace_util.c @@ -145,8 +145,7 @@ set_trace_profile_command_fn (vlib_main_t * vm, else if (unformat (input, "node-id 0x%x", &node_id)); else if (unformat (input, "app-data 0x%x", &app_data)); else - return clib_error_return (0, "unknown input `%U'", - format_unformat_error, input); + break; } profile = trace_profile_find (); if (profile) @@ -158,11 +157,14 @@ set_trace_profile_command_fn (vlib_main_t * vm, } /* *INDENT-OFF* */ -VLIB_CLI_COMMAND (set_trace_profile_command) = +VLIB_CLI_COMMAND (set_trace_profile_command, static) = { -.path = "set ioam-trace profile",.short_help = "set ioam-trace \ - trace-type <0x1f|0x3|0x9|0x11|0x19> trace-elts <nn> trace-tsp <0|1|2|3> node-id <node id in hex> app-data <app_data in hex>",.function = set_trace_profile_command_fn,}; - +.path = "set ioam-trace profile", +.short_help = "set ioam-trace \ + trace-type <0x1f|0x3|0x9|0x11|0x19> trace-elts <nn> trace-tsp <0|1|2|3> \ + node-id <node id in hex> app-data <app_data in hex>", +.function = set_trace_profile_command_fn, +}; /* *INDENT-ON* */ static clib_error_t * @@ -207,10 +209,12 @@ show_trace_profile_command_fn (vlib_main_t * vm, } /* *INDENT-OFF* */ -VLIB_CLI_COMMAND (show_trace_profile_command) = +VLIB_CLI_COMMAND (show_trace_profile_command, static) = { -.path = "show ioam-trace profile",.short_help = - "show ioam-trace profile",.function = show_trace_profile_command_fn,}; +.path = "show ioam-trace profile", +.short_help = "show ioam-trace profile", +.function = show_trace_profile_command_fn, +}; /* *INDENT-ON* */ /* |