1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2001-2021 Intel Corporation
5 #ifndef _ICE_PARSER_RT_H_
6 #define _ICE_PARSER_RT_H_
10 #define ICE_PARSER_MAX_PKT_LEN 504
11 #define ICE_PARSER_GPR_NUM 128
12 #define ICE_PARSER_HDR_BUF_LEN 32
13 #define ICE_PARSER_BST_KEY_LEN 20
14 #define ICE_PARSER_MARKER_NUM_IN_BYTES 9 /* 72 bits */
15 #define ICE_PARSER_PROTO_NUM 256
18 /* flag to indicate if GRP needs to be updated */
19 bool gpr_val_upd[ICE_PARSER_GPR_NUM];
20 u16 gpr_val[ICE_PARSER_GPR_NUM];
27 struct ice_parser_rt {
28 struct ice_parser *psr;
29 u16 gpr[ICE_PARSER_GPR_NUM];
30 u8 pkt_buf[ICE_PARSER_MAX_PKT_LEN + ICE_PARSER_HDR_BUF_LEN];
33 u8 bst_key[ICE_PARSER_BST_KEY_LEN];
34 struct ice_pg_cam_key pg_key;
38 struct ice_pg_cam_action *action;
41 u8 markers[ICE_PARSER_MARKER_NUM_IN_BYTES];
42 bool protocols[ICE_PARSER_PROTO_NUM];
43 u16 offsets[ICE_PARSER_PROTO_NUM];
46 void ice_parser_rt_reset(struct ice_parser_rt *rt);
47 void ice_parser_rt_pktbuf_set(struct ice_parser_rt *rt, const u8 *pkt_buf,
50 struct ice_parser_result;
51 enum ice_status ice_parser_rt_execute(struct ice_parser_rt *rt,
52 struct ice_parser_result *rslt);
53 #endif /* _ICE_PARSER_RT_H_ */