4 #ifndef __INCLUDE_RTE_SWX_PIPELINE_H__ 5 #define __INCLUDE_RTE_SWX_PIPELINE_H__ 19 #include <rte_compat.h> 26 #ifndef RTE_SWX_NAME_SIZE 27 #define RTE_SWX_NAME_SIZE 64 31 #ifndef RTE_SWX_INSTRUCTION_SIZE 32 #define RTE_SWX_INSTRUCTION_SIZE 256 36 #ifndef RTE_SWX_INSTRUCTION_TOKENS_MAX 37 #define RTE_SWX_INSTRUCTION_TOKENS_MAX 16 45 struct rte_swx_pipeline;
111 const char *port_type_name,
160 const char *port_type_name,
193 const char *mailbox_struct_type_name,
218 const char *extern_type_name,
245 const char *extern_type_name,
272 const char *mailbox_struct_type_name,
332 int last_field_has_variable_size);
354 const char *struct_type_name);
370 const char *struct_type_name);
506 const char *args_struct_type_name,
507 const char **instructions,
508 uint32_t n_instructions);
637 const char *recommended_table_type_name,
836 const char **instructions,
837 uint32_t n_instructions);
882 const char **err_msg);
895 uint32_t n_instructions);
__rte_experimental int rte_swx_pipeline_port_out_type_register(struct rte_swx_pipeline *p, const char *name, struct rte_swx_port_out_ops *ops)
int(* rte_swx_extern_func_t)(void *mailbox)
__rte_experimental int rte_swx_pipeline_table_type_register(struct rte_swx_pipeline *p, const char *name, enum rte_swx_table_match_type match_type, struct rte_swx_table_ops *ops)
const char ** field_names
__rte_experimental int rte_swx_pipeline_port_out_config(struct rte_swx_pipeline *p, uint32_t port_id, const char *port_type_name, void *args)
int * action_is_for_table_entries
__rte_experimental int rte_swx_pipeline_packet_header_register(struct rte_swx_pipeline *p, const char *name, const char *struct_type_name)
uint8_t * default_action_data
__rte_experimental int rte_swx_pipeline_selector_config(struct rte_swx_pipeline *p, const char *name, struct rte_swx_pipeline_selector_params *params)
int default_action_is_const
__rte_experimental int rte_swx_pipeline_config(struct rte_swx_pipeline **p, int numa_node)
int * action_is_for_default_entry
const char * default_action_name
__rte_experimental int rte_swx_pipeline_learner_config(struct rte_swx_pipeline *p, const char *name, struct rte_swx_pipeline_learner_params *params, uint32_t size, uint32_t timeout)
__rte_experimental void rte_swx_pipeline_run(struct rte_swx_pipeline *p, uint32_t n_instructions)
struct rte_swx_match_field_params * fields
__rte_experimental int rte_swx_pipeline_instructions_config(struct rte_swx_pipeline *p, const char **instructions, uint32_t n_instructions)
__rte_experimental int rte_swx_pipeline_build_from_spec(struct rte_swx_pipeline *p, FILE *spec, uint32_t *err_line, const char **err_msg)
const char ** action_names
__rte_experimental int rte_swx_pipeline_extern_type_member_func_register(struct rte_swx_pipeline *p, const char *extern_type_name, const char *name, rte_swx_extern_type_member_func_t member_func)
int default_action_is_const
uint8_t * default_action_data
int * action_is_for_default_entry
__rte_experimental int rte_swx_pipeline_extern_object_config(struct rte_swx_pipeline *p, const char *extern_type_name, const char *name, const char *args)
const char ** selector_field_names
const char * group_id_field_name
__rte_experimental void rte_swx_pipeline_free(struct rte_swx_pipeline *p)
__rte_experimental int rte_swx_pipeline_metarray_config(struct rte_swx_pipeline *p, const char *name, uint32_t size)
__rte_experimental int rte_swx_pipeline_regarray_config(struct rte_swx_pipeline *p, const char *name, uint32_t size, uint64_t init_val)
void(* rte_swx_extern_type_destructor_t)(void *object)
uint32_t n_members_per_group_max
uint32_t n_selector_fields
__rte_experimental int rte_swx_pipeline_port_in_type_register(struct rte_swx_pipeline *p, const char *name, struct rte_swx_port_in_ops *ops)
__rte_experimental void rte_swx_pipeline_flush(struct rte_swx_pipeline *p)
void *(* rte_swx_extern_type_constructor_t)(const char *args)
const char ** action_names
const char * member_id_field_name
int * action_is_for_table_entries
const char * default_action_name
__rte_experimental int rte_swx_pipeline_build(struct rte_swx_pipeline *p)
__rte_experimental int rte_swx_pipeline_packet_metadata_register(struct rte_swx_pipeline *p, const char *struct_type_name)
__rte_experimental int rte_swx_pipeline_extern_type_register(struct rte_swx_pipeline *p, const char *name, const char *mailbox_struct_type_name, rte_swx_extern_type_constructor_t constructor, rte_swx_extern_type_destructor_t destructor)
__rte_experimental int rte_swx_pipeline_table_config(struct rte_swx_pipeline *p, const char *name, struct rte_swx_pipeline_table_params *params, const char *recommended_table_type_name, const char *args, uint32_t size)
__rte_experimental int rte_swx_pipeline_struct_type_register(struct rte_swx_pipeline *p, const char *name, struct rte_swx_field_params *fields, uint32_t n_fields, int last_field_has_variable_size)
__rte_experimental int rte_swx_pipeline_action_config(struct rte_swx_pipeline *p, const char *name, const char *args_struct_type_name, const char **instructions, uint32_t n_instructions)
int(* rte_swx_extern_type_member_func_t)(void *object, void *mailbox)
__rte_experimental int rte_swx_pipeline_port_in_config(struct rte_swx_pipeline *p, uint32_t port_id, const char *port_type_name, void *args)
__rte_experimental int rte_swx_pipeline_extern_func_register(struct rte_swx_pipeline *p, const char *name, const char *mailbox_struct_type_name, rte_swx_extern_func_t func)