rte_swx_ctl.h(3)

rte_swx_ctl.h πŸ’–πŸ¦‹

okay bestie, welcome to the rte_swx_ctl.h(3) manual β€” yep, that's a Library Functions Manual situation, section 3, and she is LONG so buckle up. this is part 1 of 4, so do not go anywhere, we're just getting the lay of the land rn 🌸


NAME 🌈

rte_swx_ctl.h

like... that's it, that's the name. iconic of her honestly πŸ’…


SYNOPSIS ✨

to even start the conversation with this header, you gotta pull in all her little friends first:

#include <stdint.h>
#include <stdio.h>
#include <rte_compat.h>
#include <rte_meter.h>
#include 'rte_swx_port.h'
#include 'rte_swx_table.h'

slay. now the actual content πŸ‘‡

Data Structures πŸŽ€

she comes with a whole entourage, no cap:

  • 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
  • struct rte_swx_ctl_rss_info

Macros πŸ’€

just the one macro, living her solo era:

  • #define RTE_SWX_CTL_NAME_SIZE 64

Functions πŸ‘‘

okay so here's the FULL roster, copy-pasted with love, every single one of them is marked __rte_experimental btw so don't @ me if the vibes shift later πŸ™ˆ:

__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 int rte_swx_ctl_rss_info_get(struct rte_swx_pipeline *p, uint32_t rss_obj_id, struct rte_swx_ctl_rss_info *rss)
__rte_experimental int rte_swx_ctl_pipeline_rss_key_size_read(struct rte_swx_pipeline *p, const char *rss_obj_name, uint32_t *key_size)
__rte_experimental int rte_swx_ctl_pipeline_rss_key_read(struct rte_swx_pipeline *p, const char *rss_obj_name, uint8_t *key)
__rte_experimental int rte_swx_ctl_pipeline_rss_key_write(struct rte_swx_pipeline *p, const char *rss_obj_name, uint32_t key_size, uint8_t *key)
__rte_experimental void rte_swx_ctl_pipeline_free(struct rte_swx_ctl_pipeline *ctl)

that's 60 functions btw. sixty. she ate and left no crumbs πŸ˜­πŸ’…


Detailed Description 🫢

RTE SWX Pipeline Control

that's the whole vibe. the control plane for your SWX pipeline, fr fr.

and if you ever need to find her again:

Definition in file rte_swx_ctl.h.

okay so that's the intro + the full map. next parts are gonna go DEEP on what each of these actually does, so keep scrolling bestie, we are SO not done 🌈✨

πŸ’– MACRO DEFINITION DOCUMENTATION πŸ’–

RTE_SWX_CTL_NAME_SIZE

bestie, it's literally one macro and she's serving maximum importance. It decides how big a name is allowed to be. ✨

#define RTE_SWX_CTL_NAME_SIZE   64

Name size. That's the whole vibe β€” the size of a name, and that size is 64. Definition at line 29 of file rte_swx_ctl.h.


✨ FUNCTION DOCUMENTATION ✨

okay so this is the main-character section, buckle in πŸŽ€

rte_swx_ctl_pipeline_info_get()

Pipeline info get β€” it goes and grabs the info for ya.

__rte_experimental int rte_swx_ctl_pipeline_info_get(struct rte_swx_pipeline *p,
    struct rte_swx_ctl_pipeline_info *pipeline)

Parameters

  • p β€” Pipeline handle.
  • pipeline β€” Pipeline info.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_pipeline_numa_node_get()

Pipeline NUMA node get β€” pulls the NUMA node for the pipeline.

__rte_experimental int rte_swx_ctl_pipeline_numa_node_get(struct rte_swx_pipeline *p,
    int *numa_node)

Parameters

  • p β€” Pipeline handle.
  • numa_node β€” Pipeline NUMA node.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_pipeline_port_in_stats_read()

Input port statistics counters read β€” reads the stats counters off an input port. πŸ“Š

__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)

Parameters

  • p β€” Pipeline handle.
  • port_id β€” Port ID (0 .. n_ports_in - 1).
  • stats β€” Input port stats.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_pipeline_port_out_stats_read()

Output port statistics counters read β€” same energy, but the output side.

__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)

Parameters

  • p β€” Pipeline handle.
  • port_id β€” Port ID (0 .. n_ports_out - 1).
  • stats β€” Output port stats.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_action_info_get()

