diff options
author | Luca Muscariello <lumuscar@cisco.com> | 2022-06-09 21:34:09 +0200 |
---|---|---|
committer | Luca Muscariello <muscariello@ieee.org> | 2022-06-30 10:47:50 +0200 |
commit | 6b94663b2455e212009a544ae23bb6a8c55407f8 (patch) | |
tree | 0af780ce5eeb1009fd24b8af8af08e8368eda3bd /hicn-plugin/src/data_pcslookup_node.c | |
parent | a1ac96f497719b897793ac14b287cb8d840651c1 (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_pcslookup_node.c')
-rw-r--r-- | hicn-plugin/src/data_pcslookup_node.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/hicn-plugin/src/data_pcslookup_node.c b/hicn-plugin/src/data_pcslookup_node.c index 69278c306..95db66f54 100644 --- a/hicn-plugin/src/data_pcslookup_node.c +++ b/hicn-plugin/src/data_pcslookup_node.c @@ -63,17 +63,13 @@ hicn_data_pcslookup_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, while (n_left_from > 0 && n_left_to_next > 0) { vlib_buffer_t *b0; - u8 isv6; u8 *nameptr; u16 namelen; u32 bi0; u32 next0 = HICN_DATA_PCSLOOKUP_NEXT_ERROR_DROP; u64 name_hash = 0; - hicn_name_t name; - hicn_header_t *hicn0 = NULL; u32 node_id0 = 0; index_t dpo_ctx_id0 = 0; - int ret0; u8 vft_id0 = 0; u8 is_cs0; u8 hash_entry_id = 0; @@ -104,13 +100,11 @@ hicn_data_pcslookup_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, /* Incr packet counter */ stats.pkts_processed += 1; - ret0 = hicn_data_parse_pkt (b0, &name, &namelen, &hicn0, &isv6); - nameptr = (u8 *) (&name); + hicn_buffer_get_name_and_namelen (b0, &nameptr, &namelen); if (PREDICT_TRUE ( - ret0 == HICN_ERROR_NONE && hicn_hashtb_fullhash (nameptr, namelen, &name_hash) == - HICN_ERROR_NONE)) + HICN_ERROR_NONE)) { int res = hicn_hashtb_lookup_node ( rt->pitcs->pcs_table, nameptr, namelen, name_hash, @@ -154,7 +148,7 @@ hicn_data_pcslookup_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, { hicn_data_pcslookup_trace_t *t = vlib_add_trace (vm, node, b0, sizeof (*t)); - t->pkt_type = HICN_PKT_TYPE_CONTENT; + t->pkt_type = HICN_PACKET_TYPE_DATA; t->sw_if_index = vnet_buffer (b0)->sw_if_index[VLIB_RX]; t->next_index = next0; } @@ -216,4 +210,4 @@ VLIB_REGISTER_NODE(hicn_data_pcslookup_node) = * fd.io coding-style-patch-verification: ON * * Local Variables: eval: (c-set-style "gnu") End: - */ + */
\ No newline at end of file |