aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/data_input_node.c
diff options
context:
space:
mode:
authorLuca Muscariello <lumuscar@cisco.com>2022-06-09 21:34:09 +0200
committerLuca Muscariello <muscariello@ieee.org>2022-06-30 10:47:50 +0200
commit6b94663b2455e212009a544ae23bb6a8c55407f8 (patch)
tree0af780ce5eeb1009fd24b8af8af08e8368eda3bd /hicn-plugin/src/data_input_node.c
parenta1ac96f497719b897793ac14b287cb8d840651c1 (diff)
refactor(lib, hicn-light, vpp, hiperf): HICN-723
- move infra data structure into the shared lib - new packet cache using double hashing and lookup on prefix suffix - testing updates - authenticated requests using interest manifests Co-authored-by: Mauro Sardara <msardara@cisco.com> Co-authored-by: Jordan Augé <jordan.auge+fdio@cisco.com> Co-authored-by: Michele Papalini <micpapal@cisco.com> Co-authored-by: Olivier Roques <oroques+fdio@cisco.com> Co-authored-by: Enrico Loparco <eloparco@cisco.com> Change-Id: Iaddebfe6aa5279ea8553433b0f519578f6b9ccd9 Signed-off-by: Luca Muscariello <muscariello@ieee.org>
Diffstat (limited to 'hicn-plugin/src/data_input_node.c')
-rw-r--r--hicn-plugin/src/data_input_node.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hicn-plugin/src/data_input_node.c b/hicn-plugin/src/data_input_node.c
index 46fda1080..65bba7b1b 100644
--- a/hicn-plugin/src/data_input_node.c
+++ b/hicn-plugin/src/data_input_node.c
@@ -80,6 +80,7 @@ hicn_data_input_set_adj_index (vlib_buffer_t *b,
const ip46_address_t *dst_addr,
const hicn_dpo_ctx_t *dpo_ctx)
{
+ CLIB_UNUSED (u8 set) = 0;
for (u8 pos = 0; pos < dpo_ctx->entry_count; pos++)
{
hicn_face_t *face = hicn_dpoi_get_from_idx (dpo_ctx->next_hops[pos]);
@@ -87,9 +88,12 @@ hicn_data_input_set_adj_index (vlib_buffer_t *b,
if (ip46_address_cmp (&(face->nat_addr), dst_addr) == 0)
{
vnet_buffer (b)->ip.adj_index[VLIB_RX] = face->dpo.dpoi_index;
+ set = 1;
break;
}
}
+
+ ASSERT (set == 1);
}
static uword
@@ -147,7 +151,7 @@ hicn_data_input_ip6_fn (vlib_main_t *vm, vlib_node_runtime_t *node,
src_addr1 = &ip1->src_address;
ip46_address_set_ip6 (&dst_addr0, &ip0->dst_address);
- ip46_address_set_ip6 (&dst_addr0, &ip1->dst_address);
+ ip46_address_set_ip6 (&dst_addr1, &ip1->dst_address);
ip_lookup_set_buffer_fib_index (im->fib_index_by_sw_if_index, p0);
ip_lookup_set_buffer_fib_index (im->fib_index_by_sw_if_index, p1);
@@ -701,4 +705,4 @@ VNET_FEATURE_INIT (hicn_data_input_ip4_arc, static) = {
.arc_name = "ip4-local",
.node_name = "hicn-data-input-ip4",
.runs_before = VNET_FEATURES ("ip4-local-end-of-arc"),
-};
+}; \ No newline at end of file