Action info get β€” fetches the info for an action.

__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)

Parameters

  • p β€” Pipeline handle.
  • action_id β€” Action ID (0 .. n_actions - 1).
  • action β€” Action info.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_action_arg_info_get()

Action argument info get β€” zooming in one level deeper, we're getting the info for an action argument now. πŸ’…

__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)

Parameters

  • p β€” Pipeline handle.
  • action_id β€” Action ID (0 .. n_actions - 1).
  • action_arg_id β€” Action ID (0 .. n_args - 1).
  • action_arg β€” Action argument info.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_table_info_get()

Table info get β€” the info for a table, served fresh.

__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)

Parameters

  • p β€” Pipeline handle.
  • table_id β€” Table ID (0 .. n_tables - 1).
  • table β€” Table info.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_table_match_field_info_get()

Table match field info get β€” now we're getting the info for one specific match field of a 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)

Parameters

  • p β€” Pipeline handle.
  • table_id β€” Table ID (0 .. n_tables).
  • match_field_id β€” Match field ID (0 .. n_match_fields - 1).
  • match_field β€” Table match field info.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_table_action_info_get()

Table action info get β€” the info for an action as it lives inside a table.

__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)

Parameters

  • p β€” Pipeline handle.
  • table_id β€” Table ID (0 .. n_tables).
  • 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.
  • table_action β€” Table action info.
⚠️ okay bestie this is the one people mess up: table_action_id is table-scoped, not pipeline-scoped. The pipeline-level action ID is what comes back to you inside table_action. Two different numbers, don't mix them up, iykyk. πŸ’€

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_table_ops_get()

Table operations get β€” hands you the table's operations back.

__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)

Parameters

  • p β€” Pipeline handle.
  • table_id β€” Table ID (0 .. n_tables).
  • table_ops β€” Table operations. Only valid when the function returns success and is_stub is zero (false).
  • 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.
🫢 real talk: if is_stub comes back true, don't you dare touch table_ops β€” it's only valid when the call succeeds and is_stub is zero (false).

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_pipeline_table_stats_read()

Table statistics counters read β€” reads the stats counters for a table by name.

__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)

Parameters

  • p β€” Pipeline handle.
  • table_name β€” Table name.
  • 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.
🌸 pre-allocate this yourself, bestie, this function will NOT do it for you. And remember n_pkts_action is an array of pipeline n_actions elements β€” the actions that don't apply to this table just sit there at zero.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_selector_info_get()

Selector table info get β€” info for a selector table.

__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)

Parameters

  • p β€” Pipeline handle.
  • selector_id β€” Selector table ID (0 .. n_selectors - 1).
  • selector β€” Selector table info.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_selector_group_id_field_info_get()

Selector table "group ID" field info get β€” the info for the selector table's "group ID" field. πŸ‘‘

__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)

Parameters

  • p β€” Pipeline handle.
  • selector_id β€” Selector table ID (0 .. n_selectors).
  • field β€” Selector table "group ID" field info.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_selector_field_info_get()

Sselector table selector field info get β€” grabs the info for one selector field of a selector table.

__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)

Parameters

  • p β€” Pipeline handle.
  • selector_id β€” Selector table ID (0 .. n_selectors).
  • selector_field_id β€” Selector table selector field ID (0 .. n_selector_fields - 1).
  • field β€” Selector table selector field info.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_selector_member_id_field_info_get()

Selector table "member ID" field info get β€” the info for the selector table's "member ID" 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)

Parameters

  • p β€” Pipeline handle.
  • selector_id β€” Selector table ID (0 .. n_selectors).
  • field β€” Selector table "member ID" field info.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_pipeline_selector_stats_read()

Selector table statistics counters read β€” stats for a selector table, by name. πŸ“ˆ

__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)

Parameters

  • p β€” Pipeline handle.
  • selector_name β€” Selector table name.
  • stats β€” Selector table stats. Must point to a pre-allocated structure.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_learner_info_get()

Learner table info get β€” info for a learner table. 🌈

__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)

Parameters

  • p β€” Pipeline handle.
  • learner_id β€” Learner table ID (0 .. n_learners - 1).
  • learner β€” Learner table info.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_learner_match_field_info_get()

Learner table match field info get β€” the info for a single match field of a learner table.

__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)

