net/ice/base: add helper function for boost TCAM match
[dpdk.git] / drivers / net / ice / base / ice_bst_tcam.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2001-2021 Intel Corporation
3  */
4
5 #ifndef _ICE_BST_TCAM_H_
6 #define _ICE_BST_TCAM_H_
7
8 #include "ice_imem.h"
9
10 struct ice_bst_tcam_item {
11         u16 address;
12         u8 key[20];
13         u8 key_inv[20];
14         u8 hit_idx_grp;
15         u8 pg_pri;
16         struct ice_np_keybuilder np_kb;
17         struct ice_pg_keybuilder pg_kb;
18         struct ice_alu alu0;
19         struct ice_alu alu1;
20         struct ice_alu alu2;
21 };
22
23 void ice_bst_tcam_dump(struct ice_hw *hw, struct ice_bst_tcam_item *item);
24
25 struct ice_bst_tcam_item *ice_bst_tcam_table_get(struct ice_hw *hw);
26
27 struct ice_lbl_item *ice_bst_lbl_table_get(struct ice_hw *hw);
28
29 struct ice_bst_tcam_item *
30 ice_bst_tcam_match(struct ice_bst_tcam_item *tcam_table, u8 *pat);
31 #endif /*_ICE_BST_TCAM_H_ */