DPDK 22.11.5
|
#include <stdint.h>
#include <stdio.h>
#include <rte_compat.h>
#include <rte_meter.h>
#include "rte_swx_port.h"
#include "rte_swx_table.h"
Go to the source code of this file.
Data Structures | |
struct | rte_swx_ctl_pipeline_info |
struct | rte_swx_ctl_action_info |
struct | rte_swx_ctl_action_arg_info |
struct | rte_swx_ctl_table_info |
struct | rte_swx_ctl_table_match_field_info |
struct | rte_swx_ctl_table_action_info |
struct | rte_swx_table_stats |
struct | rte_swx_ctl_selector_info |
struct | rte_swx_pipeline_selector_stats |
struct | rte_swx_ctl_learner_info |
struct | rte_swx_learner_stats |
struct | rte_swx_pipeline_mirroring_session_params |
struct | rte_swx_table_state |
struct | rte_swx_ctl_regarray_info |
struct | rte_swx_ctl_metarray_info |
struct | rte_swx_ctl_meter_stats |
Macros | |
#define | RTE_SWX_CTL_NAME_SIZE 64 |
Functions | |
__rte_experimental int | rte_swx_ctl_pipeline_info_get (struct rte_swx_pipeline *p, struct rte_swx_ctl_pipeline_info *pipeline) |
__rte_experimental int | rte_swx_ctl_pipeline_numa_node_get (struct rte_swx_pipeline *p, int *numa_node) |
__rte_experimental int | rte_swx_ctl_pipeline_port_in_stats_read (struct rte_swx_pipeline *p, uint32_t port_id, struct rte_swx_port_in_stats *stats) |
__rte_experimental int | rte_swx_ctl_pipeline_port_out_stats_read (struct rte_swx_pipeline *p, uint32_t port_id, struct rte_swx_port_out_stats *stats) |
__rte_experimental int | rte_swx_ctl_action_info_get (struct rte_swx_pipeline *p, uint32_t action_id, struct rte_swx_ctl_action_info *action) |
__rte_experimental int | rte_swx_ctl_action_arg_info_get (struct rte_swx_pipeline *p, uint32_t action_id, uint32_t action_arg_id, struct rte_swx_ctl_action_arg_info *action_arg) |
__rte_experimental int | rte_swx_ctl_table_info_get (struct rte_swx_pipeline *p, uint32_t table_id, struct rte_swx_ctl_table_info *table) |
__rte_experimental int | rte_swx_ctl_table_match_field_info_get (struct rte_swx_pipeline *p, uint32_t table_id, uint32_t match_field_id, struct rte_swx_ctl_table_match_field_info *match_field) |
__rte_experimental int | rte_swx_ctl_table_action_info_get (struct rte_swx_pipeline *p, uint32_t table_id, uint32_t table_action_id, struct rte_swx_ctl_table_action_info *table_action) |
__rte_experimental int | rte_swx_ctl_table_ops_get (struct rte_swx_pipeline *p, uint32_t table_id, struct rte_swx_table_ops *table_ops, int *is_stub) |
__rte_experimental int | rte_swx_ctl_pipeline_table_stats_read (struct rte_swx_pipeline *p, const char *table_name, struct rte_swx_table_stats *stats) |
__rte_experimental int | rte_swx_ctl_selector_info_get (struct rte_swx_pipeline *p, uint32_t selector_id, struct rte_swx_ctl_selector_info *selector) |
__rte_experimental int | rte_swx_ctl_selector_group_id_field_info_get (struct rte_swx_pipeline *p, uint32_t selector_id, struct rte_swx_ctl_table_match_field_info *field) |
__rte_experimental int | rte_swx_ctl_selector_field_info_get (struct rte_swx_pipeline *p, uint32_t selector_id, uint32_t selector_field_id, struct rte_swx_ctl_table_match_field_info *field) |
__rte_experimental int | rte_swx_ctl_selector_member_id_field_info_get (struct rte_swx_pipeline *p, uint32_t selector_id, struct rte_swx_ctl_table_match_field_info *field) |
__rte_experimental int | rte_swx_ctl_pipeline_selector_stats_read (struct rte_swx_pipeline *p, const char *selector_name, struct rte_swx_pipeline_selector_stats *stats) |
__rte_experimental int | rte_swx_ctl_learner_info_get (struct rte_swx_pipeline *p, uint32_t learner_id, struct rte_swx_ctl_learner_info *learner) |
__rte_experimental int | rte_swx_ctl_learner_match_field_info_get (struct rte_swx_pipeline *p, uint32_t learner_id, uint32_t match_field_id, struct rte_swx_ctl_table_match_field_info *match_field) |
__rte_experimental int | rte_swx_ctl_learner_action_info_get (struct rte_swx_pipeline *p, uint32_t learner_id, uint32_t learner_action_id, struct rte_swx_ctl_table_action_info *learner_action) |
__rte_experimental int | rte_swx_ctl_pipeline_learner_timeout_get (struct rte_swx_pipeline *p, uint32_t learner_id, uint32_t timeout_id, uint32_t *timeout) |
__rte_experimental int | rte_swx_ctl_pipeline_learner_timeout_set (struct rte_swx_pipeline *p, uint32_t learner_id, uint32_t timeout_id, uint32_t timeout) |
__rte_experimental int | rte_swx_ctl_pipeline_learner_stats_read (struct rte_swx_pipeline *p, const char *learner_name, struct rte_swx_learner_stats *stats) |
__rte_experimental int | rte_swx_ctl_pipeline_mirroring_session_set (struct rte_swx_pipeline *p, uint32_t session_id, struct rte_swx_pipeline_mirroring_session_params *params) |
__rte_experimental int | rte_swx_pipeline_table_state_get (struct rte_swx_pipeline *p, struct rte_swx_table_state **table_state) |
__rte_experimental int | rte_swx_pipeline_table_state_set (struct rte_swx_pipeline *p, struct rte_swx_table_state *table_state) |
__rte_experimental struct rte_swx_ctl_pipeline * | rte_swx_ctl_pipeline_find (const char *name) |
__rte_experimental struct rte_swx_ctl_pipeline * | rte_swx_ctl_pipeline_create (struct rte_swx_pipeline *p) |
__rte_experimental int | rte_swx_ctl_pipeline_table_entry_add (struct rte_swx_ctl_pipeline *ctl, const char *table_name, struct rte_swx_table_entry *entry) |
__rte_experimental int | rte_swx_ctl_pipeline_table_default_entry_add (struct rte_swx_ctl_pipeline *ctl, const char *table_name, struct rte_swx_table_entry *entry) |
__rte_experimental int | rte_swx_ctl_pipeline_table_entry_delete (struct rte_swx_ctl_pipeline *ctl, const char *table_name, struct rte_swx_table_entry *entry) |
__rte_experimental int | rte_swx_ctl_pipeline_selector_group_add (struct rte_swx_ctl_pipeline *ctl, const char *selector_name, uint32_t *group_id) |
__rte_experimental int | rte_swx_ctl_pipeline_selector_group_delete (struct rte_swx_ctl_pipeline *ctl, const char *selector_name, uint32_t group_id) |
__rte_experimental int | rte_swx_ctl_pipeline_selector_group_member_add (struct rte_swx_ctl_pipeline *ctl, const char *selector_name, uint32_t group_id, uint32_t member_id, uint32_t member_weight) |
__rte_experimental int | rte_swx_ctl_pipeline_selector_group_member_delete (struct rte_swx_ctl_pipeline *ctl, const char *selector_name, uint32_t group_id, uint32_t member_id) |
__rte_experimental int | rte_swx_ctl_pipeline_learner_default_entry_add (struct rte_swx_ctl_pipeline *ctl, const char *learner_name, struct rte_swx_table_entry *entry) |
__rte_experimental int | rte_swx_ctl_pipeline_commit (struct rte_swx_ctl_pipeline *ctl, int abort_on_fail) |
__rte_experimental void | rte_swx_ctl_pipeline_abort (struct rte_swx_ctl_pipeline *ctl) |
__rte_experimental struct rte_swx_table_entry * | rte_swx_ctl_pipeline_table_entry_read (struct rte_swx_ctl_pipeline *ctl, const char *table_name, const char *string, int *is_blank_or_comment) |
__rte_experimental struct rte_swx_table_entry * | rte_swx_ctl_pipeline_learner_default_entry_read (struct rte_swx_ctl_pipeline *ctl, const char *learner_name, const char *string, int *is_blank_or_comment) |
__rte_experimental int | rte_swx_ctl_pipeline_table_fprintf (FILE *f, struct rte_swx_ctl_pipeline *ctl, const char *table_name) |
__rte_experimental int | rte_swx_ctl_pipeline_selector_fprintf (FILE *f, struct rte_swx_ctl_pipeline *ctl, const char *selector_name) |
__rte_experimental int | rte_swx_ctl_regarray_info_get (struct rte_swx_pipeline *p, uint32_t regarray_id, struct rte_swx_ctl_regarray_info *regarray) |
__rte_experimental int | rte_swx_ctl_pipeline_regarray_read (struct rte_swx_pipeline *p, const char *regarray_name, uint32_t regarray_index, uint64_t *value) |
__rte_experimental int | rte_swx_ctl_pipeline_regarray_write (struct rte_swx_pipeline *p, const char *regarray_name, uint32_t regarray_index, uint64_t value) |
__rte_experimental int | rte_swx_ctl_pipeline_regarray_read_with_key (struct rte_swx_pipeline *p, const char *regarray_name, const char *table_name, uint8_t *table_key, uint64_t *value) |
__rte_experimental int | rte_swx_ctl_pipeline_regarray_write_with_key (struct rte_swx_pipeline *p, const char *regarray_name, const char *table_name, uint8_t *table_key, uint64_t value) |
__rte_experimental int | rte_swx_ctl_metarray_info_get (struct rte_swx_pipeline *p, uint32_t metarray_id, struct rte_swx_ctl_metarray_info *metarray) |
__rte_experimental int | rte_swx_ctl_meter_profile_add (struct rte_swx_pipeline *p, const char *name, struct rte_meter_trtcm_params *params) |
__rte_experimental int | rte_swx_ctl_meter_profile_delete (struct rte_swx_pipeline *p, const char *name) |
__rte_experimental int | rte_swx_ctl_meter_reset (struct rte_swx_pipeline *p, const char *metarray_name, uint32_t metarray_index) |
__rte_experimental int | rte_swx_ctl_meter_set (struct rte_swx_pipeline *p, const char *metarray_name, uint32_t metarray_index, const char *profile_name) |
__rte_experimental int | rte_swx_ctl_meter_stats_read (struct rte_swx_pipeline *p, const char *metarray_name, uint32_t metarray_index, struct rte_swx_ctl_meter_stats *stats) |
__rte_experimental int | rte_swx_ctl_meter_reset_with_key (struct rte_swx_pipeline *p, const char *metarray_name, const char *table_name, uint8_t *table_key) |
__rte_experimental int | rte_swx_ctl_meter_set_with_key (struct rte_swx_pipeline *p, const char *metarray_name, const char *table_name, uint8_t *table_key, const char *profile_name) |
__rte_experimental int | rte_swx_ctl_meter_stats_read_with_key (struct rte_swx_pipeline *p, const char *metarray_name, const char *table_name, uint8_t *table_key, struct rte_swx_ctl_meter_stats *stats) |
__rte_experimental void | rte_swx_ctl_pipeline_free (struct rte_swx_ctl_pipeline *ctl) |
RTE SWX Pipeline Control
Definition in file rte_swx_ctl.h.
#define RTE_SWX_CTL_NAME_SIZE 64 |
Name size.
Definition at line 29 of file rte_swx_ctl.h.
__rte_experimental int rte_swx_ctl_pipeline_info_get | ( | struct rte_swx_pipeline * | p, |
struct rte_swx_ctl_pipeline_info * | pipeline | ||
) |
Pipeline info get
[in] | p | Pipeline handle. |
[out] | pipeline | Pipeline info. |
__rte_experimental int rte_swx_ctl_pipeline_numa_node_get | ( | struct rte_swx_pipeline * | p, |
int * | numa_node | ||
) |
Pipeline NUMA node get
[in] | p | Pipeline handle. |
[out] | numa_node | Pipeline NUMA node. |
__rte_experimental int rte_swx_ctl_pipeline_port_in_stats_read | ( | struct rte_swx_pipeline * | p, |
uint32_t | port_id, | ||
struct rte_swx_port_in_stats * | stats | ||
) |
Input port statistics counters read
[in] | p | Pipeline handle. |
[in] | port_id | Port ID (0 .. n_ports_in - 1). |
[out] | stats | Input port stats. |
__rte_experimental int rte_swx_ctl_pipeline_port_out_stats_read | ( | struct rte_swx_pipeline * | p, |
uint32_t | port_id, | ||
struct rte_swx_port_out_stats * | stats | ||
) |
Output port statistics counters read
[in] | p | Pipeline handle. |
[in] | port_id | Port ID (0 .. n_ports_out - 1). |
[out] | stats | Output port stats. |
__rte_experimental int rte_swx_ctl_action_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | action_id, | ||
struct rte_swx_ctl_action_info * | action | ||
) |
Action info get
[in] | p | Pipeline handle. |
[in] | action_id | Action ID (0 .. n_actions - 1). |
[out] | action | Action info. |
__rte_experimental int rte_swx_ctl_action_arg_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | action_id, | ||
uint32_t | action_arg_id, | ||
struct rte_swx_ctl_action_arg_info * | action_arg | ||
) |
Action argument info get
[in] | p | Pipeline handle. |
[in] | action_id | Action ID (0 .. n_actions - 1). |
[in] | action_arg_id | Action ID (0 .. n_args - 1). |
[out] | action_arg | Action argument info. |
__rte_experimental int rte_swx_ctl_table_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | table_id, | ||
struct rte_swx_ctl_table_info * | table | ||
) |
Table info get
[in] | p | Pipeline handle. |
[in] | table_id | Table ID (0 .. n_tables - 1). |
[out] | table | Table info. |
__rte_experimental int rte_swx_ctl_table_match_field_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | table_id, | ||
uint32_t | match_field_id, | ||
struct rte_swx_ctl_table_match_field_info * | match_field | ||
) |
Table match field info get
[in] | p | Pipeline handle. |
[in] | table_id | Table ID (0 .. n_tables). |
[in] | match_field_id | Match field ID (0 .. n_match_fields - 1). |
[out] | match_field | Table match field info. |
__rte_experimental int rte_swx_ctl_table_action_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | table_id, | ||
uint32_t | table_action_id, | ||
struct rte_swx_ctl_table_action_info * | table_action | ||
) |
Table action info get
[in] | p | Pipeline handle. |
[in] | table_id | Table ID (0 .. n_tables). |
[in] | table_action_id | Action index within the set of table actions (0 .. table n_actions - 1). Not to be confused with the action ID, which works at the pipeline level (0 .. pipeline n_actions - 1), which is precisely what this function returns as part of table_action. |
[out] | table_action | Table action info. |
__rte_experimental int rte_swx_ctl_table_ops_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | table_id, | ||
struct rte_swx_table_ops * | table_ops, | ||
int * | is_stub | ||
) |
Table operations get
[in] | p | Pipeline handle. |
[in] | table_id | Table ID (0 .. n_tables). |
[out] | table_ops | Table operations. Only valid when function returns success and is_stub is zero (false). |
[out] | is_stub | A stub table is a table with no match fields. No "regular" table entries (i.e. entries other than the default entry) can be added to such a table, therefore the lookup operation always results in lookup miss. Non-zero (true) when the current table is a stub table, zero (false) otherwise. |
__rte_experimental int rte_swx_ctl_pipeline_table_stats_read | ( | struct rte_swx_pipeline * | p, |
const char * | table_name, | ||
struct rte_swx_table_stats * | stats | ||
) |
Table statistics counters read
[in] | p | Pipeline handle. |
[in] | table_name | Table name. |
[out] | stats | Table stats. Must point to a pre-allocated structure. The n_pkts_action field also needs to be pre-allocated as array of pipeline n_actions elements. The pipeline actions that are not valid for the current table have their associated n_pkts_action element always set to zero. |
__rte_experimental int rte_swx_ctl_selector_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | selector_id, | ||
struct rte_swx_ctl_selector_info * | selector | ||
) |
Selector table info get
[in] | p | Pipeline handle. |
[in] | selector_id | Selector table ID (0 .. n_selectors - 1). |
[out] | selector | Selector table info. |
__rte_experimental int rte_swx_ctl_selector_group_id_field_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | selector_id, | ||
struct rte_swx_ctl_table_match_field_info * | field | ||
) |
Selector table "group ID" field info get
[in] | p | Pipeline handle. |
[in] | selector_id | Selector table ID (0 .. n_selectors). |
[out] | field | Selector table "group ID" field info. |
__rte_experimental int rte_swx_ctl_selector_field_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | selector_id, | ||
uint32_t | selector_field_id, | ||
struct rte_swx_ctl_table_match_field_info * | field | ||
) |
Sselector table selector field info get
[in] | p | Pipeline handle. |
[in] | selector_id | Selector table ID (0 .. n_selectors). |
[in] | selector_field_id | Selector table selector field ID (0 .. n_selector_fields - 1). |
[out] | field | Selector table selector field info. |
__rte_experimental int rte_swx_ctl_selector_member_id_field_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | selector_id, | ||
struct rte_swx_ctl_table_match_field_info * | field | ||
) |
Selector table "member ID" field info get
[in] | p | Pipeline handle. |
[in] | selector_id | Selector table ID (0 .. n_selectors). |
[out] | field | Selector table "member ID" field info. |
__rte_experimental int rte_swx_ctl_pipeline_selector_stats_read | ( | struct rte_swx_pipeline * | p, |
const char * | selector_name, | ||
struct rte_swx_pipeline_selector_stats * | stats | ||
) |
Selector table statistics counters read
[in] | p | Pipeline handle. |
[in] | selector_name | Selector table name. |
[out] | stats | Selector table stats. Must point to a pre-allocated structure. |
__rte_experimental int rte_swx_ctl_learner_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | learner_id, | ||
struct rte_swx_ctl_learner_info * | learner | ||
) |
Learner table info get
[in] | p | Pipeline handle. |
[in] | learner_id | Learner table ID (0 .. n_learners - 1). |
[out] | learner | Learner table info. |
__rte_experimental int rte_swx_ctl_learner_match_field_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | learner_id, | ||
uint32_t | match_field_id, | ||
struct rte_swx_ctl_table_match_field_info * | match_field | ||
) |
Learner table match field info get
[in] | p | Pipeline handle. |
[in] | learner_id | Learner table ID (0 .. n_learners - 1). |
[in] | match_field_id | Match field ID (0 .. n_match_fields - 1). |
[out] | match_field | Learner table match field info. |
__rte_experimental int rte_swx_ctl_learner_action_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | learner_id, | ||
uint32_t | learner_action_id, | ||
struct rte_swx_ctl_table_action_info * | learner_action | ||
) |
Learner table action info get
[in] | p | Pipeline handle. |
[in] | learner_id | Learner table ID (0 .. n_learners - 1). |
[in] | learner_action_id | Action index within the set of learner table actions (0 .. learner table n_actions - 1). Not to be confused with the pipeline-leve action ID (0 .. pipeline n_actions - 1), which is precisely what this function returns as part of the learner_action. |
[out] | learner_action | Learner action info. |
__rte_experimental int rte_swx_ctl_pipeline_learner_timeout_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | learner_id, | ||
uint32_t | timeout_id, | ||
uint32_t * | timeout | ||
) |
Learner table timeout get
[in] | p | Pipeline handle. |
[in] | learner_id | Learner table ID (0 .. n_learners - 1). |
[in] | timeout_id | Timeout ID. |
[out] | timeout | Timeout value measured in seconds. Must be non-NULL. |
__rte_experimental int rte_swx_ctl_pipeline_learner_timeout_set | ( | struct rte_swx_pipeline * | p, |
uint32_t | learner_id, | ||
uint32_t | timeout_id, | ||
uint32_t | timeout | ||
) |
Learner table timeout set
[in] | p | Pipeline handle. |
[in] | learner_id | Learner table ID (0 .. n_learners - 1). |
[in] | timeout_id | Timeout ID. |
[in] | timeout | Timeout value measured in seconds. |
__rte_experimental int rte_swx_ctl_pipeline_learner_stats_read | ( | struct rte_swx_pipeline * | p, |
const char * | learner_name, | ||
struct rte_swx_learner_stats * | stats | ||
) |
Learner table statistics counters read
[in] | p | Pipeline handle. |
[in] | learner_name | Learner table name. |
[out] | stats | Learner table stats. Must point to a pre-allocated structure. The n_pkts_action field also needs to be pre-allocated as array of pipeline n_actions elements. The pipeline actions that are not valid for the current learner table have their associated n_pkts_action element always set to zero. |
__rte_experimental int rte_swx_ctl_pipeline_mirroring_session_set | ( | struct rte_swx_pipeline * | p, |
uint32_t | session_id, | ||
struct rte_swx_pipeline_mirroring_session_params * | params | ||
) |
Packet mirroring session set
[in] | p | Pipeline handle. |
[in] | session_id | Packet mirroring session ID. |
[in] | params | Packet mirroring session parameters. |
__rte_experimental int rte_swx_pipeline_table_state_get | ( | struct rte_swx_pipeline * | p, |
struct rte_swx_table_state ** | table_state | ||
) |
Pipeline table state get
[in] | p | Pipeline handle. |
[out] | table_state | After successful execution, the table_state contains the pointer to the current pipeline table state, which is an array of n_tables elements, with array element i containing the state of the i-th pipeline table. The pipeline continues to own all the data structures directly or indirectly referenced by the table_state until the subsequent successful invocation of function rte_swx_pipeline_table_state_set. |
__rte_experimental int rte_swx_pipeline_table_state_set | ( | struct rte_swx_pipeline * | p, |
struct rte_swx_table_state * | table_state | ||
) |
Pipeline table state set
[in] | p | Pipeline handle. |
[out] | table_state | After successful execution, the pipeline table state is updated to this table_state. The ownership of all the data structures directly or indirectly referenced by this table_state is passed from the caller to the pipeline. |
__rte_experimental struct rte_swx_ctl_pipeline * rte_swx_ctl_pipeline_find | ( | const char * | name | ) |
Pipeline control find
[in] | name | Pipeline name. |
__rte_experimental struct rte_swx_ctl_pipeline * rte_swx_ctl_pipeline_create | ( | struct rte_swx_pipeline * | p | ) |
Pipeline control create
[in] | p | Pipeline handle. |
__rte_experimental int rte_swx_ctl_pipeline_table_entry_add | ( | struct rte_swx_ctl_pipeline * | ctl, |
const char * | table_name, | ||
struct rte_swx_table_entry * | entry | ||
) |
Pipeline table entry add
Schedule entry for addition to table or update as part of the next commit operation.
[in] | ctl | Pipeline control handle. |
[in] | table_name | Table name. |
[in] | entry | Entry to be added to the table. |
__rte_experimental int rte_swx_ctl_pipeline_table_default_entry_add | ( | struct rte_swx_ctl_pipeline * | ctl, |
const char * | table_name, | ||
struct rte_swx_table_entry * | entry | ||
) |
Pipeline table default entry add
Schedule table default entry update as part of the next commit operation.
[in] | ctl | Pipeline control handle. |
[in] | table_name | Table name. |
[in] | entry | The new table default entry. The key and key_mask entry fields are ignored. |
__rte_experimental int rte_swx_ctl_pipeline_table_entry_delete | ( | struct rte_swx_ctl_pipeline * | ctl, |
const char * | table_name, | ||
struct rte_swx_table_entry * | entry | ||
) |
Pipeline table entry delete
Schedule entry for deletion from table as part of the next commit operation. Request is silently discarded if no such entry exists.
[in] | ctl | Pipeline control handle. |
[in] | table_name | Table name. |
[in] | entry | Entry to be deleted from the table. The action_id and action_data entry fields are ignored. |
__rte_experimental int rte_swx_ctl_pipeline_selector_group_add | ( | struct rte_swx_ctl_pipeline * | ctl, |
const char * | selector_name, | ||
uint32_t * | group_id | ||
) |
Pipeline selector table group add
Add a new group to a selector table. This operation is executed before this function returns and its result is independent of the result of the next commit operation.
[in] | ctl | Pipeline control handle. |
[in] | selector_name | Selector table name. |
[out] | group_id | The ID of the new group. Only valid when the function call is successful. This group is initially empty, i.e. it does not contain any members. |
__rte_experimental int rte_swx_ctl_pipeline_selector_group_delete | ( | struct rte_swx_ctl_pipeline * | ctl, |
const char * | selector_name, | ||
uint32_t | group_id | ||
) |
Pipeline selector table group delete
Schedule a group for deletion as part of the next commit operation. The group to be deleted can be empty or non-empty.
[in] | ctl | Pipeline control handle. |
[in] | selector_name | Selector table name. |
[in] | group_id | Group to be deleted from the selector table. |
__rte_experimental int rte_swx_ctl_pipeline_selector_group_member_add | ( | struct rte_swx_ctl_pipeline * | ctl, |
const char * | selector_name, | ||
uint32_t | group_id, | ||
uint32_t | member_id, | ||
uint32_t | member_weight | ||
) |
Pipeline selector table member add to group
Schedule the operation to add a new member to an existing group as part of the next commit operation. If this member is already in this group, the member weight is updated to the new value. A weight of zero means this member is to be deleted from the group.
[in] | ctl | Pipeline control handle. |
[in] | selector_name | Selector table name. |
[in] | group_id | The group ID. |
[in] | member_id | The member to be added to the group. |
[in] | member_weight | Member weight. |
__rte_experimental int rte_swx_ctl_pipeline_selector_group_member_delete | ( | struct rte_swx_ctl_pipeline * | ctl, |
const char * | selector_name, | ||
uint32_t | group_id, | ||
uint32_t | member_id | ||
) |
Pipeline selector table member delete from group
Schedule the operation to delete a member from an existing group as part of the next commit operation.
[in] | ctl | Pipeline control handle. |
[in] | selector_name | Selector table name. |
[in] | group_id | The group ID. Must be valid. |
[in] | member_id | The member to be added to the group. Must be valid. |
__rte_experimental int rte_swx_ctl_pipeline_learner_default_entry_add | ( | struct rte_swx_ctl_pipeline * | ctl, |
const char * | learner_name, | ||
struct rte_swx_table_entry * | entry | ||
) |
Pipeline learner table default entry add
Schedule learner table default entry update as part of the next commit operation.
[in] | ctl | Pipeline control handle. |
[in] | learner_name | Learner table name. |
[in] | entry | The new table default entry. The key and key_mask entry fields are ignored. |
__rte_experimental int rte_swx_ctl_pipeline_commit | ( | struct rte_swx_ctl_pipeline * | ctl, |
int | abort_on_fail | ||
) |
Pipeline commit
Perform all the scheduled table work.
[in] | ctl | Pipeline control handle. |
[in] | abort_on_fail | When non-zero (false), all the scheduled work is discarded after a failed commit. Otherwise, the scheduled work is still kept pending for the next commit. |
__rte_experimental void rte_swx_ctl_pipeline_abort | ( | struct rte_swx_ctl_pipeline * | ctl | ) |
Pipeline abort
Discard all the scheduled table work.
[in] | ctl | Pipeline control handle. |
__rte_experimental struct rte_swx_table_entry * rte_swx_ctl_pipeline_table_entry_read | ( | struct rte_swx_ctl_pipeline * | ctl, |
const char * | table_name, | ||
const char * | string, | ||
int * | is_blank_or_comment | ||
) |
Pipeline table entry read
Read table entry from string.
[in] | ctl | Pipeline control handle. |
[in] | table_name | Table name. |
[in] | string | String containing the table entry. |
[out] | is_blank_or_comment | On error, this argument provides an indication of whether string contains an invalid table entry (set to zero) or a blank or comment line that should typically be ignored (set to a non-zero value). |
__rte_experimental struct rte_swx_table_entry * rte_swx_ctl_pipeline_learner_default_entry_read | ( | struct rte_swx_ctl_pipeline * | ctl, |
const char * | learner_name, | ||
const char * | string, | ||
int * | is_blank_or_comment | ||
) |
Pipeline learner table default entry read
Read learner table default entry from string.
[in] | ctl | Pipeline control handle. |
[in] | learner_name | Learner table name. |
[in] | string | String containing the learner table default entry. |
[out] | is_blank_or_comment | On error, this argument provides an indication of whether string contains an invalid table entry (set to zero) or a blank or comment line that should typically be ignored (set to a non-zero value). |
__rte_experimental int rte_swx_ctl_pipeline_table_fprintf | ( | FILE * | f, |
struct rte_swx_ctl_pipeline * | ctl, | ||
const char * | table_name | ||
) |
Pipeline table print to file
Print all the table entries to file.
[in] | f | Output file. |
[in] | ctl | Pipeline control handle. |
[in] | table_name | Table name. |
__rte_experimental int rte_swx_ctl_pipeline_selector_fprintf | ( | FILE * | f, |
struct rte_swx_ctl_pipeline * | ctl, | ||
const char * | selector_name | ||
) |
Pipeline selector print to file
Print all the selector entries to file.
[in] | f | Output file. |
[in] | ctl | Pipeline control handle. |
[in] | selector_name | Selector table name. |
__rte_experimental int rte_swx_ctl_regarray_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | regarray_id, | ||
struct rte_swx_ctl_regarray_info * | regarray | ||
) |
Register array info get
[in] | p | Pipeline handle. |
[in] | regarray_id | Register array ID (0 .. n_regarrays - 1). |
[out] | regarray | Register array info. |
__rte_experimental int rte_swx_ctl_pipeline_regarray_read | ( | struct rte_swx_pipeline * | p, |
const char * | regarray_name, | ||
uint32_t | regarray_index, | ||
uint64_t * | value | ||
) |
Register read
[in] | p | Pipeline handle. |
[in] | regarray_name | Register array name. |
[in] | regarray_index | Register index within the array (0 .. size - 1). |
[out] | value | Current register value. |
__rte_experimental int rte_swx_ctl_pipeline_regarray_write | ( | struct rte_swx_pipeline * | p, |
const char * | regarray_name, | ||
uint32_t | regarray_index, | ||
uint64_t | value | ||
) |
Register write
[in] | p | Pipeline handle. |
[in] | regarray_name | Register array name. |
[in] | regarray_index | Register index within the array (0 .. size - 1). |
[in] | value | Value to be written to the register. |
__rte_experimental int rte_swx_ctl_pipeline_regarray_read_with_key | ( | struct rte_swx_pipeline * | p, |
const char * | regarray_name, | ||
const char * | table_name, | ||
uint8_t * | table_key, | ||
uint64_t * | value | ||
) |
Register read with table key lookup
[in] | p | Pipeline handle. |
[in] | regarray_name | Register array name. |
[in] | table_name | Regular or learner table name. |
[in] | table_key | Table key. |
[out] | value | Current register value. |
__rte_experimental int rte_swx_ctl_pipeline_regarray_write_with_key | ( | struct rte_swx_pipeline * | p, |
const char * | regarray_name, | ||
const char * | table_name, | ||
uint8_t * | table_key, | ||
uint64_t | value | ||
) |
Register write with table key lookup
[in] | p | Pipeline handle. |
[in] | regarray_name | Register array name. |
[in] | table_name | Regular or learner table name. |
[in] | table_key | Table key. |
[in] | value | Value to be written to the register. |
__rte_experimental int rte_swx_ctl_metarray_info_get | ( | struct rte_swx_pipeline * | p, |
uint32_t | metarray_id, | ||
struct rte_swx_ctl_metarray_info * | metarray | ||
) |
Meter array info get
[in] | p | Pipeline handle. |
[in] | metarray_id | Meter array ID (0 .. n_metarrays - 1). |
[out] | metarray | Meter array info. |
__rte_experimental int rte_swx_ctl_meter_profile_add | ( | struct rte_swx_pipeline * | p, |
const char * | name, | ||
struct rte_meter_trtcm_params * | params | ||
) |
Meter profile add
[in] | p | Pipeline handle. |
[in] | name | Meter profile name. |
[in] | params | Meter profile parameters. |
__rte_experimental int rte_swx_ctl_meter_profile_delete | ( | struct rte_swx_pipeline * | p, |
const char * | name | ||
) |
Meter profile delete
[in] | p | Pipeline handle. |
[in] | name | Meter profile name. |
__rte_experimental int rte_swx_ctl_meter_reset | ( | struct rte_swx_pipeline * | p, |
const char * | metarray_name, | ||
uint32_t | metarray_index | ||
) |
Meter reset
Reset a meter within a given meter array to use the default profile that causes all the input packets to be colored as green. It is the responsibility of the control plane to make sure this meter is not used by the data plane pipeline before calling this function.
[in] | p | Pipeline handle. |
[in] | metarray_name | Meter array name. |
[in] | metarray_index | Meter index within the meter array. |
__rte_experimental int rte_swx_ctl_meter_set | ( | struct rte_swx_pipeline * | p, |
const char * | metarray_name, | ||
uint32_t | metarray_index, | ||
const char * | profile_name | ||
) |
Meter set
Set a meter within a given meter array to use a specific profile. It is the responsibility of the control plane to make sure this meter is not used by the data plane pipeline before calling this function.
[in] | p | Pipeline handle. |
[in] | metarray_name | Meter array name. |
[in] | metarray_index | Meter index within the meter array. |
[in] | profile_name | Existing meter profile name. |
__rte_experimental int rte_swx_ctl_meter_stats_read | ( | struct rte_swx_pipeline * | p, |
const char * | metarray_name, | ||
uint32_t | metarray_index, | ||
struct rte_swx_ctl_meter_stats * | stats | ||
) |
Meter statistics counters read
[in] | p | Pipeline handle. |
[in] | metarray_name | Meter array name. |
[in] | metarray_index | Meter index within the meter array. |
[out] | stats | Meter statistics counters. |
__rte_experimental int rte_swx_ctl_meter_reset_with_key | ( | struct rte_swx_pipeline * | p, |
const char * | metarray_name, | ||
const char * | table_name, | ||
uint8_t * | table_key | ||
) |
Meter reset with table key lookup
Reset a meter within a given meter array to use the default profile that causes all the input packets to be colored as green. It is the responsibility of the control plane to make sure this meter is not used by the data plane pipeline before calling this function.
[in] | p | Pipeline handle. |
[in] | metarray_name | Meter array name. |
[in] | table_name | Regular or learner table name. |
[in] | table_key | Table key. |
__rte_experimental int rte_swx_ctl_meter_set_with_key | ( | struct rte_swx_pipeline * | p, |
const char * | metarray_name, | ||
const char * | table_name, | ||
uint8_t * | table_key, | ||
const char * | profile_name | ||
) |
Meter set with table key lookup
Set a meter within a given meter array to use a specific profile. It is the responsibility of the control plane to make sure this meter is not used by the data plane pipeline before calling this function.
[in] | p | Pipeline handle. |
[in] | metarray_name | Meter array name. |
[in] | table_name | Regular or learner table name. |
[in] | table_key | Table key. |
[in] | profile_name | Existing meter profile name. |
__rte_experimental int rte_swx_ctl_meter_stats_read_with_key | ( | struct rte_swx_pipeline * | p, |
const char * | metarray_name, | ||
const char * | table_name, | ||
uint8_t * | table_key, | ||
struct rte_swx_ctl_meter_stats * | stats | ||
) |
Meter statistics counters read with table key lookup
[in] | p | Pipeline handle. |
[in] | metarray_name | Meter array name. |
[in] | table_name | Regular or learner table name. |
[in] | table_key | Table key. |
[out] | stats | Meter statistics counters. |
__rte_experimental void rte_swx_ctl_pipeline_free | ( | struct rte_swx_ctl_pipeline * | ctl | ) |
Pipeline control free
[in] | ctl | Pipeline control handle. If ctl is NULL, no operation is performed. |