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,
167 #ifndef RTE_SWX_PACKET_MIRRORING_SLOTS_DEFAULT 168 #define RTE_SWX_PACKET_MIRRORING_SLOTS_DEFAULT 4 172 #ifndef RTE_SWX_PACKET_MIRRORING_SESSIONS_DEFAULT 173 #define RTE_SWX_PACKET_MIRRORING_SESSIONS_DEFAULT 64 233 const char *mailbox_struct_type_name,
258 const char *extern_type_name,
285 const char *extern_type_name,
312 const char *mailbox_struct_type_name,
413 int last_field_has_variable_size);
435 const char *struct_type_name);
451 const char *struct_type_name);
587 const char *args_struct_type_name,
588 const char **instructions,
589 uint32_t n_instructions);
719 const char *recommended_table_type_name,
857 uint32_t n_timeouts);
922 const char **instructions,
923 uint32_t n_instructions);
968 const char **err_msg);
981 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)
__rte_experimental int rte_swx_pipeline_hash_func_register(struct rte_swx_pipeline *p, const char *name, rte_swx_hash_func_t func)
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)
__rte_experimental int rte_swx_pipeline_selector_config(struct rte_swx_pipeline *p, const char *name, struct rte_swx_pipeline_selector_params *params)
const char * default_action_args
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_mirroring_config(struct rte_swx_pipeline *p, struct rte_swx_pipeline_mirroring_params *params)
__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
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)
uint32_t(* rte_swx_hash_func_t)(const void *key, uint32_t length, uint32_t seed)
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)
const char * default_action_args
__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_learner_config(struct rte_swx_pipeline *p, const char *name, struct rte_swx_pipeline_learner_params *params, uint32_t size, uint32_t *timeout, uint32_t n_timeouts)
__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)