rte_table_action.h(3)

✨ rte_table_action.h ✨

okay so bestie, welcome to the glow-up of rte_table_action.h(3) β€” straight out of the Library Functions Manual πŸ’– this is part one of three so buckle up, hydrate, and let's get into it 🫢


🌸 NAME 🌸

rte_table_action.h β€” that's it, that's the name, she keeps it simple πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

Pull in the good stuff first, no cap:

#include <stdint.h>
#include <rte_compat.h>
#include <rte_ether.h>
#include <rte_ip6.h>
#include <rte_meter.h>
#include <rte_table_hash.h>
#include 'rte_pipeline.h'
not me pointing at that last one like πŸ‘€ β€” yes, it's written with single quotes in the original and we are not touching it. copy-paste gang gets exactly what the page says πŸ’…

πŸ¦‹ Data Structures πŸ¦‹

Forty-four structs, all iconic, all listed, zero skips πŸƒβ€β™€οΈπŸ’¨

  • struct rte_table_action_common_config
  • struct rte_table_action_fwd_params
  • struct rte_table_action_lb_config
  • struct rte_table_action_lb_params
  • struct rte_table_action_dscp_table_entry
  • struct rte_table_action_dscp_table
  • struct rte_table_action_meter_profile
  • struct rte_table_action_mtr_tc_params
  • struct rte_table_action_mtr_counters_tc
  • struct rte_table_action_mtr_config
  • struct rte_table_action_mtr_params
  • struct rte_table_action_mtr_counters
  • struct rte_table_action_tm_config
  • struct rte_table_action_tm_params
  • struct rte_table_action_ether_hdr
  • struct rte_table_action_vlan_hdr
  • struct rte_table_action_mpls_hdr
  • struct rte_table_action_pppoe_hdr
  • struct rte_table_action_ipv4_header
  • struct rte_table_action_ipv6_header
  • struct rte_table_action_udp_header
  • struct rte_table_action_vxlan_hdr
  • struct rte_table_action_encap_ether_params
  • struct rte_table_action_encap_vlan_params
  • struct rte_table_action_encap_qinq_params
  • struct rte_table_action_encap_mpls_params
  • struct rte_table_action_encap_pppoe_params
  • struct rte_table_action_encap_vxlan_params
  • struct rte_table_action_encap_config
  • struct rte_table_encap_ether_qinq_pppoe
  • struct rte_table_action_encap_params
  • struct rte_table_action_nat_config
  • struct rte_table_action_nat_params
  • struct rte_table_action_ttl_config
  • struct rte_table_action_ttl_params
  • struct rte_table_action_ttl_counters
  • struct rte_table_action_stats_config
  • struct rte_table_action_stats_params
  • struct rte_table_action_stats_counters
  • struct rte_table_action_time_params
  • struct rte_table_action_vlo
  • struct rte_table_action_sym_crypto_config
  • struct rte_table_action_sym_crypto_params
  • struct rte_table_action_tag_params
  • struct rte_table_action_decap_params

πŸ’œ Macros πŸ’œ

the little constants that could ✨

#define RTE_TABLE_ACTION_LB_KEY_SIZE_MIN   8
#define RTE_TABLE_ACTION_LB_KEY_SIZE_MAX   64
#define RTE_TABLE_ACTION_LB_TABLE_SIZE   8
#define RTE_TABLE_ACTION_TC_MAX   16
#define RTE_TABLE_ACTION_TC_QUEUE_MAX   16
#define RTE_TABLE_ACTION_MPLS_LABELS_MAX   4
#define RTE_TABLE_ACTION_SYM_CRYPTO_IV_SIZE_MAX   (16)

🌈 Enumerations 🌈

look at these enums, they're giving organized πŸ’…

enum rte_table_action_type { RTE_TABLE_ACTION_FWD = 0,
    RTE_TABLE_ACTION_LB, RTE_TABLE_ACTION_MTR, RTE_TABLE_ACTION_TM,
    RTE_TABLE_ACTION_ENCAP, RTE_TABLE_ACTION_NAT, RTE_TABLE_ACTION_TTL,
    RTE_TABLE_ACTION_STATS, RTE_TABLE_ACTION_TIME,
    RTE_TABLE_ACTION_SYM_CRYPTO, RTE_TABLE_ACTION_TAG,
    RTE_TABLE_ACTION_DECAP }
