diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-04-11 18:54:52 +0200 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-04-11 19:02:05 +0200 |
commit | d75c88d2c066e7886cf0bc4ebeceee073588b750 (patch) | |
tree | 26e0722f0adad8ec0e33cc788f8b2106e8b342b4 /hicn-plugin/src/data_push_node.c | |
parent | e3533af73ab35a66530292f698b3e2a8fff2d80d (diff) |
[HICN-176] Fixed bitmap size in pit entry and added static assert to avoid misconfiguration of parameters in param.h
Change-Id: Ia64eaebe267f87bd5f93abf3e5a9e80bab735765
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/data_push_node.c')
-rw-r--r-- | hicn-plugin/src/data_push_node.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/hicn-plugin/src/data_push_node.c b/hicn-plugin/src/data_push_node.c index b955a765d..8f9e137f7 100644 --- a/hicn-plugin/src/data_push_node.c +++ b/hicn-plugin/src/data_push_node.c @@ -54,7 +54,6 @@ typedef struct u32 next_index; u32 sw_if_index; u8 pkt_type; - u8 packet_data[40]; } hicn_data_push_trace_t; vlib_node_registration_t hicn_data_push_node; @@ -250,6 +249,17 @@ hicn_data_push_fn (vlib_main_t * vm, nameptr, namelen, isv6); stats.pkts_data_count++; } + + /* Maybe trace */ + if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE) && + (b0->flags & VLIB_BUFFER_IS_TRACED))) + { + hicn_data_push_trace_t *t = + vlib_add_trace (vm, node, b0, sizeof (*t)); + t->pkt_type = HICN_PKT_TYPE_CONTENT; + t->sw_if_index = vnet_buffer (b0)->sw_if_index[VLIB_RX]; + t->next_index = HICN_DATA_PUSH_NEXT_ERROR_DROP; + } } to_forward -= n_to_forward; @@ -266,6 +276,7 @@ hicn_data_push_fn (vlib_main_t * vm, to_next++; n_left_to_next--; } + vlib_put_next_frame (vm, node, next_index, n_left_to_next); } |