summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-02-13 10:08:01 -0500
committerDave Barach <openvpp@barachs.net>2020-02-13 23:48:36 +0000
commit3be33f17ecd14a12738a44f9c0e09cb3778b1345 (patch)
treea57991b68b4385ebe3eaca7ec74eb2b0f879402a /src/plugins
parente88845e4fea2c6b6743ff7790cc2247631d65189 (diff)
nsim: fix quad-loop packet trace
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I756170bd799d1f482186cbb4b5dff9373ae6e08f
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/nsim/node.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/plugins/nsim/node.c b/src/plugins/nsim/node.c
index 96a712cb35d..57afbd273a7 100644
--- a/src/plugins/nsim/node.c
+++ b/src/plugins/nsim/node.c
@@ -179,16 +179,15 @@ nsim_inline (vlib_main_t * vm,
ep->buffer_index = from[0];
buffered++;
}
-
if (is_trace)
{
- if (b[1]->flags & VLIB_BUFFER_IS_TRACED)
+ if (b[0]->flags & VLIB_BUFFER_IS_TRACED)
{
- nsim_trace_t *t = vlib_add_trace (vm, node, b[1], sizeof (*t));
+ nsim_trace_t *t = vlib_add_trace (vm, node, b[0], sizeof (*t));
t->expires = expires;
- t->is_drop = is_drop[1];
- t->is_lost = b[1]->error == loss_error;
- t->tx_sw_if_index = (is_drop[1] == 0) ? ep->tx_sw_if_index : 0;
+ t->is_drop = is_drop[0];
+ t->is_lost = b[0]->error == loss_error;
+ t->tx_sw_if_index = (is_drop[0] == 0) ? ep->tx_sw_if_index : 0;
}
}
@@ -224,15 +223,16 @@ nsim_inline (vlib_main_t * vm,
if (is_trace)
{
- if (b[2]->flags & VLIB_BUFFER_IS_TRACED)
+ if (b[1]->flags & VLIB_BUFFER_IS_TRACED)
{
- nsim_trace_t *t = vlib_add_trace (vm, node, b[2], sizeof (*t));
+ nsim_trace_t *t = vlib_add_trace (vm, node, b[1], sizeof (*t));
t->expires = expires;
- t->is_drop = is_drop[2];
- t->is_lost = b[2]->error == loss_error;
- t->tx_sw_if_index = (is_drop[2] == 0) ? ep->tx_sw_if_index : 0;
+ t->is_drop = is_drop[1];
+ t->is_lost = b[1]->error == loss_error;
+ t->tx_sw_if_index = (is_drop[1] == 0) ? ep->tx_sw_if_index : 0;
}
}
+
if (PREDICT_TRUE (is_drop[2] == 0))
{
ep = wp->entries + wp->tail;
@@ -274,6 +274,7 @@ nsim_inline (vlib_main_t * vm,
t->tx_sw_if_index = (is_drop[2] == 0) ? ep->tx_sw_if_index : 0;
}
}
+
if (PREDICT_TRUE (is_drop[3] == 0))
{
ep = wp->entries + wp->tail;