aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-06-21 18:24:07 -0400
committerNeale Ranns <nranns@cisco.com>2019-06-24 17:13:24 +0000
commita638c18375f17891a9455e717d8436158af12387 (patch)
treec2c1528169595172372a45aa0025c033c1ecea13 /src/vnet/ip
parent21b83e96d6076cda01ee80343840bc1166557150 (diff)
vlib: packet tracer support for pkt thread handoffs
Type: feature Change-Id: Ia3d9a47679202c2a47cd3746b50e86c6b8627ef6 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/ip')
-rw-r--r--src/vnet/ip/ip4_reassembly.c6
-rw-r--r--src/vnet/ip/ip6_reassembly.c34
2 files changed, 3 insertions, 37 deletions
diff --git a/src/vnet/ip/ip4_reassembly.c b/src/vnet/ip/ip4_reassembly.c
index 85861025b2d..d5f0b8a7e66 100644
--- a/src/vnet/ip/ip4_reassembly.c
+++ b/src/vnet/ip/ip4_reassembly.c
@@ -294,12 +294,6 @@ ip4_reass_add_trace (vlib_main_t * vm, vlib_node_runtime_t * node,
{
vlib_buffer_t *b = vlib_get_buffer (vm, bi);
vnet_buffer_opaque_t *vnb = vnet_buffer (b);
- if (pool_is_free_index (vm->trace_main.trace_buffer_pool, b->trace_index))
- {
- // this buffer's trace is gone
- b->flags &= ~VLIB_BUFFER_IS_TRACED;
- return;
- }
ip4_reass_trace_t *t = vlib_add_trace (vm, node, b, sizeof (t[0]));
t->reass_id = reass->id;
t->action = action;
diff --git a/src/vnet/ip/ip6_reassembly.c b/src/vnet/ip/ip6_reassembly.c
index 10fc6f1f559..a8b6d2c8a0e 100644
--- a/src/vnet/ip/ip6_reassembly.c
+++ b/src/vnet/ip/ip6_reassembly.c
@@ -280,12 +280,6 @@ ip6_reass_add_trace (vlib_main_t * vm, vlib_node_runtime_t * node,
{
vlib_buffer_t *b = vlib_get_buffer (vm, bi);
vnet_buffer_opaque_t *vnb = vnet_buffer (b);
- if (pool_is_free_index (vm->trace_main.trace_buffer_pool, b->trace_index))
- {
- // this buffer's trace is gone
- b->flags &= ~VLIB_BUFFER_IS_TRACED;
- return;
- }
ip6_reass_trace_t *t = vlib_add_trace (vm, node, b, sizeof (t[0]));
t->reass_id = reass->id;
t->action = action;
@@ -1399,21 +1393,10 @@ ip6_reass_walk_expired (vlib_main_t * vm,
{
ip6_reass_t *reass = pool_elt_at_index (rt->pool, i[0]);
u32 icmp_bi = ~0;
- vlib_buffer_t *b = vlib_get_buffer (vm, reass->first_bi);
- if (PREDICT_FALSE (b->flags & VLIB_BUFFER_IS_TRACED))
- {
- if (pool_is_free_index (vm->trace_main.trace_buffer_pool,
- b->trace_index))
- {
- /* the trace is gone, don't trace this buffer anymore */
- b->flags &= ~VLIB_BUFFER_IS_TRACED;
- }
- }
ip6_reass_on_timeout (vm, node, rm, reass, &icmp_bi);
if (~0 != icmp_bi)
- {
- vec_add1 (vec_icmp_bi, icmp_bi);
- }
+ vec_add1 (vec_icmp_bi, icmp_bi);
+
ip6_reass_free (rm, rt, reass);
}
/* *INDENT-ON* */
@@ -1433,18 +1416,7 @@ ip6_reass_walk_expired (vlib_main_t * vm,
u32 bi = vec_pop (vec_icmp_bi);
vlib_buffer_t *b = vlib_get_buffer (vm, bi);
if (PREDICT_FALSE (b->flags & VLIB_BUFFER_IS_TRACED))
- {
- if (pool_is_free_index (vm->trace_main.trace_buffer_pool,
- b->trace_index))
- {
- /* the trace is gone, don't trace this buffer anymore */
- b->flags &= ~VLIB_BUFFER_IS_TRACED;
- }
- else
- {
- trace_frame = 1;
- }
- }
+ trace_frame = 1;
b->error = node->errors[IP6_ERROR_REASS_TIMEOUT];
to_next[0] = bi;
++f->n_vectors;