enum rte_table_action_meter_algorithm { RTE_TABLE_ACTION_METER_SRTCM,
    RTE_TABLE_ACTION_METER_TRTCM }
enum rte_table_action_policer { RTE_TABLE_ACTION_POLICER_COLOR_GREEN =
    0, RTE_TABLE_ACTION_POLICER_COLOR_YELLOW,
    RTE_TABLE_ACTION_POLICER_COLOR_RED, RTE_TABLE_ACTION_POLICER_DROP,
    RTE_TABLE_ACTION_POLICER_MAX }
enum rte_table_action_encap_type { RTE_TABLE_ACTION_ENCAP_ETHER = 0,
    RTE_TABLE_ACTION_ENCAP_VLAN, RTE_TABLE_ACTION_ENCAP_QINQ,
    RTE_TABLE_ACTION_ENCAP_MPLS, RTE_TABLE_ACTION_ENCAP_PPPOE,
    RTE_TABLE_ACTION_ENCAP_VXLAN, RTE_TABLE_ACTION_ENCAP_QINQ_PPPOE }

🧚 Functions 🧚

every single prototype, verbatim, no edits, periodt:

__rte_experimental struct rte_table_action_profile *
    rte_table_action_profile_create (struct
    rte_table_action_common_config *common)
__rte_experimental int rte_table_action_profile_free (struct
    rte_table_action_profile *profile)
__rte_experimental int rte_table_action_profile_action_register (struct
    rte_table_action_profile *profile, enum rte_table_action_type type,
    void *action_config)
__rte_experimental int rte_table_action_profile_freeze (struct
    rte_table_action_profile *profile)
__rte_experimental struct rte_table_action * rte_table_action_create
    (struct rte_table_action_profile *profile, uint32_t socket_id)
__rte_experimental int rte_table_action_free (struct rte_table_action
    *action)
__rte_experimental int rte_table_action_table_params_get (struct
    rte_table_action *action, struct rte_pipeline_table_params *params)
__rte_experimental int rte_table_action_apply (struct rte_table_action
    *action, void *data, enum rte_table_action_type type, void
    *action_params)
__rte_experimental int rte_table_action_dscp_table_update (struct
    rte_table_action *action, uint64_t dscp_mask, struct
    rte_table_action_dscp_table *table)
__rte_experimental int rte_table_action_meter_profile_add (struct
    rte_table_action *action, uint32_t meter_profile_id, struct
    rte_table_action_meter_profile *profile)
__rte_experimental int rte_table_action_meter_profile_delete (struct
    rte_table_action *action, uint32_t meter_profile_id)
__rte_experimental int rte_table_action_meter_read (struct
    rte_table_action *action, void *data, uint32_t tc_mask, struct
    rte_table_action_mtr_counters *stats, int clear)
__rte_experimental int rte_table_action_ttl_read (struct
    rte_table_action *action, void *data, struct
    rte_table_action_ttl_counters *stats, int clear)
__rte_experimental int rte_table_action_stats_read (struct
    rte_table_action *action, void *data, struct
    rte_table_action_stats_counters *stats, int clear)
__rte_experimental int rte_table_action_time_read (struct
    rte_table_action *action, void *data, uint64_t *timestamp)
__rte_experimental struct rte_cryptodev_sym_session *
    rte_table_action_crypto_sym_session_get (struct rte_table_action
    *action, void *data)