Parameters

  • p β€” Pipeline handle.
  • learner_id β€” Learner table ID (0 .. n_learners - 1).
  • match_field_id β€” Match field ID (0 .. n_match_fields - 1).
  • match_field β€” Learner table match field info.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_learner_action_info_get()

Learner table action info get β€” the info for an action inside a learner table.

__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)

Parameters

  • p β€” Pipeline handle.
  • learner_id β€” Learner table ID (0 .. n_learners - 1).
  • 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.
  • learner_action β€” Learner action info.
⚠️ same trap as the table version, bestie: learner_action_id is scoped to the learner table, the pipeline-level action ID is what you get back in learner_action. Two numbers. Don't conflate them. πŸ™ˆ

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_pipeline_learner_timeout_get()

Learner table timeout get β€” reads a learner table's timeout value.

__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)

Parameters

  • p β€” Pipeline handle.
  • learner_id β€” Learner table ID (0 .. n_learners - 1).
  • timeout_id β€” Timeout ID.
  • timeout β€” Timeout value measured in seconds. Must be non-NULL.
πŸ’€ timeout has to be non-NULL β€” do not pass null to this, I'm serious.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_pipeline_learner_timeout_set()

Learner table timeout set β€” writes a learner table's timeout value.

__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)

Parameters

  • p β€” Pipeline handle.
  • learner_id β€” Learner table ID (0 .. n_learners - 1).
  • timeout_id β€” Timeout ID.
  • timeout β€” Timeout value measured in seconds.

Returns

  • 0 on success, or the following error codes otherwise: -EINVAL: Invalid argument.

rte_swx_ctl_pipeline_learner_stats_read πŸ’–

__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 ✨ bestie we are ✨reading✨ the counters, that's the whole job.

Parameters

  • p β€” Pipeline handle.
  • learner_name β€” Learner table name.
  • 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. πŸ‘‘

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument.


rte_swx_ctl_pipeline_mirroring_session_set πŸͺž

__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 β€” main character energy only, we're setting up a mirroring session.

Parameters

  • p β€” Pipeline handle.
  • session_id β€” Packet mirroring session ID.
  • params β€” Packet mirroring session parameters.

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument; -EEXIST: Pipeline was already built successfully.


rte_swx_pipeline_table_state_get πŸ“Έ

__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 β€” no cap, we are grabbing the current state.

Parameters

  • p β€” Pipeline handle.
  • 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. 🫢

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument.


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 β€” okay so now we're giving the state instead of getting it, slay.

Parameters

  • p β€” Pipeline handle.
  • 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. πŸ’…

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument.


rte_swx_ctl_pipeline_find πŸ”

__rte_experimental struct rte_swx_ctl_pipeline *rte_swx_ctl_pipeline_find
    (const char *name)

Pipeline control find β€” the search-and-rescue of pipeline control handles.

Parameters

  • name β€” Pipeline name.

Returns

Valid pipeline control handle if found or NULL otherwise.


rte_swx_ctl_pipeline_create 🌱

__rte_experimental struct rte_swx_ctl_pipeline *rte_swx_ctl_pipeline_create
    (struct rte_swx_pipeline *p)

Pipeline control create β€” manifesting a brand new pipeline control handle, periodt.

Parameters

  • p β€” Pipeline handle.

Returns

Pipeline control handle, on success, or NULL, on error.


rte_swx_ctl_pipeline_table_entry_add βž•

__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. Bestie it's a schedule, not an instant thing β€” the commit does the actual work later. ✨

Parameters

  • ctl β€” Pipeline control handle.
  • table_name β€” Table name.
  • entry β€” Entry to be added to the table.

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument.


rte_swx_ctl_pipeline_table_default_entry_add ⭐

__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.

Parameters

  • ctl β€” Pipeline control handle.
  • table_name β€” Table name.
  • entry β€” The new table default entry. The key and key_mask entry fields are ignored. πŸ™ˆ

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument.


rte_swx_ctl_pipeline_table_entry_delete πŸ—‘οΈ

__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. πŸ’€ no drama, no error, just gone.

Parameters

  • ctl β€” Pipeline control handle.
  • table_name β€” Table name.
  • entry β€” Entry to be deleted from the table. The action_id and action_data entry fields are ignored.

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument.


rte_swx_ctl_pipeline_selector_group_add πŸŽ‰

