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

Function efd_compute_ids

dpdk/lib/efd/rte_efd.c:348–363  ·  view source on GitHub ↗

* Compute the chunk_id and bin_id for a given key * * @param table * EFD table to reference * @param key * Key to hash and find location of * @param chunk_id * Computed chunk ID * @param bin_id * Computed bin ID */

Source from the content-addressed store, hash-verified

346 * Computed bin ID
347 */
348static inline void
349efd_compute_ids(const struct rte_efd_table * const table,
350 const void *key, uint32_t * const chunk_id, uint32_t * const bin_id)
351{
352 /* Compute the position of the entry in the hash table */
353 uint32_t h = EFD_HASH(key, table);
354
355 /* Compute the chunk_id where that entry can be found */
356 *chunk_id = efd_get_chunk_id(table, h);
357
358 /*
359 * Compute the bin within that chunk where the entry
360 * can be found (0 - 255)
361 */
362 *bin_id = efd_get_bin_id(table, h);
363}
364
365/**
366 * Search for a hash function for a group that satisfies all group results

Callers 4

efd_compute_updateFunction · 0.85
rte_efd_deleteFunction · 0.85
rte_efd_lookupFunction · 0.85
rte_efd_lookup_bulkFunction · 0.85

Calls 2

efd_get_chunk_idFunction · 0.85
efd_get_bin_idFunction · 0.85

Tested by

no test coverage detected