flexda_insert_hydra_action
Function
Inserts a Hydra action into the action list of a hardware flow table.
Syntax
int flexda_insert_hydra_action(struct rte_flow_action *hw_action, int idx, void *data, size_t size, uint32_t hydra_type)
Parameters
Parameter |
Type |
Input/Output |
Description |
|---|---|---|---|
hw_action |
struct rte_flow_action * |
Input |
Action list of the hardware flow table. |
idx |
int |
Input |
If idx is less than 0, the system automatically retrieves an available location to insert the action. If idx is greater than or equal to 0, the action is inserted at the specified location. |
data |
void * |
Input |
Content of the custom action. |
size |
size_t |
Input |
Size of the custom action. |
hydra_type |
uint32_t |
Input |
Type of the custom action. |
Return value |
int |
Output |
The function returns 0 upon successful execution; otherwise, it returns an error code. |
- The data structure cannot contain pointers.
- Repeatedly calling the function at the same location (where idx is non-negative and identical) will trigger an error and return an error code.
Example
Refer to "Procedure 1: Developing OVS Control Plane Code" in the BeiMing 26.0.RC1 FlexDA Programming Framework Developer Guide.