__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. So like, this one is not a schedule β€” it happens now. πŸ”₯

Parameters

  • ctl β€” Pipeline control handle.
  • selector_name β€” Selector table name.
  • 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.

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument; -ENOSPC: All groups are currently in use, no group available.


rte_swx_ctl_pipeline_selector_group_delete βœ‚οΈ

__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. Eviction notice served, iconic. πŸ‘‘

Parameters

  • ctl β€” Pipeline control handle.
  • selector_name β€” Selector table name.
  • group_id β€” Group to be deleted from the selector table.

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument; -ENOMEM: Not enough memory.


rte_swx_ctl_pipeline_selector_group_member_add πŸ«‚

__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. 🌈 (yes, zero = unfollow, that's just how they do it.)

Parameters

  • ctl β€” Pipeline control handle.
  • selector_name β€” Selector table name.
  • group_id β€” The group ID.
  • member_id β€” The member to be added to the group.
  • member_weight β€” Member weight.

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument; -ENOMEM: Not enough memory; -ENOSPC: The group is full.


rte_swx_ctl_pipeline_selector_group_member_delete πŸ’”

__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. It's giving removal arc. 😭

Parameters

  • ctl β€” Pipeline control handle.
  • selector_name β€” Selector table name.
  • group_id β€” The group ID. Must be valid.
  • member_id β€” The member to be added to the group. Must be valid.
Okay bestie, yes, the manual really does say "added" there even though this is the delete function. We're just the messenger, we keep it exactly as written. πŸŽ€

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument.


rte_swx_ctl_pipeline_learner_default_entry_add πŸ¦‹

__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.

Parameters

  • ctl β€” Pipeline control handle.
  • learner_name β€” Learner table name.
  • entry β€” The new table default entry. The key and key_mask entry fields are ignored. 🫢

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument.


rte_swx_ctl_pipeline_commit πŸš€

__rte_experimental int rte_swx_ctl_pipeline_commit(struct
    rte_swx_ctl_pipeline *ctl, int abort_on_fail)

Pipeline commit β€” the moment we've all been waiting for. Perform all the scheduled table work. πŸ’…

Parameters

  • ctl β€” Pipeline control handle.
  • 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.
Not me side-eyeing that "(false)" in the original text β€” but fr fr, that's literally what it says, so it stays. Copying it verbatim is the vibe. ✨

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument.


rte_swx_ctl_pipeline_abort πŸ›‘

__rte_experimental void rte_swx_ctl_pipeline_abort(struct
    rte_swx_ctl_pipeline *ctl)

Pipeline abort

Discard all the scheduled table work. Everything on the schedule? Cancelled. Not sorry. πŸ’€

Parameters

  • ctl β€” Pipeline control handle.

rte_swx_ctl_pipeline_table_entry_read πŸ“–

__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. Glow-up from raw text to struct. ✨

Parameters

  • ctl β€” Pipeline control handle.
  • table_name β€” Table name.
  • string β€” String containing the table entry.
  • 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). 🫢

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument.


rte_swx_ctl_pipeline_learner_default_entry_read πŸ“š

__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.

Parameters

  • ctl β€” Pipeline control handle.
  • learner_name β€” Learner table name.
  • string β€” String containing the learner table default entry.
  • 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). 🌸

Returns

0 on success or the following error codes otherwise: -EINVAL: Invalid argument.


rte_swx_ctl_pipeline_table_fprintf πŸ–¨οΈ

__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. Dump the whole roster, no filter, no cap. πŸŽ€

Parameters

  • f β€” Output file.
  • ctl β€” Pipeline control handle.
  • table_name β€” Table name.

rte_swx_ctl_pipeline_selector_fprintf</p> β€” pipeline selector print to file πŸ’…

__rte_experimental int rte_swx_ctl_pipeline_selector_fprintf(FILE *f, struct rte_swx_ctl_pipeline *ctl, const char *selector_name)

bestie it literally prints all the selector entries straight to a file. that's the whole vibe. ✨

Parameters

  • f β€” output file πŸ“„
  • ctl β€” the pipeline control handle
  • selector_name β€” selector table name

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_regarray_info_get</p> β€” register array info get πŸŽ€

__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)

grab the info for a register array. yes queen, get the details. πŸ“‹

