1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2021 HiSilicon Limited
10 struct hns3_flow_counter {
11 LIST_ENTRY(hns3_flow_counter) next; /* Pointer to the next counter. */
12 uint32_t indirect:1; /* Indirect counter flag */
13 uint32_t ref_cnt:31; /* Reference counter. */
14 uint16_t id; /* Counter ID. */
15 uint64_t hits; /* Number of packets matched by the rule. */
19 enum rte_filter_type filter_type;
24 /* rss filter list structure */
25 struct hns3_rss_conf_ele {
26 TAILQ_ENTRY(hns3_rss_conf_ele) entries;
27 struct hns3_rss_conf filter_info;
30 /* hns3_flow memory list structure */
31 struct hns3_flow_mem {
32 TAILQ_ENTRY(hns3_flow_mem) entries;
33 struct rte_flow *flow;
37 HNS3_INDIRECT_ACTION_TYPE_COUNT = 1,
40 struct rte_flow_action_handle {
45 TAILQ_HEAD(hns3_rss_filter_list, hns3_rss_conf_ele);
46 TAILQ_HEAD(hns3_flow_mem_list, hns3_flow_mem);
48 int hns3_dev_flow_ops_get(struct rte_eth_dev *dev,
49 const struct rte_flow_ops **ops);
50 void hns3_flow_init(struct rte_eth_dev *dev);
51 void hns3_flow_uninit(struct rte_eth_dev *dev);
53 #endif /* _HNS3_FLOW_H_ */