hash: clarify comment for bucket entries number
This patch adds a comment for RTE_HASH_BUCKET_ENTRIES explaining why a particular value was chosen. Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
This commit is contained in:
parent
f64b299cb3
commit
9da077adb3
@ -101,7 +101,13 @@ const rte_hash_cmp_eq_t cmp_jump_table[NUM_KEY_CMP_CASES] = {
|
||||
#endif
|
||||
|
||||
|
||||
/** Number of items per bucket. */
|
||||
/**
|
||||
* Number of items per bucket.
|
||||
* 8 is a tradeoff between performance and memory consumption.
|
||||
* When it is equal to 8, multiple 'struct rte_hash_bucket' can be fit
|
||||
* on a single cache line (64 or 128 bytes long) without any gaps
|
||||
* in memory between them due to alignment.
|
||||
*/
|
||||
#define RTE_HASH_BUCKET_ENTRIES 8
|
||||
|
||||
#if !RTE_IS_POWER_OF_2(RTE_HASH_BUCKET_ENTRIES)
|
||||
|
Loading…
Reference in New Issue
Block a user