and here's the vibe check on each one πŸ‘‡

  • rte_table_action_profile_create() β€” spins up a brand-new table action profile for you, taking a struct rte_table_action_common_config *common to get started, and hands back a struct rte_table_action_profile *.
  • rte_table_action_profile_free() β€” say bye bye πŸ‘‹ releases a struct rte_table_action_profile *profile.
  • rte_table_action_profile_action_register() β€” registers an action on the profile: you give it the profile, an enum rte_table_action_type type, and a void *action_config to configure it with.
  • rte_table_action_profile_freeze() β€” freezes the profile so it stops accepting changes. it's giving "no more edits, this is final" 🧊
  • rte_table_action_create() β€” instantiates a profile into an actual action object: pass the profile plus a uint32_t socket_id, get a struct rte_table_action * back.
  • rte_table_action_free() β€” yeets a struct rte_table_action *action out of existence (politely, returns an int).
  • rte_table_action_table_params_get() β€” fills in struct rte_pipeline_table_params *params from your action object, so the pipeline knows what's up.
  • rte_table_action_apply() β€” takes your void *data, an enum rte_table_action_type type, and void *action_params, and applies that action. the moment of truth ✨
  • rte_table_action_dscp_table_update() β€” updates the DSCP table using a uint64_t dscp_mask and a struct rte_table_action_dscp_table *table.
  • rte_table_action_meter_profile_add() β€” adds a meter profile: action, uint32_t meter_profile_id, and struct rte_table_action_meter_profile *profile.
  • rte_table_action_meter_profile_delete() β€” removes the meter profile with the given uint32_t meter_profile_id. gone, reduced to atoms πŸ’€
  • rte_table_action_meter_read() β€” reads meter counters into struct rte_table_action_mtr_counters *stats, filtered by uint32_t tc_mask, with an int clear flag deciding whether to wipe them after.
  • rte_table_action_ttl_read() β€” same energy but for TTL: fills struct rte_table_action_ttl_counters *stats from void *data, and int clear says whether to reset them.
  • rte_table_action_stats_read() β€” pulls stats counters into struct rte_table_action_stats_counters *stats for void *data, again with int clear controlling the reset behaviour.
  • rte_table_action_time_read() β€” grabs a timestamp into uint64_t *timestamp from void *data. clocking it ⏰
  • rte_table_action_crypto_sym_session_get() β€” returns the struct rte_cryptodev_sym_session * for the given void *data. crypto bestie is here πŸ”

πŸ‘‘ Detailed Description πŸ‘‘

RTE Pipeline Table Actions

so basically πŸ’– this API hands you a common set of actions for pipeline tables, so you can speed up application development instead of hand-rolling everything yourself. iconic, honestly.

