Skip to content

Commit 382f391

Browse files
committed
Add Jenkins hash to supported hash algorithms.
Add the option to configure the hash algorithm to the lower or upper 16 bits of a Jenkins hash algorithm (https://en.wikipedia.org/wiki/Jenkins_hash_function). This provides a stronger alternative to the CRC-based algorithms where supported. Signed-off-by: Mike Beresford <mberes@google.com>
1 parent 58d95ce commit 382f391

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

inc/saiswitch.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ typedef enum _sai_hash_algorithm_t
214214
/** Round-robin based hash algorithm (per-packet round-robin spraying) */
215215
SAI_HASH_ALGORITHM_ROUND_ROBIN = 8,
216216

217+
/** Lower 16 bits of Jenkins hash algorithm */
218+
SAI_HASH_ALGORITHM_JENKINS_LO = 9,
219+
220+
/** Upper 16 bits of Jenkins hash algorithm */
221+
SAI_HASH_ALGORITHM_JENKINS_HI = 10,
222+
217223
} sai_hash_algorithm_t;
218224

219225
/**

0 commit comments

Comments
 (0)