4#ifndef __INCLUDE_RTE_SWX_PIPELINE_H__
5#define __INCLUDE_RTE_SWX_PIPELINE_H__
15#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
45struct rte_swx_pipeline;
56struct rte_swx_pipeline *
127 const char *port_type_name,
176 const char *port_type_name,
183#ifndef RTE_SWX_PACKET_MIRRORING_SLOTS_DEFAULT
184#define RTE_SWX_PACKET_MIRRORING_SLOTS_DEFAULT 4
188#ifndef RTE_SWX_PACKET_MIRRORING_SESSIONS_DEFAULT
189#define RTE_SWX_PACKET_MIRRORING_SESSIONS_DEFAULT 64
249 const char *mailbox_struct_type_name,
274 const char *extern_type_name,
301 const char *extern_type_name,
328 const char *mailbox_struct_type_name,
434 int last_field_has_variable_size);
456 const char *struct_type_name);
472 const char *struct_type_name);
608 const char *args_struct_type_name,
609 const char **instructions,
610 uint32_t n_instructions);
747 const char *recommended_table_type_name,
891 uint32_t n_timeouts);
956 const char **instructions,
957 uint32_t n_instructions);
1001 const char **err_msg);
1033 const char *lib_file_name,
1048 uint32_t n_instructions);
void(* rte_swx_extern_type_destructor_t)(void *object)
int(* rte_swx_extern_func_t)(void *mailbox)
int(* rte_swx_extern_type_member_func_t)(void *object, void *mailbox)
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)
__rte_experimental int rte_swx_pipeline_build(struct rte_swx_pipeline *p)
__rte_experimental int rte_swx_pipeline_build_from_lib(struct rte_swx_pipeline **p, const char *name, const char *lib_file_name, FILE *iospec_file, int numa_node)
__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)
__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 int rte_swx_pipeline_instructions_config(struct rte_swx_pipeline *p, const char **instructions, uint32_t n_instructions)
__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_packet_metadata_register(struct rte_swx_pipeline *p, const char *struct_type_name)
__rte_experimental int rte_swx_pipeline_mirroring_config(struct rte_swx_pipeline *p, struct rte_swx_pipeline_mirroring_params *params)
__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_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_config(struct rte_swx_pipeline **p, const char *name, int numa_node)
__rte_experimental int rte_swx_pipeline_regarray_config(struct rte_swx_pipeline *p, const char *name, uint32_t size, uint64_t init_val)
__rte_experimental struct rte_swx_pipeline * rte_swx_pipeline_find(const char *name)
__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)
__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)
__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)
__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)
__rte_experimental int rte_swx_pipeline_hash_func_register(struct rte_swx_pipeline *p, const char *name, rte_swx_hash_func_t func)
__rte_experimental void rte_swx_pipeline_flush(struct rte_swx_pipeline *p)
__rte_experimental void rte_swx_pipeline_run(struct rte_swx_pipeline *p, uint32_t n_instructions)
__rte_experimental void rte_swx_pipeline_free(struct rte_swx_pipeline *p)
__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_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_rss_config(struct rte_swx_pipeline *p, const char *name)
__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)
__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)
__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_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_codegen(FILE *spec_file, FILE *code_file, uint32_t *err_line, const char **err_msg)
enum rte_swx_table_match_type match_type
int * action_is_for_default_entry
int default_action_is_const
const char ** action_names
const char * hash_func_name
const char * default_action_args
const char ** field_names
int * action_is_for_table_entries
const char * default_action_name
const char * group_id_field_name
uint32_t n_selector_fields
const char ** selector_field_names
const char * member_id_field_name
uint32_t n_members_per_group_max
int * action_is_for_default_entry
int default_action_is_const
const char ** action_names
const char * hash_func_name
const char * default_action_args
struct rte_swx_match_field_params * fields
int * action_is_for_table_entries
const char * default_action_name