6 #ifndef RTE_FLOW_DRIVER_H_ 7 #define RTE_FLOW_DRIVER_H_ 21 #include "ethdev_driver.h" 42 (
struct rte_eth_dev *,
48 struct rte_flow *(*create)
49 (
struct rte_eth_dev *,
56 (
struct rte_eth_dev *,
61 (
struct rte_eth_dev *,
65 (
struct rte_eth_dev *,
72 (
struct rte_eth_dev *,
77 (
struct rte_eth_dev *dev,
78 struct rte_flow *flow,
83 (
struct rte_eth_dev *dev,
89 (
struct rte_eth_dev *dev,
95 struct rte_flow_action_handle *(*action_handle_create)
96 (
struct rte_eth_dev *dev,
102 (
struct rte_eth_dev *dev,
103 struct rte_flow_action_handle *handle,
107 (
struct rte_eth_dev *dev,
108 struct rte_flow_action_handle *handle,
113 (
struct rte_eth_dev *dev,
114 const struct rte_flow_action_handle *handle,
119 (
struct rte_eth_dev *dev,
120 struct rte_flow_action_handle *handle,
121 const void *update,
void *
query,
125 struct rte_flow_action_list_handle *(*action_list_handle_create)
126 (
struct rte_eth_dev *dev,
132 (
struct rte_eth_dev *dev,
133 struct rte_flow_action_list_handle *handle,
137 (
struct rte_eth_dev *dev,
138 struct rte_flow_tunnel *tunnel,
140 uint32_t *num_of_actions,
144 (
struct rte_eth_dev *dev,
145 struct rte_flow_tunnel *tunnel,
147 uint32_t *num_of_items,
151 (
struct rte_eth_dev *dev,
157 (
struct rte_eth_dev *dev,
159 uint32_t num_of_actions,
163 (
struct rte_eth_dev *dev,
165 uint32_t num_of_items,
169 (
struct rte_eth_dev *dev,
170 uint16_t *proxy_port_id,
172 struct rte_flow_item_flex_handle *(*flex_item_create)
173 (
struct rte_eth_dev *dev,
176 int (*flex_item_release)
177 (
struct rte_eth_dev *dev,
178 const struct rte_flow_item_flex_handle *handle,
182 (
struct rte_eth_dev *dev,
188 (
struct rte_eth_dev *dev,
194 struct rte_flow_pattern_template *(*pattern_template_create)
195 (
struct rte_eth_dev *dev,
201 (
struct rte_eth_dev *dev,
202 struct rte_flow_pattern_template *pattern_template,
205 struct rte_flow_actions_template *(*actions_template_create)
206 (
struct rte_eth_dev *dev,
213 (
struct rte_eth_dev *dev,
214 struct rte_flow_actions_template *actions_template,
217 struct rte_flow_template_table *(*template_table_create)
218 (
struct rte_eth_dev *dev,
220 struct rte_flow_pattern_template *pattern_templates[],
221 uint8_t nb_pattern_templates,
222 struct rte_flow_actions_template *actions_templates[],
223 uint8_t nb_actions_templates,
227 (
struct rte_eth_dev *dev,
228 struct rte_flow_template_table *template_table,
232 (
struct rte_eth_dev *dev,
234 const struct rte_flow_group_attr *attr,
239 (
struct rte_eth_dev *dev,
240 struct rte_flow *flow,
245 (
struct rte_eth_dev *dev,
246 const struct rte_flow_action_list_handle *handle,
247 const void **update,
void **
query,
252 (
struct rte_eth_dev *dev,
const struct rte_flow_template_table *table,
253 const struct rte_flow_item pattern[], uint8_t pattern_template_index,
262 struct rte_flow_template_table *table,
268 struct rte_flow *rule,
void *user_data,
272 (
struct rte_eth_dev *dev,
273 struct rte_flow_template_table *table,
300 typedef struct rte_flow *(*rte_flow_async_create_t)(
struct rte_eth_dev *dev,
303 struct rte_flow_template_table *table,
305 uint8_t pattern_template_index,
307 uint8_t action_template_index,
312 typedef struct rte_flow *(*rte_flow_async_create_by_index_t)(
struct rte_eth_dev *dev,
315 struct rte_flow_template_table *table,
318 uint8_t action_template_index,
323 typedef int (*rte_flow_async_actions_update_t)(
struct rte_eth_dev *dev,
326 struct rte_flow *flow,
328 uint8_t actions_template_index,
333 typedef int (*rte_flow_async_destroy_t)(
struct rte_eth_dev *dev,
336 struct rte_flow *flow,
341 typedef int (*rte_flow_push_t)(
struct rte_eth_dev *dev,
346 typedef int (*rte_flow_pull_t)(
struct rte_eth_dev *dev,
353 typedef struct rte_flow_action_handle *(*rte_flow_async_action_handle_create_t)(
354 struct rte_eth_dev *dev,
363 typedef int (*rte_flow_async_action_handle_destroy_t)(
struct rte_eth_dev *dev,
366 struct rte_flow_action_handle *action_handle,
371 typedef int (*rte_flow_async_action_handle_update_t)(
struct rte_eth_dev *dev,
374 struct rte_flow_action_handle *action_handle,
380 typedef int (*rte_flow_async_action_handle_query_t)
381 (
struct rte_eth_dev *dev,
384 const struct rte_flow_action_handle *action_handle,
390 typedef int (*rte_flow_async_action_handle_query_update_t)(
struct rte_eth_dev *dev,
393 struct rte_flow_action_handle *handle,
394 const void *update,
void *
query,
400 typedef struct rte_flow_action_list_handle *(*rte_flow_async_action_list_handle_create_t)(
401 struct rte_eth_dev *dev,
410 typedef int (*rte_flow_async_action_list_handle_destroy_t)(
411 struct rte_eth_dev *dev,
414 struct rte_flow_action_list_handle *handle,
419 typedef int (*rte_flow_async_action_list_handle_query_update_t)(
420 struct rte_eth_dev *dev,
423 const struct rte_flow_action_list_handle *handle,
436 rte_flow_async_create_t async_create;
437 rte_flow_async_create_by_index_t async_create_by_index;
438 rte_flow_async_actions_update_t async_actions_update;
439 rte_flow_async_destroy_t async_destroy;
440 rte_flow_push_t push;
441 rte_flow_pull_t pull;
442 rte_flow_async_action_handle_create_t async_action_handle_create;
443 rte_flow_async_action_handle_destroy_t async_action_handle_destroy;
444 rte_flow_async_action_handle_update_t async_action_handle_update;
445 rte_flow_async_action_handle_query_t async_action_handle_query;
446 rte_flow_async_action_handle_query_update_t async_action_handle_query_update;
447 rte_flow_async_action_list_handle_create_t async_action_list_handle_create;
448 rte_flow_async_action_list_handle_destroy_t async_action_list_handle_destroy;
449 rte_flow_async_action_list_handle_query_update_t async_action_list_handle_query_update;
456 extern struct rte_flow_fp_ops rte_flow_fp_default_ops;
int(* tunnel_item_release)(struct rte_eth_dev *dev, struct rte_flow_item *pmd_items, uint32_t num_of_items, struct rte_flow_error *err)
int(* group_set_miss_actions)(struct rte_eth_dev *dev, uint32_t group_id, const struct rte_flow_group_attr *attr, const struct rte_flow_action actions[], struct rte_flow_error *err)
int(* action_list_handle_destroy)(struct rte_eth_dev *dev, struct rte_flow_action_list_handle *handle, struct rte_flow_error *error)
int(* action_handle_query_update)(struct rte_eth_dev *dev, struct rte_flow_action_handle *handle, const void *update, void *query, enum rte_flow_query_update_mode qu_mode, struct rte_flow_error *error)
rte_flow_encap_hash_field
int(* template_table_destroy)(struct rte_eth_dev *dev, struct rte_flow_template_table *template_table, struct rte_flow_error *err)
int(* actions_update)(struct rte_eth_dev *dev, struct rte_flow *flow, const struct rte_flow_action actions[], struct rte_flow_error *error)
int(* actions_template_destroy)(struct rte_eth_dev *dev, struct rte_flow_actions_template *actions_template, struct rte_flow_error *err)
int(* get_q_aged_flows)(struct rte_eth_dev *dev, uint32_t queue_id, void **contexts, uint32_t nb_contexts, struct rte_flow_error *error)
int(* tunnel_match)(struct rte_eth_dev *dev, struct rte_flow_tunnel *tunnel, struct rte_flow_item **pmd_items, uint32_t *num_of_items, struct rte_flow_error *err)
int(* query)(struct rte_eth_dev *, struct rte_flow *, const struct rte_flow_action *, void *, struct rte_flow_error *)
#define __rte_cache_aligned
int(* action_handle_query)(struct rte_eth_dev *dev, const struct rte_flow_action_handle *handle, void *data, struct rte_flow_error *error)
int(* info_get)(struct rte_eth_dev *dev, struct rte_flow_port_info *port_info, struct rte_flow_queue_info *queue_info, struct rte_flow_error *err)
int(* validate)(struct rte_eth_dev *, const struct rte_flow_attr *, const struct rte_flow_item [], const struct rte_flow_action [], struct rte_flow_error *)
int(* pattern_template_destroy)(struct rte_eth_dev *dev, struct rte_flow_pattern_template *pattern_template, struct rte_flow_error *err)
int(* get_aged_flows)(struct rte_eth_dev *dev, void **context, uint32_t nb_contexts, struct rte_flow_error *err)
int(* action_handle_destroy)(struct rte_eth_dev *dev, struct rte_flow_action_handle *handle, struct rte_flow_error *error)
int(* pick_transfer_proxy)(struct rte_eth_dev *dev, uint16_t *proxy_port_id, struct rte_flow_error *error)
int rte_flow_restore_info_dynflag_register(void)
int(* flow_template_table_resize)(struct rte_eth_dev *dev, struct rte_flow_template_table *table, uint32_t nb_rules, struct rte_flow_error *error)
int(* flow_update_resized)(struct rte_eth_dev *dev, uint32_t queue, const struct rte_flow_op_attr *attr, struct rte_flow *rule, void *user_data, struct rte_flow_error *error)
int(* tunnel_decap_set)(struct rte_eth_dev *dev, struct rte_flow_tunnel *tunnel, struct rte_flow_action **pmd_actions, uint32_t *num_of_actions, struct rte_flow_error *err)
int(* get_restore_info)(struct rte_eth_dev *dev, struct rte_mbuf *m, struct rte_flow_restore_info *info, struct rte_flow_error *err)
rte_flow_query_update_mode
int(* flow_template_table_resize_complete)(struct rte_eth_dev *dev, struct rte_flow_template_table *table, struct rte_flow_error *error)
int(* flow_calc_table_hash)(struct rte_eth_dev *dev, const struct rte_flow_template_table *table, const struct rte_flow_item pattern[], uint8_t pattern_template_index, uint32_t *hash, struct rte_flow_error *error)
int(* tunnel_action_decap_release)(struct rte_eth_dev *dev, struct rte_flow_action *pmd_actions, uint32_t num_of_actions, struct rte_flow_error *err)
int(* action_list_handle_query_update)(struct rte_eth_dev *dev, const struct rte_flow_action_list_handle *handle, const void **update, void **query, enum rte_flow_query_update_mode mode, struct rte_flow_error *error)
int(* isolate)(struct rte_eth_dev *, int, struct rte_flow_error *)
int(* flow_calc_encap_hash)(struct rte_eth_dev *dev, const struct rte_flow_item pattern[], enum rte_flow_encap_hash_field dest_field, uint8_t *hash, struct rte_flow_error *error)
int(* flush)(struct rte_eth_dev *, struct rte_flow_error *)
int(* dev_dump)(struct rte_eth_dev *dev, struct rte_flow *flow, FILE *file, struct rte_flow_error *error)
int(* destroy)(struct rte_eth_dev *, struct rte_flow *, struct rte_flow_error *)
int(* configure)(struct rte_eth_dev *dev, const struct rte_flow_port_attr *port_attr, uint16_t nb_queue, const struct rte_flow_queue_attr *queue_attr[], struct rte_flow_error *err)
int(* action_handle_update)(struct rte_eth_dev *dev, struct rte_flow_action_handle *handle, const void *update, struct rte_flow_error *error)
const struct rte_flow_ops * rte_flow_ops_get(uint16_t port_id, struct rte_flow_error *error)