From 6b94663b2455e212009a544ae23bb6a8c55407f8 Mon Sep 17 00:00:00 2001 From: Luca Muscariello Date: Thu, 9 Jun 2022 21:34:09 +0200 Subject: 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mauro Sardara Co-authored-by: Jordan Augé Co-authored-by: Michele Papalini Co-authored-by: Olivier Roques Co-authored-by: Enrico Loparco Change-Id: Iaddebfe6aa5279ea8553433b0f519578f6b9ccd9 Signed-off-by: Luca Muscariello --- hicn-plugin/src/data_input_node.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'hicn-plugin/src/data_input_node.c') 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 -- cgit 1.2.3-korg