1*f5fda686SCristian Dumitrescu /* SPDX-License-Identifier: BSD-3-Clause 2*f5fda686SCristian Dumitrescu * Copyright(c) 2022 Intel Corporation 3*f5fda686SCristian Dumitrescu */ 4*f5fda686SCristian Dumitrescu #ifndef __INCLUDE_RTE_SWX_HASH_FUNC_H__ 5*f5fda686SCristian Dumitrescu #define __INCLUDE_RTE_SWX_HASH_FUNC_H__ 6*f5fda686SCristian Dumitrescu 7*f5fda686SCristian Dumitrescu /** 8*f5fda686SCristian Dumitrescu * @file 9*f5fda686SCristian Dumitrescu * RTE SWX Hash Function 10*f5fda686SCristian Dumitrescu */ 11*f5fda686SCristian Dumitrescu 12*f5fda686SCristian Dumitrescu #include <stdint.h> 13*f5fda686SCristian Dumitrescu 14*f5fda686SCristian Dumitrescu /** 15*f5fda686SCristian Dumitrescu * Hash function prototype 16*f5fda686SCristian Dumitrescu * 17*f5fda686SCristian Dumitrescu * @param[in] key 18*f5fda686SCristian Dumitrescu * Key to hash. Must be non-NULL. 19*f5fda686SCristian Dumitrescu * @param[in] length 20*f5fda686SCristian Dumitrescu * Key length in bytes. 21*f5fda686SCristian Dumitrescu * @param[in] seed 22*f5fda686SCristian Dumitrescu * Hash seed. 23*f5fda686SCristian Dumitrescu * @return 24*f5fda686SCristian Dumitrescu * Hash value. 25*f5fda686SCristian Dumitrescu */ 26*f5fda686SCristian Dumitrescu typedef uint32_t 27*f5fda686SCristian Dumitrescu (*rte_swx_hash_func_t)(const void *key, 28*f5fda686SCristian Dumitrescu uint32_t length, 29*f5fda686SCristian Dumitrescu uint32_t seed); 30*f5fda686SCristian Dumitrescu 31*f5fda686SCristian Dumitrescu #endif 32