summaryrefslogtreecommitdiffstats
path: root/src/vnet/buffer.c
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-08-01 12:53:17 -0700
committerDave Barach <openvpp@barachs.net>2018-08-03 11:49:39 +0000
commitce9e0b4d48705d693f4e03093e3f506bdecaf141 (patch)
treec7b59ffe466f8fce19fb2a536b16958a16efc9b9 /src/vnet/buffer.c
parent40f92469c6c1b7145ad752475350f71d752d8033 (diff)
loop counter to prevent infiinte number of look ups per-packet
Change-Id: I59235d11baac18785a4c90cdaf14e8f3ddf06dab Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/buffer.c')
-rw-r--r--src/vnet/buffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/buffer.c b/src/vnet/buffer.c
index f793fb4fc03..de1c73597e3 100644
--- a/src/vnet/buffer.c
+++ b/src/vnet/buffer.c
@@ -42,6 +42,9 @@ format_vnet_buffer (u8 * s, va_list * args)
a = format (a, "qos %d.%d ",
vnet_buffer2 (b)->qos.bits, vnet_buffer2 (b)->qos.source);
+ if (b->flags & VNET_BUFFER_F_LOOP_COUNTER_VALID)
+ a = format (a, "loop-counter %d ", vnet_buffer2 (b)->loop_counter);
+
s = format (s, "%U", format_vlib_buffer, b);
if (a)
s = format (s, "\n%U%v", format_white_space, indent, a);