Data Accelerator Offload
Loading...
Searching...
No Matches
dao_flow.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: Marvell-MIT
2 * Copyright (c) 2024 Marvell.
3 */
4
5#ifndef __DAO_FLOW_OFFLOAD_H__
6#define __DAO_FLOW_OFFLOAD_H__
7
14#include <rte_flow.h>
15
17#define DAO_FLOW_PROFILE_NAME_MAX 60
18
22 uint32_t reset : 1;
24 uint32_t hits_set : 1;
26 uint32_t bytes_set : 1;
28 uint32_t reserved : 29;
30 uint64_t hits;
32 uint64_t bytes;
34 uint64_t acl_rule_hits;
35};
36
40 uint32_t dao_flow;
41 /* Number of HW offload flows per port */
42 uint32_t hw_offload_flow;
44 uint32_t acl_rule;
45};
46
49#define DAO_FLOW_HW_OFFLOAD_ENABLE RTE_BIT64(0)
51 uint32_t feature;
55 uint32_t aging_tmo_sec;
56};
57
59struct dao_flow {
61 struct acl_rule_data *arule;
63 uint32_t acl_rule_id;
65 struct hw_offload_flow *hflow;
67 uint16_t port_id;
69 uint16_t tbl_id;
70};
71
85int dao_flow_init(uint16_t port_id, struct dao_flow_offload_config *config);
86
95int dao_flow_fini(uint16_t port_id);
96
113struct dao_flow *dao_flow_create(uint16_t port_id, const struct rte_flow_attr *attr,
114 const struct rte_flow_item pattern[],
115 const struct rte_flow_action actions[],
116 struct rte_flow_error *error);
117
134struct dao_flow *dao_flow_hw_install(uint16_t port_id, const struct rte_flow_attr *attr,
135 const struct rte_flow_item pattern[],
136 const struct rte_flow_action actions[],
137 struct rte_flow_error *error);
138
152int dao_flow_destroy(uint16_t port_id, struct dao_flow *flow, struct rte_flow_error *error);
153
168int dao_flow_hw_uninstall(uint16_t port_id, struct dao_flow *flow, struct rte_flow_error *error);
169
187int dao_flow_lookup(uint16_t port_id, struct rte_mbuf **objs, uint16_t nb_objs);
188
210int dao_flow_query(uint16_t port_id, struct dao_flow *flow, const struct rte_flow_action *action,
211 void *data, struct rte_flow_error *error);
212
228int dao_flow_dev_dump(uint16_t port_id, struct dao_flow *flow, FILE *file,
229 struct rte_flow_error *error);
230
246int dao_flow_flush(uint16_t port_id, struct rte_flow_error *error);
247
263int dao_flow_info(uint16_t port_id, FILE *file, struct rte_flow_error *error);
264
280int dao_flow_count(uint16_t port_id, struct dao_flow_count *count, struct rte_flow_error *error);
281#endif /* __DAO_FLOW_OFFLOAD_H__ */
#define DAO_FLOW_PROFILE_NAME_MAX
Definition dao_flow.h:17
int dao_flow_info(uint16_t port_id, FILE *file, struct rte_flow_error *error)
int dao_flow_fini(uint16_t port_id)
int dao_flow_dev_dump(uint16_t port_id, struct dao_flow *flow, FILE *file, struct rte_flow_error *error)
int dao_flow_init(uint16_t port_id, struct dao_flow_offload_config *config)
struct dao_flow * dao_flow_hw_install(uint16_t port_id, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], struct rte_flow_error *error)
int dao_flow_destroy(uint16_t port_id, struct dao_flow *flow, struct rte_flow_error *error)
struct dao_flow * dao_flow_create(uint16_t port_id, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], struct rte_flow_error *error)
int dao_flow_flush(uint16_t port_id, struct rte_flow_error *error)
int dao_flow_lookup(uint16_t port_id, struct rte_mbuf **objs, uint16_t nb_objs)
int dao_flow_hw_uninstall(uint16_t port_id, struct dao_flow *flow, struct rte_flow_error *error)
int dao_flow_query(uint16_t port_id, struct dao_flow *flow, const struct rte_flow_action *action, void *data, struct rte_flow_error *error)
uint32_t dao_flow
Definition dao_flow.h:40
uint32_t acl_rule
Definition dao_flow.h:44
char parse_profile[DAO_FLOW_PROFILE_NAME_MAX]
Definition dao_flow.h:53
uint64_t acl_rule_hits
Definition dao_flow.h:34
uint16_t port_id
Definition dao_flow.h:67
struct acl_rule_data * arule
Definition dao_flow.h:61
uint32_t acl_rule_id
Definition dao_flow.h:63
uint16_t tbl_id
Definition dao_flow.h:69
struct hw_offload_flow * hflow
Definition dao_flow.h:65