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 shared:1; /* Share counter ID with other flow rules. */
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;
36 TAILQ_HEAD(hns3_rss_filter_list, hns3_rss_conf_ele);
37 TAILQ_HEAD(hns3_flow_mem_list, hns3_flow_mem);
39 int hns3_dev_flow_ops_get(struct rte_eth_dev *dev,
40 const struct rte_flow_ops **ops);
41 void hns3_flow_init(struct rte_eth_dev *dev);
42 void hns3_flow_uninit(struct rte_eth_dev *dev);
44 #endif /* _HNS3_FLOW_H_ */