---
name: "rte_flow_action_sample"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_flow_action_sample"
---

# rte\_flow\_action\_sample(3)

## NAME

rte\_flow\_action\_sample

## SYNOPSIS

`#include <rte_flow.h>`

### Data Fields

uint32\_t **ratio**\
 const struct **rte\_flow\_action** \* **actions**\

## Detailed Description

**Warning**

**EXPERIMENTAL:** this structure may change without prior notice

RTE\_FLOW\_ACTION\_TYPE\_SAMPLE

Adds a sample action to a matched flow.

The matching packets will be duplicated with specified ratio and applied with own set of actions with a fate action, the sampled packet could be redirected to queue or port. All the packets continue processing on the default flow path.

When the sample ratio is set to 1 then the packets will be 100% mirrored. Additional action list be supported to add for sampled or mirrored packets.

Definition at line **4334** of file **rte\_flow.h**.

## Field Documentation

### uint32\_t ratio

packets sampled equals to '1/ratio'.

Definition at line **4335** of file **rte\_flow.h**.

### const struct rte\_flow\_action\* actions

sub-action list specific for the sampling hit cases.

Definition at line **4337** of file **rte\_flow.h**.

## Author

Generated automatically by Doxygen for DPDK from the source code.
