net/mlx5: support more tunnel types
[dpdk.git] / drivers / net / ice / base / ice_parser_util.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2001-2021 Intel Corporation
3  */
4
5 #ifndef _ICE_PARSER_UTIL_H_
6 #define _ICE_PARSER_UTIL_H_
7
8 #include "ice_imem.h"
9 #include "ice_metainit.h"
10
11 struct ice_lbl_item {
12         u16 idx;
13         char label[64];
14 };
15
16 struct ice_pkg_sect_hdr {
17         __le16 count;
18         __le16 offset;
19 };
20
21 void ice_lbl_dump(struct ice_hw *hw, struct ice_lbl_item *item);
22 void ice_parse_item_dflt(struct ice_hw *hw, u16 idx, void *item,
23                          void *data, int size);
24
25 void *ice_parser_sect_item_get(u32 sect_type, void *section,
26                                u32 index, u32 *offset);
27
28 void *ice_parser_create_table(struct ice_hw *hw, u32 sect_type,
29                               u32 item_size, u32 length,
30                               void *(*handler)(u32 sect_type, void *section,
31                                                u32 index, u32 *offset),
32                               void (*parse_item)(struct ice_hw *hw, u16 idx,
33                                                  void *item, void *data,
34                                                  int size),
35                               bool no_offset);
36 #endif /* _ICE_PARSER_UTIL_H_ */