Every match-action rule you add to a pipeline table has associated data hanging off it that stores the action context. That data is the input to the table action handler, which gets called for every single input packet that hits the rule as part of the table lookup while the pipeline is executing. The pipeline library already lets you define your own table actions by writing customised table action handlers (that's the table lookup) and gives you complete freedom over setting the rules and their data (the table rule add/delete). So like, you can still do all of that manually β€” but this API exists to be the quicker development alternative for a set of predefined actions. slay 🫢

The typical steps to use this API are:

  • Define a table action profile. This is a configuration template that can potentially be shared by multiple tables from the same or different pipelines β€” with different tables from the same pipeline likely to use different action profiles. For every table using a given action profile, the profile defines the set of actions and the action configuration to be implemented for all the table rules. API functions: rte_table_action_profile_create(), rte_table_action_profile_action_register(), rte_table_action_profile_freeze().
  • Instantiate the table action profile to create table action objects. Each pipeline table has its own table action object. API functions: rte_table_action_create().
  • Use the table action object to generate the pipeline table action handlers (invoked by the pipeline table lookup operation). API functions: rte_table_action_table_params_get().
  • Use the table action object to generate the rule data (for the pipeline table rule add operation) based on given action parameters. API functions: rte_table_action_apply().
  • Use the table action object to read action data (e.g. stats counters) for any given rule. API functions: rte_table_action_XYZ_read().
⚠️ Warning β€” EXPERIMENTAL: this API may change without prior notice. so like, do not get attached, bestie 😭 it could shift under you at any moment.

Definition in file rte_table_action.h.


πŸ”₯ Macro Definition Documentation πŸ”₯

#define RTE_TABLE_ACTION_LB_KEY_SIZE_MIN 8

RTE_TABLE_ACTION_LB Load balance key size min (number of bytes).

Definition at line 137 of file rte_table_action.h.


#define RTE_TABLE_ACTION_LB_KEY_SIZE_MAX 64

Load balance key size max (number of bytes).

Definition at line 140 of file rte_table_action.h.


#define RTE_TABLE_ACTION_LB_TABLE_SIZE 8

Load balance table size.

Definition at line 143 of file rte_table_action.h.


#define RTE_TABLE_ACTION_TC_MAX 16

RTE_TABLE_ACTION_MTR Max number of traffic classes (TCs).

Definition at line 185 of file rte_table_action.h.


#define RTE_TABLE_ACTION_TC_QUEUE_MAX 16

Max number of queues per traffic class.

Definition at line 188 of file rte_table_action.h.


#define RTE_TABLE_ACTION_MPLS_LABELS_MAX 4

Max number of MPLS labels per output packet for MPLS encapsulation.

Definition at line 461 of file rte_table_action.h.


#define RTE_TABLE_ACTION_SYM_CRYPTO_IV_SIZE_MAX (16)

RTE_TABLE_ACTION_CRYPTO

Definition at line 709 of file rte_table_action.h.


✨ Enumeration Type Documentation ✨

okay bestie, enum time and this is where the table-action universe gets its little name tags πŸ’– these are the types and their enumerators, all lined up, no cap.


enum rte_table_action_type

Table actions. the whole menu, basically πŸ‘‘

  • RTE_TABLE_ACTION_FWD β€” Forward to next pipeline table, output port or drop. go forth or yeet
  • RTE_TABLE_ACTION_LB β€” Load balance. spread the love across paths πŸ’…
  • RTE_TABLE_ACTION_MTR β€” Traffic Metering and Policing. who's speeding? caught
  • RTE_TABLE_ACTION_TM β€” Traffic Management.
  • RTE_TABLE_ACTION_ENCAP β€” Packet encapsulations. wrap it up πŸŽ€
  • RTE_TABLE_ACTION_NAT β€” Network Address Translation (NAT). address glow-up ✨
  • RTE_TABLE_ACTION_TTL β€” Time to Live (TTL) update.
  • RTE_TABLE_ACTION_STATS β€” Statistics. numbers, we love her
  • RTE_TABLE_ACTION_TIME β€” Timestamp.
  • RTE_TABLE_ACTION_SYM_CRYPTO β€” Crypto.
  • RTE_TABLE_ACTION_TAG β€” Tag.
  • RTE_TABLE_ACTION_DECAP β€” Packet decapsulations. unwrap it, periodt πŸ¦‹

Definition at line 70 of file rte_table_action.h.


enum rte_table_action_meter_algorithm

Supported traffic metering algorithms. the meter lore 🌸

  • RTE_TABLE_ACTION_METER_SRTCM β€” Single Rate Three Color Marker (srTCM) - IETF RFC 2697.
  • RTE_TABLE_ACTION_METER_TRTCM β€” Two Rate Three Color Marker (trTCM) - IETF RFC 2698.

Definition at line 216 of file rte_table_action.h.


enum rte_table_action_policer

Policer actions. the consequences era πŸ’€

  • RTE_TABLE_ACTION_POLICER_COLOR_GREEN β€” Recolor the packet as green.
  • RTE_TABLE_ACTION_POLICER_COLOR_YELLOW β€” Recolor the packet as yellow.
  • RTE_TABLE_ACTION_POLICER_COLOR_RED β€” Recolor the packet as red.
  • RTE_TABLE_ACTION_POLICER_DROP β€” Drop the packet. bye.
  • RTE_TABLE_ACTION_POLICER_MAX β€” Number of policer actions.

Definition at line 239 of file rte_table_action.h.


enum rte_table_action_encap_type

RTE_TABLE_ACTION_ENCAP supported packet encapsulation types. dress-up montage but for packets 🧚

  • RTE_TABLE_ACTION_ENCAP_ETHER β€” IP -> { Ether | IP }
  • RTE_TABLE_ACTION_ENCAP_VLAN β€” IP -> { Ether | VLAN | IP }
  • RTE_TABLE_ACTION_ENCAP_QINQ β€” IP -> { Ether | S-VLAN | C-VLAN | IP }
  • RTE_TABLE_ACTION_ENCAP_MPLS β€” IP -> { Ether | MPLS | IP }
  • RTE_TABLE_ACTION_ENCAP_PPPOE β€” IP -> { Ether | PPPoE | PPP | IP }
  • RTE_TABLE_ACTION_ENCAP_VXLAN β€” Ether -> { Ether | IP | UDP | VXLAN | Ether } Ether -> { Ether | VLAN | IP | UDP | VXLAN | Ether }
  • RTE_TABLE_ACTION_ENCAP_QINQ_PPPOE β€” IP -> { Ether | S-VLAN | C-VLAN | PPPoE | PPP | IP }

Definition at line 363 of file rte_table_action.h.

πŸ’– FUNCTION DOCUMENTATION πŸ’–

okay bestie, this is the part where we get to the actual functions β€” the whole reason you're here. every single one is marked __rte_experimental, so yeah, they're the experimental girlypops of the API. handle with care, they might change on you. πŸ™ˆ


πŸ¦‹ rte_table_action_profile_create()

__rte_experimental struct rte_table_action_profile *
    rte_table_action_profile_create(struct rte_table_action_common_config *
    common)

Table action profile create. she's born ✨

Parameters

  • common β€” the common action configuration. slay.

Returns

  • Table action profile handle on success, NULL otherwise. no handle, no party. πŸ’…

🌸 rte_table_action_profile_free()

__rte_experimental int rte_table_action_profile_free(struct
    rte_table_action_profile * profile)

Table action profile free. releasing her back into the wild πŸ¦‹

Parameters

  • profile β€” table profile action handle, and it needs to be valid (like, actually valid, bestie).

Returns

  • Zero on success, non-zero error code otherwise.

⭐ rte_table_action_profile_action_register()

__rte_experimental int rte_table_action_profile_action_register (struct
    rte_table_action_profile * profile, enum rte_table_action_type type,
    void * action_config)

Table action profile action register. adding a little action to your profile, so on brand πŸ’…

Parameters

  • profile β€” table profile action handle. it needs to be valid and NOT in frozen state. once it's frozen, that's it, periodt.
  • type β€” the specific table action you're registering for the profile.
  • action_config β€” configuration for the type action. If struct rte_table_action_*type*_config is defined by the Table Action API, it needs to point to a valid instance of this structure; otherwise it needs to be set to NULL. so like… check before you commit. πŸ”

Returns

  • Zero on success, non-zero error code otherwise.

🧊 rte_table_action_profile_freeze()

__rte_experimental int rte_table_action_profile_freeze (struct
    rte_table_action_profile * profile)

Table action profile freeze. ice ice baby ❄️

Once this function is called successfully, the given profile enters the frozen state with the following immediate effects: no more actions can be registered for this profile, so the profile can be instantiated to create table action objects. it's giving "the vibe is locked in, no notes." πŸ”’

Parameters

  • profile β€” table profile action handle. Needs to be valid and not in frozen state.

Returns

  • Zero on success, non-zero error code otherwise.

See also

  • rte_table_action_create()

πŸ‘‘ rte_table_action_create()

__rte_experimental struct rte_table_action * rte_table_action_create (struct
    rte_table_action_profile * profile, uint32_t socket_id)

Table action create.

Instantiates the given table action profile to create a table action object. glowed up from profile to full object, we love to see it πŸ”₯

Parameters

  • profile β€” table profile action handle. Needs to be valid and in frozen state. (yes girl, you gotta freeze it first, we told you.)
  • socket_id β€” CPU socket ID where the internal data structures required by the new table action object should be allocated. that's where she lives now 🏑

Returns

  • Handle to table action object on success, NULL on error.

See also

  • rte_table_action_create()

πŸ’œ rte_table_action_free()

__rte_experimental int rte_table_action_free (struct rte_table_action *
    action)

Table action free. goodbye gorgeous 🫢

Parameters

  • action β€” handle to table action object. Needs to be valid.

Returns

  • Zero on success, non-zero error code otherwise.

πŸŽ€ rte_table_action_table_params_get()

__rte_experimental int rte_table_action_table_params_get (struct
    rte_table_action * action, struct rte_pipeline_table_params * params)

Table action table params get. go get those params bestie πŸ“₯

Parameters

  • action β€” handle to table action object. Needs to be valid.
  • params β€” pipeline table parameters. Needs to be pre-allocated (so don't come to her empty-handed, okay?).

Returns

  • Zero on success, non-zero error code otherwise.

✨ rte_table_action_apply()

__rte_experimental int rte_table_action_apply (struct rte_table_action *
    action, void * data, enum rte_table_action_type type, void *
    action_params)

Table action apply. make it do the thing πŸ’…

Parameters

  • action β€” handle to table action object. Needs to be valid.
  • data β€” data byte array (typically table rule data) to apply action type on.
  • type β€” the specific table action previously registered for the table action profile of the action object. (so register it first, obviously β€” we covered that back in rte_table_action_profile_action_register().)
  • action_params β€” parameters for the type action. If struct rte_table_action_*type*_params is defined by the Table Action API, it needs to point to a valid instance of this structure; otherwise it needs to be set to NULL. same energy as before, no cap. 🧒

Returns

  • Zero on success, non-zero error code otherwise.

🌈 rte_table_action_dscp_table_update()

__rte_experimental int rte_table_action_dscp_table_update (struct
    rte_table_action * action, uint64_t dscp_mask, struct
    rte_table_action_dscp_table * table)

Table action DSCP table update. targeted glow-up for the table πŸ”†

Parameters

  • action β€” handle to table action object. Needs to be valid.
  • dscp_mask β€” 64-bit mask defining the DSCP table entries to be updated. If bit N is set in this bit mask, then DSCP table entry N is to be updated, otherwise not. so like a little checkbox list but in binary πŸ’€
  • table β€” DSCP table.

Returns

  • Zero on success, non-zero error code otherwise.

πŸ“ rte_table_action_meter_profile_add()

__rte_experimental int rte_table_action_meter_profile_add (struct
    rte_table_action * action, uint32_t meter_profile_id, struct
    rte_table_action_meter_profile * profile)

Table action meter profile add. new meter profile just dropped 🌟

Parameters

  • action β€” handle to table action object. Needs to be valid.
  • meter_profile_id β€” meter profile ID to be used for the profile once it is successfully added to the action object. Needs to be unused by the set of meter profiles currently registered for the action object β€” so no duplicate IDs, she's taken bestie πŸ™…β€β™€οΈ
  • profile β€” meter profile to be added.

Returns

  • Zero on success, non-zero error code otherwise.

πŸ’€ rte_table_action_meter_profile_delete()

__rte_experimental int rte_table_action_meter_profile_delete (struct
    rte_table_action * action, uint32_t meter_profile_id)

Table action meter profile delete. we're removing her from the group chat βœ‚οΈ

Parameters

  • action β€” handle to table action object. Needs to be valid.
  • meter_profile_id β€” meter profile ID of the meter profile to be deleted from the action object. Needs to be valid for the action object β€” you can't delete a girl who was never invited.

Returns

  • Zero on success, non-zero error code otherwise.

πŸ”₯ rte_table_action_meter_read()

__rte_experimental int rte_table_action_meter_read (struct rte_table_action
    * action, void * data, uint32_t tc_mask, struct
    rte_table_action_mtr_counters * stats, int clear)

Table action meter read. reading the stats, nosey but make it fashion πŸ‘€

Parameters

  • action β€” handle to table action object. Needs to be valid.
  • data β€” data byte array (typically table rule data) with meter action previously applied on it.
  • tc_mask β€” bit mask defining which traffic classes should have the meter stats counters read from data and stored into stats. If bit N is set in this bit mask, then traffic class N is part of this operation, otherwise it is not. If bit N is set in this bit mask, then traffic class N must be one of the traffic classes that are enabled for the meter action in the table action profile used by the action object. so bit N = tc N, and it has to actually be enabled, got it?
  • stats β€” when non-NULL, it points to the area where the meter stats counters read from data are saved. Only the meter stats counters for the tc_mask traffic classes are read and stored to stats. girl you only get the classes you asked for πŸ’…
  • clear β€” when non-zero, the meter stats counters are cleared (i.e. set to zero), otherwise the counters are not modified. When the read operation is enabled (stats is non-NULL), the clear operation is performed after the read operation is completed. read first, then wipe.

Returns

  • Zero on success, non-zero error code otherwise.

πŸ¦‹ rte_table_action_ttl_read()

__rte_experimental int rte_table_action_ttl_read (struct rte_table_action *
    action, void * data, struct rte_table_action_ttl_counters * stats, int
    clear)

Table action TTL read. checking how much time these packets have left ⏳

Parameters

  • action β€” handle to table action object. Needs to be valid.
  • data β€” data byte array (typically table rule data) with TTL action previously applied on it.
  • stats β€” when non-NULL, it points to the area where the TTL stats counters read from data are saved.
  • clear β€” when non-zero, the TTL stats counters are cleared (i.e. set to zero), otherwise the counters are not modified. When the read operation is enabled (stats is non-NULL), the clear operation is performed after the read operation is completed. same deal as the meter one, read then clear. πŸ”

Returns

  • Zero on success, non-zero error code otherwise.

🌸 rte_table_action_stats_read()

__rte_experimental int rte_table_action_stats_read (struct rte_table_action
    * action, void * data, struct rte_table_action_stats_counters * stats,
    int clear)

Table action stats read. just here for the numbers, respectfully πŸ“Š

Parameters

  • action β€” handle to table action object. Needs to be valid.
  • data β€” data byte array (typically table rule data) with stats action previously applied on it.
  • stats β€” when non-NULL, it points to the area where the stats counters read from data are saved.
  • clear β€” when non-zero, the stats counters are cleared (i.e. set to zero), otherwise the counters are not modified. When the read operation is enabled (stats is non-NULL), the clear operation is performed after the read operation is completed. yes bestie, again: read first, then clear. 😌

Returns

  • Zero on success, non-zero error code otherwise.

⭐ rte_table_action_time_read()

__rte_experimental int rte_table_action_time_read (struct rte_table_action *
    action, void * data, uint64_t * timestamp)

Table action timestamp read. what time is it? time to read a timestamp πŸ•°οΈ

Parameters

  • action β€” handle to table action object. Needs to be valid.
  • data β€” data byte array (typically table rule data) with timestamp action previously applied on it.
  • timestamp β€” pre-allocated memory where the timestamp read from data is saved. Has to be non-NULL β€” no, seriously, if you pass NULL here it's not going to be cute. 😭

Returns

  • Zero on success, non-zero error code otherwise.

πŸŽ€ rte_table_action_crypto_sym_session_get()

__rte_experimental struct rte_cryptodev_sym_session *
    rte_table_action_crypto_sym_session_get (struct rte_table_action *
    action, void * data)

Table action cryptodev symmetric session get. handing you the session, go be secure πŸ”

Parameters

  • action β€” handle to table action object. Needs to be valid.
  • data β€” data byte array (typically table rule data) with sym crypto action.

Returns

  • The pointer to the session on success, NULL otherwise.

πŸ’œ AUTHOR

Generated automatically by Doxygen for DPDK from the source code. no humans were harmed (or consulted) in the making of this documentation, it's literally robot-made. πŸ€–βœ¨


and that's a wrap on this page, bestie!! 🫢 you just read DPDK Version 25.11.3, page rte_table_action.h(3), and honestly? iconic behavior. go forth and build your pipelines. slay, periodt, and remember: freeze your profile before you instantiate it. mwah πŸ’‹

πŸ“¦ where this page comes from