Parameters

  • p β€” pipeline handle
  • regarray_id β€” register array ID (0 .. n_regarrays - 1)
  • regarray β€” register array info

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_pipeline_regarray_read</p> β€” register read πŸ”

__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)

read a register, so iconic of you honestly. πŸ’–

Parameters

  • p β€” pipeline handle
  • regarray_name β€” register array name
  • regarray_index β€” register index within the array (0 .. size - 1)
  • value β€” current register value

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_pipeline_regarray_write</p> β€” register write ✍️

__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)

the write to the read, the pen to the paper, the main character moment of registers. πŸ’…

Parameters

  • p β€” pipeline handle
  • regarray_name β€” register array name
  • regarray_index β€” register index within the array (0 .. size - 1)
  • value β€” value to be written to the register

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_pipeline_regarray_read_with_key</p> β€” register read with table key lookup πŸ”‘

__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)

same read energy as before, except this time the register index gets looked up through the table key. iykyk. πŸ¦‹

Parameters

  • p β€” pipeline handle
  • regarray_name β€” register array name
  • table_name β€” regular or learner table name
  • table_key β€” table key
  • value β€” current register value

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument; -ENOMEM: not enough memory.


rte_swx_ctl_pipeline_regarray_write_with_key</p> β€” register write with table key lookup πŸ”

__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)

you already know: write, but the index comes from the table key lookup. periodt. πŸ’œ

Parameters

  • p β€” pipeline handle
  • regarray_name β€” register array name
  • table_name β€” regular or learner table name
  • table_key β€” table key
  • value β€” value to be written to the register

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument; -ENOMEM: not enough memory.


rte_swx_ctl_metarray_info_get</p> β€” meter array info get 🌸

__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)

get the tea on a meter array. β˜•βœ¨

Parameters

  • p β€” pipeline handle
  • metarray_id β€” meter array ID (0 .. n_metarrays - 1)
  • metarray β€” meter array info

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_meter_profile_add</p> β€” meter profile add βž•

__rte_experimental int rte_swx_ctl_meter_profile_add(struct rte_swx_pipeline *p, const char *name, struct rte_meter_trtcm_params *params)

adding a brand new meter profile to the collection, slay. πŸ‘‘

Parameters

  • p β€” pipeline handle
  • name β€” meter profile name
  • params β€” meter profile parameters

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument; -ENOMEM: not enough space/cannot allocate memory; -EEXIST: meter profile with this name already exists.

bestie if -EEXIST shows up, the name is already taken. pick a different one. 😭

rte_swx_ctl_meter_profile_delete</p> β€” meter profile delete πŸ—‘οΈ

__rte_experimental int rte_swx_ctl_meter_profile_delete(struct rte_swx_pipeline *p, const char *name)

bye bye meter profile. it's giving closure. πŸ’…

Parameters

  • p β€” pipeline handle
  • name β€” meter profile name

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument; -EBUSY: meter profile is currently in use.

-EBUSY means nope, something is currently using it. can't delete what's still booked. πŸ™ˆ

rte_swx_ctl_meter_reset</p> β€” meter reset πŸ”„

__rte_experimental int rte_swx_ctl_meter_reset(struct rte_swx_pipeline *p, const char *metarray_name, uint32_t metarray_index)

resets a meter inside a given meter array so it uses the default profile, which makes all the input packets get colored as green. 🍏

okay important: 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. do not skip that step, bestie. πŸ›‘

Parameters

  • p β€” pipeline handle
  • metarray_name β€” meter array name
  • metarray_index β€” meter index within the meter array

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_meter_set</p> β€” meter set 🎯

__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)

points a meter inside a given meter array at a specific profile. glow-up assigned. ✨

same energy as above: 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. πŸ›‘

Parameters

  • p β€” pipeline handle
  • metarray_name β€” meter array name
  • metarray_index β€” meter index within the meter array
  • profile_name β€” existing meter profile name

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_meter_stats_read</p> β€” meter statistics counters read πŸ“Š

__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)

read the meter's statistics counters and get the numbers, bestie. πŸ”’

Parameters

  • p β€” pipeline handle
  • metarray_name β€” meter array name
  • metarray_index β€” meter index within the meter array
  • stats β€” meter statistics counters

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_meter_reset_with_key</p> β€” meter reset with table key lookup πŸ”„πŸ”‘

__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)

