xref: /dpdk/drivers/net/ntnic/include/hw_mod_hsh_v5.h (revision 7917b0d38e92e8b9ec5a870415b791420e10f11a)
1 /*
2  * SPDX-License-Identifier: BSD-3-Clause
3  * Copyright(c) 2023 Napatech A/S
4  */
5 
6 #ifndef _HW_MOD_HSH_V5_H_
7 #define _HW_MOD_HSH_V5_H_
8 
9 #include <stdint.h>
10 
11 #define HSH_RCP_MAC_PORT_MASK_SIZE 4
12 #define HSH_RCP_WORD_MASK_SIZE 10
13 /* Toeplitz hash key size in 32-bit words, e.g. 10 words means 320 bits, i.e. 40 Bytes */
14 #define HSH_RCP_KEY_SIZE 10
15 
16 struct hsh_v5_rcp_s {
17 	uint32_t load_dist_type;
18 	uint32_t mac_port_mask[HSH_RCP_MAC_PORT_MASK_SIZE];
19 	uint32_t sort;
20 	uint32_t qw0_pe;
21 	int32_t qw0_ofs;
22 	uint32_t qw4_pe;
23 	int32_t qw4_ofs;
24 	uint32_t w8_pe;
25 	int32_t w8_ofs;
26 	uint32_t w8_sort;
27 	uint32_t w9_pe;
28 	int32_t w9_ofs;
29 	uint32_t w9_sort;
30 	uint32_t w9_p;
31 	uint32_t p_mask;
32 	uint32_t word_mask[HSH_RCP_WORD_MASK_SIZE];
33 	uint32_t seed;
34 	uint32_t tnl_p;
35 	uint32_t hsh_valid;
36 	uint32_t hsh_type;
37 	uint32_t toeplitz;	/* Toeplitz enabled / disabled */
38 	uint32_t k[HSH_RCP_KEY_SIZE];	/* Toeplitz hash key */
39 	uint32_t auto_ipv4_mask;
40 };
41 
42 struct hw_mod_hsh_v5_s {
43 	struct hsh_v5_rcp_s *rcp;
44 };
45 
46 #endif	/* _HW_MOD_HSH_V5_H_ */
47