Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
misc: fix error handling in punt_replicate
[vpp.git]
/
src
/
vlib
/
punt_node.c
diff --git
a/src/vlib/punt_node.c
b/src/vlib/punt_node.c
index
45fde5e
..
de72104
100644
(file)
--- a/
src/vlib/punt_node.c
+++ b/
src/vlib/punt_node.c
@@
-19,7
+19,7
@@
_(DISPATCHED, "dispatched") \
_(NO_REASON, "No such punt reason") \
_(NO_REG, "No registrations") \
_(DISPATCHED, "dispatched") \
_(NO_REASON, "No such punt reason") \
_(NO_REG, "No registrations") \
- _(REP_FAIL, "Replication Fa
li
ure")
+ _(REP_FAIL, "Replication Fa
il
ure")
typedef enum punt_error_t_
{
typedef enum punt_error_t_
{
@@
-109,10
+109,6
@@
punt_replicate (vlib_main_t * vm,
punt_trace_t *t;
c0 = vlib_get_buffer (vm, ci0);
punt_trace_t *t;
c0 = vlib_get_buffer (vm, ci0);
-
- if (c0 != b0)
- vlib_buffer_copy_trace_flag (vm, b0, ci0);
-
t = vlib_add_trace (vm, node, c0, sizeof (*t));
t->pt_reason = pr0;
}
t = vlib_add_trace (vm, node, c0, sizeof (*t));
t->pt_reason = pr0;
}
@@
-124,11
+120,16
@@
punt_replicate (vlib_main_t * vm,
* so there's no need to check if the to_next frame
* is full */
}
* so there's no need to check if the to_next frame
* is full */
}
- *n_dispatched = *n_dispatched + n_clone
s
0;
+ *n_dispatched = *n_dispatched + n_clone
d
0;
/* The original buffer is the first clone */
next0 = punt_dp_db[pr0][0];
/* The original buffer is the first clone */
next0 = punt_dp_db[pr0][0];
- *to_next[0] = bi0;
+ /*
+ * Note: the original buffer is enqueued in punt_dispatch_node.
+ * Don't do it here.
+ *
+ * *to_next[0] = bi0;
+ */
return next0;
}
return next0;
}