|
Hybrid ICN (hICN) plugin
v21.06-rc0-4-g18fa668
|
#include <stdint.h>#include <vppinfra/bihash_8_8.h>#include <vppinfra/bihash_24_8.h>#include "params.h"#include "parser.h"#include "error.h"

Go to the source code of this file.
Classes | |
| struct | hicn_hash_key_t |
| struct | hicn_hashtb_s |
Typedefs | |
| typedef struct hicn_hashtb_s | hicn_hashtb_t |
| typedef struct hicn_hashtb_s * | hicn_hashtb_h |
Functions | |
| struct | __attribute__ ((packed)) hicn_hash_node_s |
| Structure representing a face. It containes the fields shared among all the types of faces as well it leaves some space for storing additional information specific to each type. More... | |
| STATIC_ASSERT (sizeof(index_t)<=4, "sizeof index_t is greater than 4B") | |
| int | hicn_hashtb_alloc (hicn_hashtb_h *ph, u32 max_elems, size_t app_data_size) |
| int | hicn_hashtb_free (hicn_hashtb_h *ph) |
| u64 | hicn_hashtb_hash_bytestring (const u8 *key, u32 keylen) |
| always_inline hicn_hash_entry_t * | hicn_hashtb_get_entry (hicn_hashtb_h h, u32 entry_idx, u32 bucket_id, u8 bucket_overflow) |
| always_inline u64 | hicn_hashtb_hash_name (const u8 *key, u16 keylen) |
| void | hicn_hashtb_init_node (hicn_hashtb_h h, hicn_hash_node_t *node, const u8 *key, u32 keylen) |
| int | hicn_hashtb_insert (hicn_hashtb_h h, hicn_hash_node_t *node, hicn_hash_entry_t **hash_entry, u64 hash, u32 *node_id, index_t *dpo_ctx_id, u8 *vft_id, u8 *is_cs, u8 *hash_entry_id, u32 *bucket_id, u8 *bucket_is_overflow) |
| int | hicn_hashtb_lookup_node (hicn_hashtb_h h, const u8 *key, u32 keylen, u64 hashval, u8 is_data, u32 *node_id, index_t *dpo_ctx_id, u8 *vft_id, u8 *is_cs, u8 *hash_entry_id, u32 *bucket_id, u8 *bucket_is_overflow) |
| int | hicn_hashtb_lookup_node_ex (hicn_hashtb_h h, const u8 *key, u32 keylen, u64 hashval, u8 is_data, int include_deleted_p, u32 *node_id, index_t *dpo_ctx_id, u8 *vft_id, u8 *is_cs, u8 *hash_entry_id, u32 *bucket_id, u8 *bucket_is_overflow) |
| int | hicn_node_compare (const u8 *key, u32 keylen, hicn_hash_node_t *node) |
| Compares the key in the node with the given key. More... | |
| void | hicn_hashtb_remove_node (hicn_hashtb_h h, hicn_hash_node_t *node, u64 hashval) |
| void | hicn_hashtb_delete (hicn_hashtb_h h, hicn_hash_node_t **pnode, u64 hashval) |
| void | hicn_hashtb_init_entry (hicn_hash_entry_t *entry, u32 nodeidx, u64 hashval, u32 locks) |
| void | hicn_hashtb_free_node (hicn_hashtb_h h, hicn_hash_node_t *node) |
| int | hicn_hashtb_next_node (hicn_hashtb_h h, hicn_hash_node_t **pnode, u64 *ctx) |
| int | hicn_hashtb_key_to_str (hicn_hashtb_h h, const hicn_hash_node_t *node, char *buf, int bufsize, int must_fit) |
| always_inline int | hicn_hashtb_fullhash (const u8 *name, u16 namelen, u64 *name_hash) |
Variables | |
| hicn_hash_node_t | |
| hicn_hash_entry_t | |
| hicn_hash_bucket_t | |
| u32 | ht_node_data_offset_aligned |
Lookup is finding a hashtable record whose name matches the name being looked up. Most of the lookup work is based on the hash value of the two names. Note that the intel cache line size is 64 bytes, and some platforms load in 2 cache lines together.
Some hashtables (for which rare false positives are tolerable) store hash values but no keys. (In ISM NDN forwarder, this was used for dcm_dpf: data cache manager's dataplane filter, where speed was critical and very rare false positives would be detected in the full dcm check.) - No key buffers are used (or even allocated at hash table creation).
| struct __attribute__ | ( | (packed) | ) |
Structure representing a face. It containes the fields shared among all the types of faces as well it leaves some space for storing additional information specific to each type.
Key definition for the mhash table. An face is uniquely identified by ip address, the interface id and a dpo pointing to the next node in the vlib graph. The ip address can correspond to the remote ip address of the next hicn hop, or to the local address of the receiving interface. The former is used to retrieve the incoming face when an interest is received, the latter when the arring packet is a data. If the face is a regular face In case of iface, the following structure can be filled in different ways:
| int hicn_node_compare | ( | const u8 * | key, |
| u32 | keylen, | ||
| hicn_hash_node_t * | node | ||
| ) |
Compares the key in the node with the given key.
This function allows to split the hash verification from the comparison of the entire key. Useful to exploit prefertching.
1.8.17