resets a meter inside a given meter array to the default profile, which colors all the input packets as green β€” except this time the meter is found via table key lookup. πŸ¦‹

and yes, again: 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. πŸ›‘

Parameters

  • p β€” pipeline handle
  • metarray_name β€” meter array name
  • table_name β€” regular or learner table name
  • table_key β€” table key

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_meter_set_with_key</p> β€” meter set with table key lookup πŸŽ―πŸ”‘

__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)

sets a meter inside a given meter array to use a specific profile, with the meter located through the table key. 🫢

you know the drill: 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. πŸ›‘

Parameters

  • p β€” pipeline handle
  • metarray_name β€” meter array name
  • table_name β€” regular or learner table name
  • table_key β€” table key
  • profile_name β€” existing meter profile name

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_meter_stats_read_with_key</p> β€” meter statistics counters read with table key lookup πŸ“ŠπŸ”‘

__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)

statistics counters read, but the meter is looked up with the table key. no notes. πŸ’œ

Parameters

  • p β€” pipeline handle
  • metarray_name β€” meter array name
  • table_name β€” regular or learner table name
  • table_key β€” table key
  • stats β€” meter statistics counters

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_rss_info_get</p> β€” RSS object info get 🌈

__rte_experimental int rte_swx_ctl_rss_info_get(struct rte_swx_pipeline *p, uint32_t rss_obj_id, struct rte_swx_ctl_rss_info *rss)

all the info about an RSS object, served fresh. ⭐

Parameters

  • p β€” pipeline handle
  • rss_obj_id β€” RSS object ID (0 .. n_rss - 1)
  • rss β€” RSS object info

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_pipeline_rss_key_size_read</p> β€” RSS object key size read πŸ“

__rte_experimental int rte_swx_ctl_pipeline_rss_key_size_read(struct rte_swx_pipeline *p, const char *rss_obj_name, uint32_t *key_size)

how big is the RSS key, you ask? this tells you. πŸ’«

Parameters

  • p β€” pipeline handle
  • rss_obj_name β€” RSS object name
  • key_size β€” RSS key size in bytes

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_pipeline_rss_key_read</p> β€” RSS object key read πŸ”Ž

__rte_experimental int rte_swx_ctl_pipeline_rss_key_read(struct rte_swx_pipeline *p, const char *rss_obj_name, uint8_t *key)

reads the RSS key out. πŸ’–

Parameters

  • p β€” pipeline handle
  • rss_obj_name β€” RSS object name
  • key β€” RSS key. Must be pre-allocated by the caller to store key_size bytes.
bestie, pre-allocate that buffer yourself β€” this function is not doing it for you. it needs room for key_size bytes. πŸŽ€

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_pipeline_rss_key_write</p> β€” RSS object key write πŸ–ŠοΈ

__rte_experimental int rte_swx_ctl_pipeline_rss_key_write(struct rte_swx_pipeline *p, const char *rss_obj_name, uint32_t key_size, uint8_t *key)

writes the RSS key. setting the vibe, honestly. πŸ”₯

Parameters

  • p β€” pipeline handle
  • rss_obj_name β€” RSS object name
  • key_size β€” RSS key size in bytes. Must be at least 4 and a power of 2.
  • key β€” RSS key
key_size has requirements: at least 4 and a power of 2. don't come in there with a 3. πŸ™ˆ

Returns

0 on success, or these error codes if not: -EINVAL: invalid argument.


rte_swx_ctl_pipeline_free</p> β€” pipeline control free πŸ•ŠοΈ

__rte_experimental void rte_swx_ctl_pipeline_free(struct rte_swx_ctl_pipeline *ctl)

free the pipeline control handle. releasing it back to the universe. 🌌

Parameters

  • ctl β€” pipeline control handle. If ctl is NULL, no operation is performed.
cute detail: if ctl is NULL, nothing happens at all. no crash, no drama. 😌

Author πŸ–‹οΈ

Generated automatically by Doxygen for DPDK from the source code. the robots wrote it, i just added the sparkle. πŸ€–βœ¨


and that's a wrap on rte_swx_ctl.h(3), bestie!! πŸŽ‰ you made it through the entire control-plane saga and honestly? iconic. this page came straight from DPDK, Version 25.11.3, and that footer date/version line is your little timestamp of when this whole thing got generated. go forth and control those pipelines. periodt. πŸ’…πŸ’–πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from