* 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 */
| 346 | * Computed bin ID |
| 347 | */ |
| 348 | static inline void |
| 349 | efd_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 |
no test coverage detected