summaryrefslogtreecommitdiff
path: root/lib/table/rte_swx_hash_func.h
blob: 25a93ac60a07251ab3b56ff1d226397e41802f32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright(c) 2022 Intel Corporation
 */
#ifndef __INCLUDE_RTE_SWX_HASH_FUNC_H__
#define __INCLUDE_RTE_SWX_HASH_FUNC_H__

/**
 * @file
 * RTE SWX Hash Function
 */

#include <stdint.h>

/**
 * Hash function prototype
 *
 * @param[in] key
 *   Key to hash. Must be non-NULL.
 * @param[in] length
 *   Key length in bytes.
 * @param[in] seed
 *   Hash seed.
 * @return
 *   Hash value.
 */
typedef uint32_t
(*rte_swx_hash_func_t)(const void *key,
		       uint32_t length,
		       uint32_t seed);

#endif