MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_hash_find_existing

Function rte_hash_find_existing

dpdk/lib/hash/rte_cuckoo_hash.c:54–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52};
53
54struct rte_hash *
55rte_hash_find_existing(const char *name)
56{
57 struct rte_hash *h = NULL;
58 struct rte_tailq_entry *te;
59 struct rte_hash_list *hash_list;
60
61 hash_list = RTE_TAILQ_CAST(rte_hash_tailq.head, rte_hash_list);
62
63 rte_mcfg_tailq_read_lock();
64 TAILQ_FOREACH(te, hash_list, next) {
65 h = (struct rte_hash *) te->data;
66 if (strncmp(name, h->name, RTE_HASH_NAMESIZE) == 0)
67 break;
68 }
69 rte_mcfg_tailq_read_unlock();
70
71 if (te == NULL) {
72 rte_errno = ENOENT;
73 return NULL;
74 }
75 return h;
76}
77
78static inline struct rte_hash_bucket *
79rte_hash_get_last_bkt(struct rte_hash_bucket *lst_bkt)

Callers 9

memif_socket_initFunction · 0.85
hinic_osdep_initFunction · 0.85
hash_cleanFunction · 0.85
hash_create_freeFunction · 0.85
create_tableFunction · 0.85
test_hash_find_existingFunction · 0.85

Calls 3

rte_mcfg_tailq_read_lockFunction · 0.85
strncmpFunction · 0.85

Tested by 5

hash_cleanFunction · 0.68
hash_create_freeFunction · 0.68
create_tableFunction · 0.68
test_hash_find_existingFunction · 0.68