vlib: use error description when dropping packets 23/37023/2
authorArthur de Kerhor <arthurdekerhor@gmail.com>
Fri, 26 Aug 2022 08:57:35 +0000 (10:57 +0200)
committerNeale Ranns <neale@graphiant.com>
Mon, 29 Aug 2022 23:56:22 +0000 (23:56 +0000)
Using the error name makes it less explicit in the packet trace than
the error description when a packet is dropped. Example of the trace
when the TTL is <=1:

01:03:17:015278: drop
  ip4-input: time_expired

We should have "ip4 ttl <= 1" instead of "time_expired"

Type: fix
Change-Id: Ic9decf10d609cc938e39d0f449359e41c406267e
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
src/vlib/drop.c

index 223e220..d353d72 100644 (file)
@@ -96,7 +96,7 @@ format_error_trace (u8 * s, va_list * va)
   i = counter_index (vm, vlib_error_get_code (&vm->node_main, e[0])) +
     error_node->error_heap_index;
   if (i != CLIB_U32_MAX)
-    s = format (s, "%v: %s", error_node->name, em->counters_heap[i].name);
+    s = format (s, "%v: %s", error_node->name, em->counters_heap[i].desc);
 
   return s;
 }