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

Function rte_efd_lookup

dpdk/lib/efd/rte_efd.c:1298–1317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1296}
1297
1298efd_value_t
1299rte_efd_lookup(const struct rte_efd_table * const table,
1300 const unsigned int socket_id, const void *key)
1301{
1302 uint32_t chunk_id, group_id, bin_id;
1303 uint8_t bin_choice;
1304 const struct efd_online_group_entry *group;
1305 const struct efd_online_chunk * const chunks = table->chunks[socket_id];
1306
1307 /* Determine the chunk and group location for the given key */
1308 efd_compute_ids(table, key, &chunk_id, &bin_id);
1309 bin_choice = efd_get_choice(table, socket_id, chunk_id, bin_id);
1310 group_id = efd_bin_to_group[bin_choice][bin_id];
1311 group = &chunks[chunk_id].groups[group_id];
1312
1313 return efd_lookup_internal(group,
1314 EFD_HASHFUNCA(key, table),
1315 EFD_HASHFUNCB(key, table),
1316 table->lookup_fn);
1317}
1318
1319void rte_efd_lookup_bulk(const struct rte_efd_table * const table,
1320 const unsigned int socket_id, const int num_keys,

Callers 5

test_add_deleteFunction · 0.85
test_add_update_deleteFunction · 0.85
test_five_keysFunction · 0.85
timed_lookupsFunction · 0.85

Calls 3

efd_compute_idsFunction · 0.85
efd_get_choiceFunction · 0.85
efd_lookup_internalFunction · 0.85

Tested by 5

test_add_deleteFunction · 0.68
test_add_update_deleteFunction · 0.68
test_five_keysFunction · 0.68
timed_lookupsFunction · 0.68