rte_port_in_action.h(3)
π rte_port_in_action.h β the manual page, but make it cute π
okay bestie, gather round, because this is rte_port_in_action.h from the Library Functions Manual, and it's genuinely one of those headers that makes your pipeline life so much easier. no cap. π«Ά
β¨ NAME β¨
rte_port_in_action.h β the header where all the RTE Pipeline Input Port Actions live. that's the whole name. iconic behaviour honestly. π
β¨ SYNOPSIS β¨
so first, the vibes, aka the includes:
#include <stdint.h>
#include <rte_compat.h>
#include <rte_table_hash.h>
#include 'rte_pipeline.h'
(yes, that last one is written with single quotes in the original, and I am not touching it. character for character, bestie. π)
πΈ Data Structures
these absolute cuties right here:
struct rte_port_in_action_fltr_configstruct rte_port_in_action_fltr_paramsstruct rte_port_in_action_lb_configstruct rte_port_in_action_lb_params
πΈ Macros
#define RTE_PORT_IN_ACTION_FLTR_KEY_SIZE 16#define RTE_PORT_IN_ACTION_LB_KEY_SIZE_MIN 8#define RTE_PORT_IN_ACTION_LB_KEY_SIZE_MAX 64#define RTE_PORT_IN_ACTION_LB_TABLE_SIZE 16
πΈ Enumerations
enum rte_port_in_action_type { RTE_PORT_IN_ACTION_FLTR = 0,
RTE_PORT_IN_ACTION_LB }
πΈ Functions
okay this is the main character list, no skips:
__rte_experimental struct rte_port_in_action_profile *
rte_port_in_action_profile_create (uint32_t socket_id)
__rte_experimental int rte_port_in_action_profile_free (struct
rte_port_in_action_profile *profile)
__rte_experimental int rte_port_in_action_profile_action_register
(struct rte_port_in_action_profile *profile, enum
rte_port_in_action_type type, void *action_config)
__rte_experimental int rte_port_in_action_profile_freeze (struct
rte_port_in_action_profile *profile)
__rte_experimental struct rte_port_in_action * rte_port_in_action_create
(struct rte_port_in_action_profile *profile, uint32_t socket_id)
__rte_experimental int rte_port_in_action_free (struct
rte_port_in_action *action)
__rte_experimental int rte_port_in_action_params_get (struct
rte_port_in_action *action, struct rte_pipeline_port_in_params
*params)
__rte_experimental int rte_port_in_action_apply (struct
rte_port_in_action *action, enum rte_port_in_action_type type, void
*action_params)
β¨ Detailed Description β¨
RTE Pipeline Input Port Actions π
so the tea is this: this API hands you a common set of actions for pipeline input ports, and its whole goal in life is to speed up application development. literally that's it. slay.
every pipeline input port can be assigned an action handler that gets executed on every input packet during pipeline execution. now, the pipeline library already lets you define your own input port actions by providing a customized input port action handler β you can still do that whole process if you want. but this API is intended to give you a quicker development alternative for a set of predefined actions. lowkey the best of both worlds.
the typical steps to use this API are, in order:
- Define an input port action profile. this is a configuration template that can potentially be shared by multiple input ports from the same or different pipelines β and here's the fun part β with different input ports from the same pipeline able to use different action profiles. for every input port using a given action profile, the profile defines the set of actions and the action configuration to be executed by the input port. API functions you'll need:
rte_port_in_action_profile_create(),rte_port_in_action_profile_action_register(),rte_port_in_action_profile_freeze(). - Instantiate the input port action profile to create input port action objects. each pipeline input port has its own action object, no sharing on this one. API function:
rte_port_in_action_create(). - Use the input port action object to generate the input port action handler invoked by the pipeline. API function:
rte_port_in_action_params_get(). - Use the input port action object to generate the internal data structures used by the input port action handler based on given action parameters. API function:
rte_port_in_action_apply().
Warning β οΈ EXPERIMENTAL: this API may change without prior notice. so like, don't get too attached. π
Definition in file rte_port_in_action.h.
β¨ Macro Definition Documentation β¨
πΈ #define RTE_PORT_IN_ACTION_FLTR_KEY_SIZE 16
RTE_PORT_IN_ACTION_FLTR Filter key size (number of bytes).
Definition at line 73 of file rte_port_in_action.h.
πΈ #define RTE_PORT_IN_ACTION_LB_KEY_SIZE_MIN 8
RTE_PORT_IN_ACTION_LB Load balance key size min (number of bytes).
Definition at line 113 of file rte_port_in_action.h.
πΈ #define RTE_PORT_IN_ACTION_LB_KEY_SIZE_MAX 64
Load balance key size max (number of bytes).
Definition at line 116 of file rte_port_in_action.h.
πΈ #define RTE_PORT_IN_ACTION_LB_TABLE_SIZE 16
Load balance table size.
Definition at line 119 of file rte_port_in_action.h.
β¨ Enumeration Type Documentation β¨
πΈ enum rte_port_in_action_type
Input port actions.
the enumerators, bestie:
RTE_PORT_IN_ACTION_FLTR Filter selected input packets. π
RTE_PORT_IN_ACTION_LB Load balance. βοΈ
Definition at line 61 of file rte_port_in_action.h.
β¨ Function Documentation β¨
πΈ __rte_experimental struct rte_port_in_action_profile * rte_port_in_action_profile_create (uint32_t socket_id)
Input port action profile create. β¨
Parameters
socket_idβ CPU socket ID for the internal data structures memory allocation.
Returns Input port action profile handle on success, NULL otherwise.
πΈ __rte_experimental int rte_port_in_action_profile_free (struct rte_port_in_action_profile * profile)
Input port action profile free. ποΈ
Parameters
profileβ Input port action profile handle (needs to be valid). IfprofileisNULL, no operation is performed.
Returns Always zero. we love a chill return value.
πΈ __rte_experimental int rte_port_in_action_profile_action_register (struct rte_port_in_action_profile * profile, enum rte_port_in_action_type type, void * action_config)
Input port action profile action register. π
Parameters
profileβ Input port action profile handle (needs to be valid and not in frozen state).typeβ Specific input port action to be registered for profile.action_configβ Configuration for the type action. Ifstruct rte_port_in_action_*type*_configis defined, it needs to point to a valid instance of this structure, otherwise it needs to be set toNULL.
Returns Zero on success, non-zero error code otherwise.
πΈ __rte_experimental int rte_port_in_action_profile_freeze (struct rte_port_in_action_profile * profile)
Input port action profile freeze. π§
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 input port action objects. it's giving glow-up but make it permanent.
Parameters
profileβ Input port profile action handle (needs to be valid and not in frozen state).
Returns Zero on success, non-zero error code otherwise.
See also rte_port_in_action_create()
πΈ __rte_experimental struct rte_port_in_action * rte_port_in_action_create (struct rte_port_in_action_profile * profile, uint32_t socket_id)
Input port action create. π¦
Instantiates the given input port action profile to create an input port action object.
Parameters
profileβ Input port profile action handle (needs to be valid and in frozen state).socket_idβ CPU socket ID where the internal data structures required by the new input port action object should be allocated.
Returns Handle to input port action object on success, NULL on error.
πΈ __rte_experimental int rte_port_in_action_free (struct rte_port_in_action * action)
Input port action free. ποΈ
Parameters
actionβ Handle to input port action object (needs to be valid). IfactionisNULL, no operation is performed.
Returns Always zero. again, so polite.
πΈ __rte_experimental int rte_port_in_action_params_get (struct rte_port_in_action * action, struct rte_pipeline_port_in_params * params)
Input port params get. π
Parameters
actionβ Handle to input port action object (needs to be valid).paramsβ Pipeline input port parameters (needs to be pre-allocated).
Returns Zero on success, non-zero error code otherwise.
πΈ __rte_experimental int rte_port_in_action_apply (struct rte_port_in_action * action, enum rte_port_in_action_type type, void * action_params)
Input port action apply. π
Parameters
actionβ Handle to input port action object (needs to be valid).typeβ Specific input port action previously registered for the input port action profile of the action object.action_paramsβ Parameters for the type action. Ifstruct rte_port_in_action_*type*_paramsis defined, it needs to point to a valid instance of this structure, otherwise it needs to be set toNULL.
Returns Zero on success, non-zero error code otherwise.
β¨ Author β¨
Generated automatically by Doxygen for DPDK from the source code. (not a human, not a girlie, just doxygen doing its little thing π€π)
and that's the whole page, bestie! π the footer said DPDK, Version 25.11.3, for rte_port_in_action.h(3) β so go forth, freeze those profiles, register those actions, and ship it. mwah. πβ¨π₯
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms