---
name: "rte_flow.h"
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.h"
---

# rte\_flow.h(3)

## NAME

rte\_flow.h

## SYNOPSIS

`#include <stddef.h>`\
 `#include <stdint.h>`\
 `#include <rte_compat.h>`\
 `#include <rte_common.h>`\
 `#include <rte_ether.h>`\
 `#include <rte_arp.h>`\
 `#include <rte_icmp.h>`\
 `#include <rte_ip.h>`\
 `#include <rte_sctp.h>`\
 `#include <rte_tcp.h>`\
 `#include <rte_udp.h>`\
 `#include <rte_vxlan.h>`\
 `#include <rte_esp.h>`\
 `#include <rte_higig.h>`\
 `#include <rte_ecpri.h>`\
 `#include <rte_bitops.h>`\
 `#include <rte_mbuf_dyn.h>`\
 `#include <rte_meter.h>`\
 `#include <rte_gtp.h>`\
 `#include <rte_l2tpv2.h>`\
 `#include <rte_ppp.h>`\
 `#include <rte_gre.h>`\
 `#include <rte_macsec.h>`\
 `#include <rte_ib.h>`\
 `#include 'rte_ethdev.h'`\

### Data Structures

struct **rte\_flow\_attr**\
 struct **rte\_flow\_item\_quota**\
 struct **rte\_flow\_item\_higig2\_hdr**\
 struct **rte\_flow\_item\_any**\
 struct **rte\_flow\_item\_port\_id**\
 struct **rte\_flow\_item\_raw**\
 struct **rte\_flow\_item\_eth**\
 struct **rte\_flow\_item\_vlan**\
 struct **rte\_flow\_item\_ipv4**\
 struct **rte\_flow\_item\_ipv6**\
 struct **rte\_flow\_item\_ipv6\_routing\_ext**\
 struct **rte\_flow\_item\_icmp**\
 struct **rte\_flow\_item\_udp**\
 struct **rte\_flow\_item\_tcp**\
 struct **rte\_flow\_item\_sctp**\
 struct **rte\_flow\_item\_vxlan**\
 struct **rte\_flow\_item\_e\_tag**\
 struct **rte\_flow\_item\_nvgre**\
 struct **rte\_flow\_item\_mpls**\
 struct **rte\_flow\_item\_gre**\
 struct **rte\_flow\_item\_gre\_opt**\
 struct **rte\_flow\_item\_macsec**\
 struct **rte\_flow\_item\_fuzzy**\
 struct **rte\_flow\_item\_gtp**\
 struct **rte\_flow\_item\_esp**\
 struct **rte\_flow\_item\_geneve**\
 struct **rte\_flow\_item\_vxlan\_gpe**\
 struct **rte\_flow\_item\_arp\_eth\_ipv4**\
 struct **rte\_flow\_item\_ipv6\_ext**\
 struct **rte\_flow\_item\_ipv6\_frag\_ext**\
 struct **rte\_flow\_item\_icmp6**\
 struct **rte\_flow\_item\_icmp6\_echo**\
 struct **rte\_flow\_item\_icmp6\_nd\_ns**\
 struct **rte\_flow\_item\_icmp6\_nd\_na**\
 struct **rte\_flow\_item\_icmp6\_nd\_opt**\
 struct **rte\_flow\_item\_icmp6\_nd\_opt\_sla\_eth**\
 struct **rte\_flow\_item\_icmp6\_nd\_opt\_tla\_eth**\
 struct **rte\_flow\_item\_meta**\
 struct **rte\_flow\_item\_gtp\_psc**\
 struct **rte\_flow\_item\_pppoe**\
 struct **rte\_flow\_item\_pppoe\_proto\_id**\
 struct **rte\_flow\_item\_tag**\
 struct **rte\_flow\_item\_l2tpv3oip**\
 struct **rte\_flow\_item\_mark**\
 struct **rte\_flow\_item\_nsh**\
 struct **rte\_flow\_item\_igmp**\
 struct **rte\_flow\_item\_ah**\
 struct **rte\_flow\_item\_pfcp**\
 struct **rte\_flow\_item\_ecpri**\
 struct **rte\_flow\_item\_geneve\_opt**\
 struct **rte\_flow\_item\_integrity**\
 struct **rte\_flow\_item\_conntrack**\
 struct **rte\_flow\_item\_ethdev**\
 struct **rte\_flow\_item\_l2tpv2**\
 struct **rte\_flow\_item\_ppp**\
 struct **rte\_flow\_item\_ib\_bth**\
 struct **rte\_flow\_item\_random**\
 struct **rte\_flow\_item**\
 struct **rte\_flow\_item\_flex**\
 struct **rte\_flow\_item\_flex\_field**\
 struct **rte\_flow\_item\_flex\_link**\
 struct **rte\_flow\_item\_flex\_conf**\
 struct **rte\_flow\_item\_meter\_color**\
 struct **rte\_flow\_item\_aggr\_affinity**\
 struct **rte\_flow\_item\_tx\_queue**\
 struct **rte\_flow\_item\_ptype**\
 struct **rte\_flow\_field\_data**\
 struct **rte\_flow\_item\_compare**\
 struct **rte\_flow\_action\_quota**\
 struct **rte\_flow\_query\_quota**\
 struct **rte\_flow\_update\_quota**\
 struct **rte\_flow\_action\_mark**\
 struct **rte\_flow\_action\_jump**\
 struct **rte\_flow\_action\_queue**\
 struct **rte\_flow\_action\_age**\
 struct **rte\_flow\_query\_age**\
 struct **rte\_flow\_update\_age**\
 struct **rte\_flow\_action\_count**\
 struct **rte\_flow\_query\_count**\
 struct **rte\_flow\_action\_rss**\
 struct **rte\_flow\_action\_vf**\
 struct **rte\_flow\_action\_port\_id**\
 struct **rte\_flow\_action\_meter**\
 struct **rte\_flow\_action\_security**\
 struct **rte\_flow\_action\_nat64**\
 struct **rte\_flow\_action\_of\_push\_vlan**\
 struct **rte\_flow\_action\_of\_set\_vlan\_vid**\
 struct **rte\_flow\_action\_of\_set\_vlan\_pcp**\
 struct **rte\_flow\_action\_of\_pop\_mpls**\
 struct **rte\_flow\_action\_of\_push\_mpls**\
 struct **rte\_flow\_action\_vxlan\_encap**\
 struct **rte\_flow\_action\_nvgre\_encap**\
 struct **rte\_flow\_action\_raw\_encap**\
 struct **rte\_flow\_action\_raw\_decap**\
 struct **rte\_flow\_action\_set\_ipv4**\
 struct **rte\_flow\_action\_set\_ipv6**\
 struct **rte\_flow\_action\_ipv6\_ext\_push**\
 struct **rte\_flow\_action\_ipv6\_ext\_remove**\
 struct **rte\_flow\_action\_set\_tp**\
 struct **rte\_flow\_action\_set\_ttl**\
 struct **rte\_flow\_action\_set\_mac**\
 struct **rte\_flow\_action\_set\_tag**\
 struct **rte\_flow\_action\_set\_meta**\
 struct **rte\_flow\_action\_set\_dscp**\
 struct **rte\_flow\_tcp\_dir\_param**\
 struct **rte\_flow\_action\_conntrack**\
 struct **rte\_flow\_modify\_conntrack**\
 struct **rte\_flow\_action\_meter\_color**\
 struct **rte\_flow\_action\_ethdev**\
 struct **rte\_flow\_action\_modify\_field**\
 struct **rte\_flow\_action\_meter\_mark**\
 struct **rte\_flow\_update\_meter\_mark**\
 struct **rte\_flow\_indirect\_update\_flow\_meter\_mark**\
 struct **rte\_flow\_action\_prog\_argument**\
 struct **rte\_flow\_action\_prog**\
 struct **rte\_flow\_action\_jump\_to\_table\_index**\
 struct **rte\_flow\_action**\
 struct **rte\_flow\_action\_sample**\
 struct **rte\_flow\_error**\
 struct **rte\_flow\_conv\_rule**\
 struct **rte\_flow\_desc**\
 struct **rte\_flow\_indir\_action\_conf**\
 struct **rte\_flow\_restore\_info**\
 struct **rte\_flow\_port\_info**\
 struct **rte\_flow\_queue\_info**\
 struct **rte\_flow\_port\_attr**\
 struct **rte\_flow\_queue\_attr**\
 struct **rte\_flow\_pattern\_template\_attr**\
 struct **rte\_flow\_actions\_template\_attr**\
 struct **rte\_flow\_template\_table\_attr**\
 struct **rte\_flow\_op\_attr**\
 struct **rte\_flow\_op\_result**\
 struct **rte\_flow\_action\_indirect\_list**\

### Macros

\#define **RTE\_FLOW\_CONNTRACK\_PKT\_STATE\_VALID**   **RTE\_BIT32**(0)\
 \#define **RTE\_FLOW\_CONNTRACK\_PKT\_STATE\_CHANGED**   **RTE\_BIT32**(1)\
 \#define **RTE\_FLOW\_CONNTRACK\_PKT\_STATE\_INVALID**   **RTE\_BIT32**(2)\
 \#define **RTE\_FLOW\_CONNTRACK\_PKT\_STATE\_DISABLED**   [**RTE\_BIT32**(3)](/RTE_BIT32/3.md)\
 \#define **RTE\_FLOW\_CONNTRACK\_PKT\_STATE\_BAD**   **RTE\_BIT32**(4)\
 \#define **RTE\_FLOW\_RESTORE\_INFO\_TUNNEL**   **RTE\_BIT64**(0)\
 \#define **RTE\_FLOW\_RESTORE\_INFO\_ENCAPSULATED**   **RTE\_BIT64**(1)\
 \#define **RTE\_FLOW\_RESTORE\_INFO\_GROUP\_ID**   **RTE\_BIT64**(2)\
 \#define **RTE\_FLOW\_PORT\_FLAG\_STRICT\_QUEUE**   **RTE\_BIT32**(0)\
 \#define **RTE\_FLOW\_PORT\_FLAG\_SHARE\_INDIRECT**   **RTE\_BIT32**(1)\

**Flags for template table attribute.**\
 Each bit is an optional hint for table specialization, offering a potential optimization at driver layer. The driver can ignore the hints silently. The hints do not replace any matching criteria.

\#define **RTE\_FLOW\_TABLE\_SPECIALIZE\_TRANSFER\_WIRE\_ORIG**   **RTE\_BIT32**(0)\
 \#define **RTE\_FLOW\_TABLE\_SPECIALIZE\_TRANSFER\_VPORT\_ORIG**   **RTE\_BIT32**(1)\
 \#define **RTE\_FLOW\_TABLE\_SPECIALIZE\_RESIZABLE**   **RTE\_BIT32**(2)\

### Enumerations

enum **rte\_flow\_item\_type** { **RTE\_FLOW\_ITEM\_TYPE\_END**, **RTE\_FLOW\_ITEM\_TYPE\_VOID**, **RTE\_FLOW\_ITEM\_TYPE\_INVERT**, **RTE\_FLOW\_ITEM\_TYPE\_ANY**, **RTE\_FLOW\_ITEM\_TYPE\_PORT\_ID**, **RTE\_FLOW\_ITEM\_TYPE\_RAW**, **RTE\_FLOW\_ITEM\_TYPE\_ETH**, **RTE\_FLOW\_ITEM\_TYPE\_VLAN**, **RTE\_FLOW\_ITEM\_TYPE\_IPV4**, **RTE\_FLOW\_ITEM\_TYPE\_IPV6**, **RTE\_FLOW\_ITEM\_TYPE\_ICMP**, **RTE\_FLOW\_ITEM\_TYPE\_UDP**, **RTE\_FLOW\_ITEM\_TYPE\_TCP**, **RTE\_FLOW\_ITEM\_TYPE\_SCTP**, **RTE\_FLOW\_ITEM\_TYPE\_VXLAN**, **RTE\_FLOW\_ITEM\_TYPE\_E\_TAG**, **RTE\_FLOW\_ITEM\_TYPE\_NVGRE**, **RTE\_FLOW\_ITEM\_TYPE\_MPLS**, **RTE\_FLOW\_ITEM\_TYPE\_GRE**, **RTE\_FLOW\_ITEM\_TYPE\_FUZZY**, **RTE\_FLOW\_ITEM\_TYPE\_GTP**, **RTE\_FLOW\_ITEM\_TYPE\_GTPC**, **RTE\_FLOW\_ITEM\_TYPE\_GTPU**, **RTE\_FLOW\_ITEM\_TYPE\_ESP**, **RTE\_FLOW\_ITEM\_TYPE\_GENEVE**, **RTE\_FLOW\_ITEM\_TYPE\_VXLAN\_GPE**, **RTE\_FLOW\_ITEM\_TYPE\_ARP\_ETH\_IPV4**, **RTE\_FLOW\_ITEM\_TYPE\_IPV6\_EXT**, **RTE\_FLOW\_ITEM\_TYPE\_ICMP6**, **RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_NS**, **RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_NA**, **RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_OPT**, **RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_OPT\_SLA\_ETH**, **RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_OPT\_TLA\_ETH**, **RTE\_FLOW\_ITEM\_TYPE\_MARK**, **RTE\_FLOW\_ITEM\_TYPE\_META**, **RTE\_FLOW\_ITEM\_TYPE\_GRE\_KEY**, **RTE\_FLOW\_ITEM\_TYPE\_GTP\_PSC**, **RTE\_FLOW\_ITEM\_TYPE\_PPPOES**, **RTE\_FLOW\_ITEM\_TYPE\_PPPOED**, **RTE\_FLOW\_ITEM\_TYPE\_PPPOE\_PROTO\_ID**, **RTE\_FLOW\_ITEM\_TYPE\_NSH**, **RTE\_FLOW\_ITEM\_TYPE\_IGMP**, **RTE\_FLOW\_ITEM\_TYPE\_AH**, **RTE\_FLOW\_ITEM\_TYPE\_HIGIG2**, **RTE\_FLOW\_ITEM\_TYPE\_TAG**, **RTE\_FLOW\_ITEM\_TYPE\_L2TPV3OIP**, **RTE\_FLOW\_ITEM\_TYPE\_PFCP**, **RTE\_FLOW\_ITEM\_TYPE\_ECPRI**, **RTE\_FLOW\_ITEM\_TYPE\_IPV6\_FRAG\_EXT**, **RTE\_FLOW\_ITEM\_TYPE\_GENEVE\_OPT**, **RTE\_FLOW\_ITEM\_TYPE\_INTEGRITY**, **RTE\_FLOW\_ITEM\_TYPE\_CONNTRACK**, **RTE\_FLOW\_ITEM\_TYPE\_PORT\_REPRESENTOR**, **RTE\_FLOW\_ITEM\_TYPE\_REPRESENTED\_PORT**, **RTE\_FLOW\_ITEM\_TYPE\_FLEX**, **RTE\_FLOW\_ITEM\_TYPE\_L2TPV2**, **RTE\_FLOW\_ITEM\_TYPE\_PPP**, **RTE\_FLOW\_ITEM\_TYPE\_GRE\_OPTION**, **RTE\_FLOW\_ITEM\_TYPE\_MACSEC**, **RTE\_FLOW\_ITEM\_TYPE\_METER\_COLOR**, **RTE\_FLOW\_ITEM\_TYPE\_IPV6\_ROUTING\_EXT**, **RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ECHO\_REQUEST**, **RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ECHO\_REPLY**, **RTE\_FLOW\_ITEM\_TYPE\_QUOTA**, **RTE\_FLOW\_ITEM\_TYPE\_AGGR\_AFFINITY**, **RTE\_FLOW\_ITEM\_TYPE\_TX\_QUEUE**, **RTE\_FLOW\_ITEM\_TYPE\_IB\_BTH**, **RTE\_FLOW\_ITEM\_TYPE\_PTYPE**, **RTE\_FLOW\_ITEM\_TYPE\_RANDOM**, **RTE\_FLOW\_ITEM\_TYPE\_COMPARE** }\
 enum **rte\_flow\_quota\_state** { **RTE\_FLOW\_QUOTA\_STATE\_PASS**, **RTE\_FLOW\_QUOTA\_STATE\_BLOCK** }\
 enum **rte\_flow\_item\_flex\_field\_mode** { **FIELD\_MODE\_DUMMY** = 0, **FIELD\_MODE\_FIXED**, **FIELD\_MODE\_OFFSET**, **FIELD\_MODE\_BITMASK** }\
 enum **rte\_flow\_item\_flex\_tunnel\_mode** { **FLEX\_TUNNEL\_MODE\_SINGLE** = 0, **FLEX\_TUNNEL\_MODE\_OUTER**, **FLEX\_TUNNEL\_MODE\_INNER**, **FLEX\_TUNNEL\_MODE\_MULTI**, **FLEX\_TUNNEL\_MODE\_TUNNEL** }\
 enum **rte\_flow\_field\_id** { **RTE\_FLOW\_FIELD\_START** = 0, **RTE\_FLOW\_FIELD\_MAC\_DST**, **RTE\_FLOW\_FIELD\_MAC\_SRC**, **RTE\_FLOW\_FIELD\_VLAN\_TYPE**, **RTE\_FLOW\_FIELD\_VLAN\_ID**, **RTE\_FLOW\_FIELD\_MAC\_TYPE**, **RTE\_FLOW\_FIELD\_IPV4\_DSCP**, **RTE\_FLOW\_FIELD\_IPV4\_TTL**, **RTE\_FLOW\_FIELD\_IPV4\_SRC**, **RTE\_FLOW\_FIELD\_IPV4\_DST**, **RTE\_FLOW\_FIELD\_IPV6\_DSCP**, **RTE\_FLOW\_FIELD\_IPV6\_HOPLIMIT**, **RTE\_FLOW\_FIELD\_IPV6\_SRC**, **RTE\_FLOW\_FIELD\_IPV6\_DST**, **RTE\_FLOW\_FIELD\_TCP\_PORT\_SRC**, **RTE\_FLOW\_FIELD\_TCP\_PORT\_DST**, **RTE\_FLOW\_FIELD\_TCP\_SEQ\_NUM**, **RTE\_FLOW\_FIELD\_TCP\_ACK\_NUM**, **RTE\_FLOW\_FIELD\_TCP\_FLAGS**, **RTE\_FLOW\_FIELD\_UDP\_PORT\_SRC**, **RTE\_FLOW\_FIELD\_UDP\_PORT\_DST**, **RTE\_FLOW\_FIELD\_VXLAN\_VNI**, **RTE\_FLOW\_FIELD\_GENEVE\_VNI**, **RTE\_FLOW\_FIELD\_GTP\_TEID**, **RTE\_FLOW\_FIELD\_TAG**, **RTE\_FLOW\_FIELD\_MARK**, **RTE\_FLOW\_FIELD\_META**, **RTE\_FLOW\_FIELD\_POINTER**, **RTE\_FLOW\_FIELD\_VALUE**, **RTE\_FLOW\_FIELD\_IPV4\_ECN**, **RTE\_FLOW\_FIELD\_IPV6\_ECN**, **RTE\_FLOW\_FIELD\_GTP\_PSC\_QFI**, **RTE\_FLOW\_FIELD\_METER\_COLOR**, **RTE\_FLOW\_FIELD\_IPV6\_PROTO**, **RTE\_FLOW\_FIELD\_FLEX\_ITEM**, **RTE\_FLOW\_FIELD\_HASH\_RESULT**, **RTE\_FLOW\_FIELD\_GENEVE\_OPT\_TYPE**, **RTE\_FLOW\_FIELD\_GENEVE\_OPT\_CLASS**, **RTE\_FLOW\_FIELD\_GENEVE\_OPT\_DATA**, **RTE\_FLOW\_FIELD\_MPLS**, **RTE\_FLOW\_FIELD\_TCP\_DATA\_OFFSET**, **RTE\_FLOW\_FIELD\_IPV4\_IHL**, **RTE\_FLOW\_FIELD\_IPV4\_TOTAL\_LEN**, **RTE\_FLOW\_FIELD\_IPV6\_PAYLOAD\_LEN**, **RTE\_FLOW\_FIELD\_IPV4\_PROTO**, **RTE\_FLOW\_FIELD\_IPV6\_FLOW\_LABEL**, **RTE\_FLOW\_FIELD\_IPV6\_TRAFFIC\_CLASS**, **RTE\_FLOW\_FIELD\_ESP\_SPI**, **RTE\_FLOW\_FIELD\_ESP\_SEQ\_NUM**, **RTE\_FLOW\_FIELD\_ESP\_PROTO**, **RTE\_FLOW\_FIELD\_RANDOM**, **RTE\_FLOW\_FIELD\_VXLAN\_LAST\_RSVD** }\
 enum **rte\_flow\_item\_compare\_op** \
 enum **rte\_flow\_action\_type** { **RTE\_FLOW\_ACTION\_TYPE\_END**, **RTE\_FLOW\_ACTION\_TYPE\_VOID**, **RTE\_FLOW\_ACTION\_TYPE\_PASSTHRU**, **RTE\_FLOW\_ACTION\_TYPE\_JUMP**, **RTE\_FLOW\_ACTION\_TYPE\_MARK**, **RTE\_FLOW\_ACTION\_TYPE\_FLAG**, **RTE\_FLOW\_ACTION\_TYPE\_QUEUE**, **RTE\_FLOW\_ACTION\_TYPE\_DROP**, **RTE\_FLOW\_ACTION\_TYPE\_COUNT**, **RTE\_FLOW\_ACTION\_TYPE\_RSS**, **RTE\_FLOW\_ACTION\_TYPE\_PF**, **RTE\_FLOW\_ACTION\_TYPE\_VF**, **RTE\_FLOW\_ACTION\_TYPE\_PORT\_ID**, **RTE\_FLOW\_ACTION\_TYPE\_METER**, **RTE\_FLOW\_ACTION\_TYPE\_SECURITY**, **RTE\_FLOW\_ACTION\_TYPE\_OF\_DEC\_NW\_TTL**, **RTE\_FLOW\_ACTION\_TYPE\_OF\_POP\_VLAN**, **RTE\_FLOW\_ACTION\_TYPE\_OF\_PUSH\_VLAN**, **RTE\_FLOW\_ACTION\_TYPE\_OF\_SET\_VLAN\_VID**, **RTE\_FLOW\_ACTION\_TYPE\_OF\_SET\_VLAN\_PCP**, **RTE\_FLOW\_ACTION\_TYPE\_OF\_POP\_MPLS**, **RTE\_FLOW\_ACTION\_TYPE\_OF\_PUSH\_MPLS**, **RTE\_FLOW\_ACTION\_TYPE\_VXLAN\_ENCAP**, **RTE\_FLOW\_ACTION\_TYPE\_VXLAN\_DECAP**, **RTE\_FLOW\_ACTION\_TYPE\_NVGRE\_ENCAP**, **RTE\_FLOW\_ACTION\_TYPE\_NVGRE\_DECAP**, **RTE\_FLOW\_ACTION\_TYPE\_RAW\_ENCAP**, **RTE\_FLOW\_ACTION\_TYPE\_RAW\_DECAP**, **RTE\_FLOW\_ACTION\_TYPE\_SET\_IPV4\_SRC**, **RTE\_FLOW\_ACTION\_TYPE\_SET\_IPV4\_DST**, **RTE\_FLOW\_ACTION\_TYPE\_SET\_IPV6\_SRC**, **RTE\_FLOW\_ACTION\_TYPE\_SET\_IPV6\_DST**, **RTE\_FLOW\_ACTION\_TYPE\_SET\_TP\_SRC**, **RTE\_FLOW\_ACTION\_TYPE\_SET\_TP\_DST**, **RTE\_FLOW\_ACTION\_TYPE\_MAC\_SWAP**, **RTE\_FLOW\_ACTION\_TYPE\_DEC\_TTL**, **RTE\_FLOW\_ACTION\_TYPE\_SET\_TTL**, **RTE\_FLOW\_ACTION\_TYPE\_SET\_MAC\_SRC**, **RTE\_FLOW\_ACTION\_TYPE\_SET\_MAC\_DST**, **RTE\_FLOW\_ACTION\_TYPE\_INC\_TCP\_SEQ**, **RTE\_FLOW\_ACTION\_TYPE\_DEC\_TCP\_SEQ**, **RTE\_FLOW\_ACTION\_TYPE\_INC\_TCP\_ACK**, **RTE\_FLOW\_ACTION\_TYPE\_DEC\_TCP\_ACK**, **RTE\_FLOW\_ACTION\_TYPE\_SET\_TAG**, **RTE\_FLOW\_ACTION\_TYPE\_SET\_META**, **RTE\_FLOW\_ACTION\_TYPE\_SET\_IPV4\_DSCP**, **RTE\_FLOW\_ACTION\_TYPE\_SET\_IPV6\_DSCP**, **RTE\_FLOW\_ACTION\_TYPE\_AGE**, **RTE\_FLOW\_ACTION\_TYPE\_SAMPLE**, **RTE\_FLOW\_ACTION\_TYPE\_SHARED**, **RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**, **RTE\_FLOW\_ACTION\_TYPE\_INDIRECT**, **RTE\_FLOW\_ACTION\_TYPE\_CONNTRACK**, **RTE\_FLOW\_ACTION\_TYPE\_METER\_COLOR**, **RTE\_FLOW\_ACTION\_TYPE\_PORT\_REPRESENTOR**, **RTE\_FLOW\_ACTION\_TYPE\_REPRESENTED\_PORT**, **RTE\_FLOW\_ACTION\_TYPE\_METER\_MARK**, **RTE\_FLOW\_ACTION\_TYPE\_SEND\_TO\_KERNEL**, **RTE\_FLOW\_ACTION\_TYPE\_QUOTA**, **RTE\_FLOW\_ACTION\_TYPE\_SKIP\_CMAN**, **RTE\_FLOW\_ACTION\_TYPE\_IPV6\_EXT\_PUSH**, **RTE\_FLOW\_ACTION\_TYPE\_IPV6\_EXT\_REMOVE**, **RTE\_FLOW\_ACTION\_TYPE\_INDIRECT\_LIST**, **RTE\_FLOW\_ACTION\_TYPE\_PROG**, **RTE\_FLOW\_ACTION\_TYPE\_NAT64**, **RTE\_FLOW\_ACTION\_TYPE\_JUMP\_TO\_TABLE\_INDEX** }\
 enum **rte\_flow\_quota\_mode** { **RTE\_FLOW\_QUOTA\_MODE\_PACKET** = 1, **RTE\_FLOW\_QUOTA\_MODE\_L2** = 2, **RTE\_FLOW\_QUOTA\_MODE\_L3** = 3 }\
 enum **rte\_flow\_update\_quota\_op** { **RTE\_FLOW\_UPDATE\_QUOTA\_SET**, **RTE\_FLOW\_UPDATE\_QUOTA\_ADD** }\
 enum **rte\_flow\_nat64\_type** { **RTE\_FLOW\_NAT64\_6TO4** = 0, **RTE\_FLOW\_NAT64\_4TO6** = 1 }\
 enum **rte\_flow\_conntrack\_state** { **RTE\_FLOW\_CONNTRACK\_STATE\_SYN\_RECV**, **RTE\_FLOW\_CONNTRACK\_STATE\_ESTABLISHED**, **RTE\_FLOW\_CONNTRACK\_STATE\_FIN\_WAIT**, **RTE\_FLOW\_CONNTRACK\_STATE\_CLOSE\_WAIT**, **RTE\_FLOW\_CONNTRACK\_STATE\_LAST\_ACK**, **RTE\_FLOW\_CONNTRACK\_STATE\_TIME\_WAIT** }\
 enum **rte\_flow\_conntrack\_tcp\_last\_index** { **RTE\_FLOW\_CONNTRACK\_FLAG\_NONE** = 0, **RTE\_FLOW\_CONNTRACK\_FLAG\_SYN** = RTE\_BIT32(0), **RTE\_FLOW\_CONNTRACK\_FLAG\_SYNACK** = RTE\_BIT32(1), **RTE\_FLOW\_CONNTRACK\_FLAG\_FIN** = RTE\_BIT32(2), **RTE\_FLOW\_CONNTRACK\_FLAG\_ACK** = [RTE\_BIT32(3)](/RTE_BIT32/3.md), **RTE\_FLOW\_CONNTRACK\_FLAG\_RST** = RTE\_BIT32(4) }\
 enum **rte\_flow\_modify\_op** { **RTE\_FLOW\_MODIFY\_SET** = 0, **RTE\_FLOW\_MODIFY\_ADD**, **RTE\_FLOW\_MODIFY\_SUB** }\
 enum **rte\_flow\_error\_type** { **RTE\_FLOW\_ERROR\_TYPE\_NONE**, **RTE\_FLOW\_ERROR\_TYPE\_UNSPECIFIED**, **RTE\_FLOW\_ERROR\_TYPE\_HANDLE**, **RTE\_FLOW\_ERROR\_TYPE\_ATTR\_GROUP**, **RTE\_FLOW\_ERROR\_TYPE\_ATTR\_PRIORITY**, **RTE\_FLOW\_ERROR\_TYPE\_ATTR\_INGRESS**, **RTE\_FLOW\_ERROR\_TYPE\_ATTR\_EGRESS**, **RTE\_FLOW\_ERROR\_TYPE\_ATTR\_TRANSFER**, **RTE\_FLOW\_ERROR\_TYPE\_ATTR**, **RTE\_FLOW\_ERROR\_TYPE\_ITEM\_NUM**, **RTE\_FLOW\_ERROR\_TYPE\_ITEM\_SPEC**, **RTE\_FLOW\_ERROR\_TYPE\_ITEM\_LAST**, **RTE\_FLOW\_ERROR\_TYPE\_ITEM\_MASK**, **RTE\_FLOW\_ERROR\_TYPE\_ITEM**, **RTE\_FLOW\_ERROR\_TYPE\_ACTION\_NUM**, **RTE\_FLOW\_ERROR\_TYPE\_ACTION\_CONF**, **RTE\_FLOW\_ERROR\_TYPE\_ACTION**, **RTE\_FLOW\_ERROR\_TYPE\_STATE** }\
 enum **rte\_flow\_conv\_op** { **RTE\_FLOW\_CONV\_OP\_NONE**, **RTE\_FLOW\_CONV\_OP\_ATTR**, **RTE\_FLOW\_CONV\_OP\_ITEM**, **RTE\_FLOW\_CONV\_OP\_ITEM\_MASK**, **RTE\_FLOW\_CONV\_OP\_ACTION**, **RTE\_FLOW\_CONV\_OP\_PATTERN**, **RTE\_FLOW\_CONV\_OP\_ACTIONS**, **RTE\_FLOW\_CONV\_OP\_RULE**, **RTE\_FLOW\_CONV\_OP\_ITEM\_NAME**, **RTE\_FLOW\_CONV\_OP\_ACTION\_NAME**, **RTE\_FLOW\_CONV\_OP\_ITEM\_NAME\_PTR**, **RTE\_FLOW\_CONV\_OP\_ACTION\_NAME\_PTR** }\
 enum **rte\_flow\_table\_insertion\_type** { **RTE\_FLOW\_TABLE\_INSERTION\_TYPE\_PATTERN**, **RTE\_FLOW\_TABLE\_INSERTION\_TYPE\_INDEX**, **RTE\_FLOW\_TABLE\_INSERTION\_TYPE\_INDEX\_WITH\_PATTERN** }\
 enum **rte\_flow\_table\_hash\_func** { **RTE\_FLOW\_TABLE\_HASH\_FUNC\_DEFAULT**, **RTE\_FLOW\_TABLE\_HASH\_FUNC\_LINEAR**, **RTE\_FLOW\_TABLE\_HASH\_FUNC\_CRC32**, **RTE\_FLOW\_TABLE\_HASH\_FUNC\_CRC16** }\
 enum **rte\_flow\_op\_status** { **RTE\_FLOW\_OP\_SUCCESS**, **RTE\_FLOW\_OP\_ERROR** }\
 enum **rte\_flow\_query\_update\_mode** { **RTE\_FLOW\_QU\_QUERY\_FIRST** = 1, **RTE\_FLOW\_QU\_UPDATE\_FIRST** }\
 enum **rte\_flow\_encap\_hash\_field** { **RTE\_FLOW\_ENCAP\_HASH\_FIELD\_SRC\_PORT**, **RTE\_FLOW\_ENCAP\_HASH\_FIELD\_NVGRE\_FLOW\_ID** }\

### Functions

\_\_rte\_experimental int **rte\_flow\_dev\_dump** (uint16\_t port\_id, struct rte\_flow \*flow, FILE \*file, struct **rte\_flow\_error** \*error)\
 static \_\_rte\_experimental int **rte\_flow\_dynf\_metadata\_avail** (void)\
 \_\_rte\_experimental int **rte\_flow\_dynf\_metadata\_register** (void)\
 int **rte\_flow\_validate** (uint16\_t port\_id, const struct **rte\_flow\_attr** \*attr, const struct **rte\_flow\_item** pattern\[\], const struct **rte\_flow\_action** actions\[\], struct **rte\_flow\_error** \*error)\
 struct rte\_flow \* **rte\_flow\_create** (uint16\_t port\_id, const struct **rte\_flow\_attr** \*attr, const struct **rte\_flow\_item** pattern\[\], const struct **rte\_flow\_action** actions\[\], struct **rte\_flow\_error** \*error)\
 int **rte\_flow\_destroy** (uint16\_t port\_id, struct rte\_flow \*flow, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_actions\_update** (uint16\_t port\_id, struct rte\_flow \*flow, const struct **rte\_flow\_action** actions\[\], struct **rte\_flow\_error** \*error)\
 int **rte\_flow\_flush** (uint16\_t port\_id, struct **rte\_flow\_error** \*error)\
 int **rte\_flow\_query** (uint16\_t port\_id, struct rte\_flow \*flow, const struct **rte\_flow\_action** \*action, void \*data, struct **rte\_flow\_error** \*error)\
 int **rte\_flow\_isolate** (uint16\_t port\_id, int set, struct **rte\_flow\_error** \*error)\
 int **rte\_flow\_error\_set** (struct **rte\_flow\_error** \*error, int code, enum **rte\_flow\_error\_type** type, const void \*cause, const char \*message)\
 \_\_rte\_deprecated size\_t **rte\_flow\_copy** (struct **rte\_flow\_desc** \*fd, size\_t len, const struct **rte\_flow\_attr** \*attr, const struct **rte\_flow\_item** \*items, const struct **rte\_flow\_action** \*actions)\
 \_\_rte\_experimental int **rte\_flow\_conv** (enum **rte\_flow\_conv\_op** op, void \*dst, size\_t size, const void \*src, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_get\_aged\_flows** (uint16\_t port\_id, void \*\*contexts, uint32\_t nb\_contexts, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_get\_q\_aged\_flows** (uint16\_t port\_id, uint32\_t queue\_id, void \*\*contexts, uint32\_t nb\_contexts, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental struct rte\_flow\_action\_handle \* **rte\_flow\_action\_handle\_create** (uint16\_t port\_id, const struct **rte\_flow\_indir\_action\_conf** \*conf, const struct **rte\_flow\_action** \*action, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_action\_handle\_destroy** (uint16\_t port\_id, struct rte\_flow\_action\_handle \*handle, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_action\_handle\_update** (uint16\_t port\_id, struct rte\_flow\_action\_handle \*handle, const void \*update, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_action\_handle\_query** (uint16\_t port\_id, const struct rte\_flow\_action\_handle \*handle, void \*data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_tunnel\_decap\_set** (uint16\_t port\_id, struct rte\_flow\_tunnel \*tunnel, struct **rte\_flow\_action** \*\*actions, uint32\_t \*num\_of\_actions, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_tunnel\_match** (uint16\_t port\_id, struct rte\_flow\_tunnel \*tunnel, struct **rte\_flow\_item** \*\*items, uint32\_t \*num\_of\_items, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental uint64\_t **rte\_flow\_restore\_info\_dynflag** (void)\
 \_\_rte\_experimental int **rte\_flow\_get\_restore\_info** (uint16\_t port\_id, struct **rte\_mbuf** \*m, struct **rte\_flow\_restore\_info** \*info, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_tunnel\_action\_decap\_release** (uint16\_t port\_id, struct **rte\_flow\_action** \*actions, uint32\_t num\_of\_actions, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_tunnel\_item\_release** (uint16\_t port\_id, struct **rte\_flow\_item** \*items, uint32\_t num\_of\_items, struct **rte\_flow\_error** \*error)\
 int **rte\_flow\_pick\_transfer\_proxy** (uint16\_t port\_id, uint16\_t \*proxy\_port\_id, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental struct rte\_flow\_item\_flex\_handle \* **rte\_flow\_flex\_item\_create** (uint16\_t port\_id, const struct **rte\_flow\_item\_flex\_conf** \*conf, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_flex\_item\_release** (uint16\_t port\_id, const struct rte\_flow\_item\_flex\_handle \*handle, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_info\_get** (uint16\_t port\_id, struct **rte\_flow\_port\_info** \*port\_info, struct **rte\_flow\_queue\_info** \*queue\_info, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_configure** (uint16\_t port\_id, const struct **rte\_flow\_port\_attr** \*port\_attr, uint16\_t nb\_queue, const struct **rte\_flow\_queue\_attr** \*queue\_attr\[\], struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental struct rte\_flow\_pattern\_template \* **rte\_flow\_pattern\_template\_create** (uint16\_t port\_id, const struct **rte\_flow\_pattern\_template\_attr** \*template\_attr, const struct **rte\_flow\_item** pattern\[\], struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_pattern\_template\_destroy** (uint16\_t port\_id, struct rte\_flow\_pattern\_template \*pattern\_template, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental struct rte\_flow\_actions\_template \* **rte\_flow\_actions\_template\_create** (uint16\_t port\_id, const struct **rte\_flow\_actions\_template\_attr** \*template\_attr, const struct **rte\_flow\_action** actions\[\], const struct **rte\_flow\_action** masks\[\], struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_actions\_template\_destroy** (uint16\_t port\_id, struct rte\_flow\_actions\_template \*actions\_template, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental bool **rte\_flow\_template\_table\_resizable** (**\_\_rte\_unused** uint16\_t port\_id, const struct **rte\_flow\_template\_table\_attr** \*tbl\_attr)\
 \_\_rte\_experimental struct rte\_flow\_template\_table \* **rte\_flow\_template\_table\_create** (uint16\_t port\_id, const struct **rte\_flow\_template\_table\_attr** \*table\_attr, struct rte\_flow\_pattern\_template \*pattern\_templates\[\], uint8\_t nb\_pattern\_templates, struct rte\_flow\_actions\_template \*actions\_templates\[\], uint8\_t nb\_actions\_templates, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_template\_table\_destroy** (uint16\_t port\_id, struct rte\_flow\_template\_table \*template\_table, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_group\_set\_miss\_actions** (uint16\_t port\_id, uint32\_t group\_id, const struct rte\_flow\_group\_attr \*attr, const struct **rte\_flow\_action** actions\[\], struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental struct rte\_flow \* **rte\_flow\_async\_create** (uint16\_t port\_id, uint32\_t queue\_id, const struct **rte\_flow\_op\_attr** \*op\_attr, struct rte\_flow\_template\_table \*template\_table, const struct **rte\_flow\_item** pattern\[\], uint8\_t pattern\_template\_index, const struct **rte\_flow\_action** actions\[\], uint8\_t actions\_template\_index, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental struct rte\_flow \* **rte\_flow\_async\_create\_by\_index** (uint16\_t port\_id, uint32\_t queue\_id, const struct **rte\_flow\_op\_attr** \*op\_attr, struct rte\_flow\_template\_table \*template\_table, uint32\_t rule\_index, const struct **rte\_flow\_action** actions\[\], uint8\_t actions\_template\_index, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental struct rte\_flow \* **rte\_flow\_async\_create\_by\_index\_with\_pattern** (uint16\_t port\_id, uint32\_t queue\_id, const struct **rte\_flow\_op\_attr** \*op\_attr, struct rte\_flow\_template\_table \*template\_table, uint32\_t rule\_index, const struct **rte\_flow\_item** pattern\[\], uint8\_t pattern\_template\_index, const struct **rte\_flow\_action** actions\[\], uint8\_t actions\_template\_index, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_async\_destroy** (uint16\_t port\_id, uint32\_t queue\_id, const struct **rte\_flow\_op\_attr** \*op\_attr, struct rte\_flow \*flow, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_async\_actions\_update** (uint16\_t port\_id, uint32\_t queue\_id, const struct **rte\_flow\_op\_attr** \*op\_attr, struct rte\_flow \*flow, const struct **rte\_flow\_action** actions\[\], uint8\_t actions\_template\_index, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_push** (uint16\_t port\_id, uint32\_t queue\_id, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_pull** (uint16\_t port\_id, uint32\_t queue\_id, struct **rte\_flow\_op\_result** res\[\], uint16\_t n\_res, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental struct rte\_flow\_action\_handle \* **rte\_flow\_async\_action\_handle\_create** (uint16\_t port\_id, uint32\_t queue\_id, const struct **rte\_flow\_op\_attr** \*op\_attr, const struct **rte\_flow\_indir\_action\_conf** \*indir\_action\_conf, const struct **rte\_flow\_action** \*action, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_async\_action\_handle\_destroy** (uint16\_t port\_id, uint32\_t queue\_id, const struct **rte\_flow\_op\_attr** \*op\_attr, struct rte\_flow\_action\_handle \*action\_handle, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_async\_action\_handle\_update** (uint16\_t port\_id, uint32\_t queue\_id, const struct **rte\_flow\_op\_attr** \*op\_attr, struct rte\_flow\_action\_handle \*action\_handle, const void \*update, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_async\_action\_handle\_query** (uint16\_t port\_id, uint32\_t queue\_id, const struct **rte\_flow\_op\_attr** \*op\_attr, const struct rte\_flow\_action\_handle \*action\_handle, void \*data, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_action\_handle\_query\_update** (uint16\_t port\_id, struct rte\_flow\_action\_handle \*handle, const void \*update, void \*query, enum **rte\_flow\_query\_update\_mode** mode, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_async\_action\_handle\_query\_update** (uint16\_t port\_id, uint32\_t queue\_id, const struct **rte\_flow\_op\_attr** \*attr, struct rte\_flow\_action\_handle \*handle, const void \*update, void \*query, enum **rte\_flow\_query\_update\_mode** mode, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental struct rte\_flow\_action\_list\_handle \* **rte\_flow\_action\_list\_handle\_create** (uint16\_t port\_id, const struct **rte\_flow\_indir\_action\_conf** \*conf, const struct **rte\_flow\_action** \*actions, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental struct rte\_flow\_action\_list\_handle \* **rte\_flow\_async\_action\_list\_handle\_create** (uint16\_t port\_id, uint32\_t queue\_id, const struct **rte\_flow\_op\_attr** \*attr, const struct **rte\_flow\_indir\_action\_conf** \*conf, const struct **rte\_flow\_action** \*actions, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_action\_list\_handle\_destroy** (uint16\_t port\_id, struct rte\_flow\_action\_list\_handle \*handle, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_async\_action\_list\_handle\_destroy** (uint16\_t port\_id, uint32\_t queue\_id, const struct **rte\_flow\_op\_attr** \*op\_attr, struct rte\_flow\_action\_list\_handle \*handle, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_action\_list\_handle\_query\_update** (uint16\_t port\_id, const struct rte\_flow\_action\_list\_handle \*handle, const void \*\*update, void \*\*query, enum **rte\_flow\_query\_update\_mode** mode, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_async\_action\_list\_handle\_query\_update** (uint16\_t port\_id, uint32\_t queue\_id, const struct **rte\_flow\_op\_attr** \*attr, const struct rte\_flow\_action\_list\_handle \*handle, const void \*\*update, void \*\*query, enum **rte\_flow\_query\_update\_mode** mode, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_calc\_table\_hash** (uint16\_t port\_id, const struct rte\_flow\_template\_table \*table, const struct **rte\_flow\_item** pattern\[\], uint8\_t pattern\_template\_index, uint32\_t \*hash, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_calc\_encap\_hash** (uint16\_t port\_id, const struct **rte\_flow\_item** pattern\[\], enum **rte\_flow\_encap\_hash\_field** dest\_field, uint8\_t hash\_len, uint8\_t \*hash, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_template\_table\_resize** (uint16\_t port\_id, struct rte\_flow\_template\_table \*table, uint32\_t nb\_rules, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_async\_update\_resized** (uint16\_t port\_id, uint32\_t queue, const struct **rte\_flow\_op\_attr** \*attr, struct rte\_flow \*rule, void \*user\_data, struct **rte\_flow\_error** \*error)\
 \_\_rte\_experimental int **rte\_flow\_template\_table\_resize\_complete** (uint16\_t port\_id, struct rte\_flow\_template\_table \*table, struct **rte\_flow\_error** \*error)\

### Variables

static const struct **rte\_flow\_item\_quota** **rte\_flow\_item\_quota\_mask**\
 static const struct **rte\_flow\_item\_higig2\_hdr** **rte\_flow\_item\_higig2\_hdr\_mask**\
 static const struct **rte\_flow\_item\_any** **rte\_flow\_item\_any\_mask**\
 static const struct **rte\_flow\_item\_port\_id** **rte\_flow\_item\_port\_id\_mask**\
 static const struct **rte\_flow\_item\_raw** **rte\_flow\_item\_raw\_mask**\
 static const struct **rte\_flow\_item\_eth** **rte\_flow\_item\_eth\_mask**\
 static const struct **rte\_flow\_item\_vlan** **rte\_flow\_item\_vlan\_mask**\
 static const struct **rte\_flow\_item\_ipv4** **rte\_flow\_item\_ipv4\_mask**\
 static const struct **rte\_flow\_item\_ipv6** **rte\_flow\_item\_ipv6\_mask**\
 static const struct **rte\_flow\_item\_icmp** **rte\_flow\_item\_icmp\_mask**\
 static const struct **rte\_flow\_item\_udp** **rte\_flow\_item\_udp\_mask**\
 static const struct **rte\_flow\_item\_tcp** **rte\_flow\_item\_tcp\_mask**\
 static const struct **rte\_flow\_item\_sctp** **rte\_flow\_item\_sctp\_mask**\
 static const struct **rte\_flow\_item\_vxlan** **rte\_flow\_item\_vxlan\_mask**\
 static const struct **rte\_flow\_item\_e\_tag** **rte\_flow\_item\_e\_tag\_mask**\
 static const struct **rte\_flow\_item\_nvgre** **rte\_flow\_item\_nvgre\_mask**\
 static const struct **rte\_flow\_item\_mpls** **rte\_flow\_item\_mpls\_mask**\
 static const struct **rte\_flow\_item\_gre** **rte\_flow\_item\_gre\_mask**\
 static const struct **rte\_flow\_item\_fuzzy** **rte\_flow\_item\_fuzzy\_mask**\
 static const struct **rte\_flow\_item\_gtp** **rte\_flow\_item\_gtp\_mask**\
 static const struct **rte\_flow\_item\_esp** **rte\_flow\_item\_esp\_mask**\
 static const struct **rte\_flow\_item\_geneve** **rte\_flow\_item\_geneve\_mask**\
 static const struct **rte\_flow\_item\_vxlan\_gpe** **rte\_flow\_item\_vxlan\_gpe\_mask**\
 static const struct **rte\_flow\_item\_arp\_eth\_ipv4** **rte\_flow\_item\_arp\_eth\_ipv4\_mask**\
 static const struct **rte\_flow\_item\_ipv6\_ext** **rte\_flow\_item\_ipv6\_ext\_mask**\
 static const struct **rte\_flow\_item\_icmp6** **rte\_flow\_item\_icmp6\_mask**\
 static const struct **rte\_flow\_item\_icmp6\_nd\_ns** **rte\_flow\_item\_icmp6\_nd\_ns\_mask**\
 static const struct **rte\_flow\_item\_icmp6\_nd\_na** **rte\_flow\_item\_icmp6\_nd\_na\_mask**\
 static const struct **rte\_flow\_item\_icmp6\_nd\_opt** **rte\_flow\_item\_icmp6\_nd\_opt\_mask**\
 static const struct **rte\_flow\_item\_icmp6\_nd\_opt\_sla\_eth** **rte\_flow\_item\_icmp6\_nd\_opt\_sla\_eth\_mask**\
 static const struct **rte\_flow\_item\_icmp6\_nd\_opt\_tla\_eth** **rte\_flow\_item\_icmp6\_nd\_opt\_tla\_eth\_mask**\
 static const struct **rte\_flow\_item\_meta** **rte\_flow\_item\_meta\_mask**\
 static const struct **rte\_flow\_item\_gtp\_psc** **rte\_flow\_item\_gtp\_psc\_mask**\
 static const struct **rte\_flow\_item\_pppoe\_proto\_id** **rte\_flow\_item\_pppoe\_proto\_id\_mask**\
 static const struct **rte\_flow\_item\_tag** **rte\_flow\_item\_tag\_mask**\
 static const struct **rte\_flow\_item\_l2tpv3oip** **rte\_flow\_item\_l2tpv3oip\_mask**\
 static const struct **rte\_flow\_item\_mark** **rte\_flow\_item\_mark\_mask**\
 static const struct **rte\_flow\_item\_nsh** **rte\_flow\_item\_nsh\_mask**\
 static const struct **rte\_flow\_item\_igmp** **rte\_flow\_item\_igmp\_mask**\
 static const struct **rte\_flow\_item\_ah** **rte\_flow\_item\_ah\_mask**\
 static const struct **rte\_flow\_item\_pfcp** **rte\_flow\_item\_pfcp\_mask**\
 static const struct **rte\_flow\_item\_ecpri** **rte\_flow\_item\_ecpri\_mask**\
 static const struct **rte\_flow\_item\_geneve\_opt** **rte\_flow\_item\_geneve\_opt\_mask**\
 static const struct **rte\_flow\_item\_conntrack** **rte\_flow\_item\_conntrack\_mask**\
 static const struct **rte\_flow\_item\_ethdev** **rte\_flow\_item\_ethdev\_mask**\
 static const struct **rte\_flow\_item\_l2tpv2** **rte\_flow\_item\_l2tpv2\_mask**\
 static const struct **rte\_flow\_item\_ppp** **rte\_flow\_item\_ppp\_mask**\
 static const struct **rte\_flow\_item\_ib\_bth** **rte\_flow\_item\_ib\_bth\_mask**\
 static const struct **rte\_flow\_item\_random** **rte\_flow\_item\_random\_mask**\
 static const struct **rte\_flow\_item\_meter\_color** **rte\_flow\_item\_meter\_color\_mask**\
 static const struct **rte\_flow\_item\_aggr\_affinity** **rte\_flow\_item\_aggr\_affinity\_mask**\
 static const struct **rte\_flow\_item\_tx\_queue** **rte\_flow\_item\_tx\_queue\_mask**\
 static const struct **rte\_flow\_item\_ptype** **rte\_flow\_item\_ptype\_mask**\

## Detailed Description

RTE generic flow API

This interface provides the ability to program packet matching and associated actions in hardware through flow rules.

Definition in file **rte\_flow.h**.

## Macro Definition Documentation

### #define RTE\_FLOW\_CONNTRACK\_PKT\_STATE\_VALID RTE\_BIT32(0)

The packet is valid after conntrack checking.

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

### #define RTE\_FLOW\_CONNTRACK\_PKT\_STATE\_CHANGED RTE\_BIT32(1)

The state of the connection is changed.

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

### #define RTE\_FLOW\_CONNTRACK\_PKT\_STATE\_INVALID RTE\_BIT32(2)

Error is detected on this packet for this connection and an invalid state is set.

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

### #define RTE\_FLOW\_CONNTRACK\_PKT\_STATE\_DISABLED RTE\_BIT32(3)

The HW connection tracking module is disabled. It can be due to application command or an invalid state.

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

### #define RTE\_FLOW\_CONNTRACK\_PKT\_STATE\_BAD RTE\_BIT32(4)

The packet contains some bad field(s) and cannot continue with the conntrack module checking.

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

### #define RTE\_FLOW\_RESTORE\_INFO\_TUNNEL RTE\_BIT64(0)

Indicate that the packet has a tunnel.

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

### #define RTE\_FLOW\_RESTORE\_INFO\_ENCAPSULATED RTE\_BIT64(1)

Indicate that the packet has a non decapsulated tunnel header.

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

### #define RTE\_FLOW\_RESTORE\_INFO\_GROUP\_ID RTE\_BIT64(2)

Indicate that the packet has a group\_id.

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

### #define RTE\_FLOW\_PORT\_FLAG\_STRICT\_QUEUE RTE\_BIT32(0)

Indicate all operations for a given flow rule will *strictly* happen on the same queue (create/destroy/query/update).

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

### #define RTE\_FLOW\_PORT\_FLAG\_SHARE\_INDIRECT RTE\_BIT32(1)

Indicate all steering objects should be created on contexts of the host port, providing indirect object sharing between ports.

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

### #define RTE\_FLOW\_TABLE\_SPECIALIZE\_TRANSFER\_WIRE\_ORIG RTE\_BIT32(0)

Specialize table for transfer flows which come only from wire. It allows PMD not to allocate resources for non-wire originated traffic. This bit is not a matching criteria, just an optimization hint. Flow rules which match non-wire originated traffic will be missed if the hint is supported.

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

### #define RTE\_FLOW\_TABLE\_SPECIALIZE\_TRANSFER\_VPORT\_ORIG RTE\_BIT32(1)

Specialize table for transfer flows which come only from vport (e.g. VF, SF). It allows PMD not to allocate resources for non-vport originated traffic. This bit is not a matching criteria, just an optimization hint. Flow rules which match non-vport originated traffic will be missed if the hint is supported.

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

### #define RTE\_FLOW\_TABLE\_SPECIALIZE\_RESIZABLE RTE\_BIT32(2)

Specialize table for resize.

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

## Enumeration Type Documentation

### enum rte\_flow\_item\_type

Matching pattern item types.

Pattern items fall in two categories:

- •

  Matching protocol headers and packet data, usually associated with a specification structure. These must be stacked in the same order as the protocol layers to match inside packets, starting from the lowest.

- •

  Matching meta-data or affecting pattern processing, often without a specification structure. Since they do not match packet contents, their position in the list is usually not relevant.

See the description of individual types for more information. Those marked with \[META\] fall into the second category.

**Enumerator**

- *RTE\_FLOW\_ITEM\_TYPE\_END*

  *\[META\]*

*End marker for item lists. Prevents further processing of items, thereby ending the pattern.*

*No associated specification structure.*

- *RTE\_FLOW\_ITEM\_TYPE\_VOID*

  *\[META\]*

*Used as a placeholder for convenience. It is ignored and simply discarded by PMDs.*

*No associated specification structure.*

- *RTE\_FLOW\_ITEM\_TYPE\_INVERT*

  *\[META\]*

*Inverted matching, i.e. process packets that do not match the pattern.*

*No associated specification structure.*

- *RTE\_FLOW\_ITEM\_TYPE\_ANY*

  *Matches any protocol in place of the current layer, a single ANY may also stand for several protocol layers.*

*See struct* **rte\_flow\_item\_any***.*

- *RTE\_FLOW\_ITEM\_TYPE\_PORT\_ID*

  **Deprecated**

**See also**

**RTE\_FLOW\_ITEM\_TYPE\_PORT\_REPRESENTOR**

**RTE\_FLOW\_ITEM\_TYPE\_REPRESENTED\_PORT**

*\[META\]*

*Matches traffic originating from (ingress) or going to (egress) a given DPDK port ID.*

*See struct* **rte\_flow\_item\_port\_id***.*

- *RTE\_FLOW\_ITEM\_TYPE\_RAW*

  *Matches a byte string of a given length at a given offset.*

*See struct* **rte\_flow\_item\_raw***.*

- *RTE\_FLOW\_ITEM\_TYPE\_ETH*

  *Matches an Ethernet header.*

*See struct* **rte\_flow\_item\_eth***.*

- *RTE\_FLOW\_ITEM\_TYPE\_VLAN*

  *Matches an 802.1Q/ad VLAN tag.*

*See struct* **rte\_flow\_item\_vlan***.*

- *RTE\_FLOW\_ITEM\_TYPE\_IPV4*

  *Matches an IPv4 header.*

*See struct* **rte\_flow\_item\_ipv4***.*

- *RTE\_FLOW\_ITEM\_TYPE\_IPV6*

  *Matches an IPv6 header.*

*See struct* **rte\_flow\_item\_ipv6***.*

- *RTE\_FLOW\_ITEM\_TYPE\_ICMP*

  *Matches an ICMP header.*

*See struct* **rte\_flow\_item\_icmp***.*

- *RTE\_FLOW\_ITEM\_TYPE\_UDP*

  *Matches a UDP header.*

*See struct* **rte\_flow\_item\_udp***.*

- *RTE\_FLOW\_ITEM\_TYPE\_TCP*

  *Matches a TCP header.*

*See struct* **rte\_flow\_item\_tcp***.*

- *RTE\_FLOW\_ITEM\_TYPE\_SCTP*

  *Matches a SCTP header.*

*See struct* **rte\_flow\_item\_sctp***.*

- *RTE\_FLOW\_ITEM\_TYPE\_VXLAN*

  *Matches a VXLAN header.*

*See struct* **rte\_flow\_item\_vxlan***.*

- *RTE\_FLOW\_ITEM\_TYPE\_E\_TAG*

  *Matches a E\_TAG header.*

*See struct* **rte\_flow\_item\_e\_tag***.*

- *RTE\_FLOW\_ITEM\_TYPE\_NVGRE*

  *Matches a NVGRE header.*

*See struct* **rte\_flow\_item\_nvgre***.*

- *RTE\_FLOW\_ITEM\_TYPE\_MPLS*

  *Matches a MPLS header.*

*See struct* **rte\_flow\_item\_mpls***.*

- *RTE\_FLOW\_ITEM\_TYPE\_GRE*

  *Matches a GRE header.*

*See struct* **rte\_flow\_item\_gre***.*

- *RTE\_FLOW\_ITEM\_TYPE\_FUZZY*

  *\[META\]*

*Fuzzy pattern match, expect faster than default.*

*This is for device that support fuzzy matching option. Usually a fuzzy matching is fast but the cost is accuracy.*

*See struct* **rte\_flow\_item\_fuzzy***.*

- *RTE\_FLOW\_ITEM\_TYPE\_GTP*

  *Matches a GTP header.*

*Configure flow for GTP packets.*

*See struct* **rte\_flow\_item\_gtp***.*

- *RTE\_FLOW\_ITEM\_TYPE\_GTPC*

  *Matches a GTP header.*

*Configure flow for GTP-C packets.*

*See struct* **rte\_flow\_item\_gtp***.*

- *RTE\_FLOW\_ITEM\_TYPE\_GTPU*

  *Matches a GTP header.*

*Configure flow for GTP-U packets.*

*See struct* **rte\_flow\_item\_gtp***.*

- *RTE\_FLOW\_ITEM\_TYPE\_ESP*

  *Matches a ESP header.*

*See struct* **rte\_flow\_item\_esp***.*

- *RTE\_FLOW\_ITEM\_TYPE\_GENEVE*

  *Matches a GENEVE header.*

*See struct* **rte\_flow\_item\_geneve***.*

- *RTE\_FLOW\_ITEM\_TYPE\_VXLAN\_GPE*

  **Deprecated**

**See also**

**RTE\_FLOW\_ITEM\_TYPE\_VXLAN**

*Matches a VXLAN-GPE header.*

*See struct* **rte\_flow\_item\_vxlan\_gpe***.*

- *RTE\_FLOW\_ITEM\_TYPE\_ARP\_ETH\_IPV4*

  *Matches an ARP header for Ethernet/IPv4.*

*See struct* **rte\_flow\_item\_arp\_eth\_ipv4***.*

- *RTE\_FLOW\_ITEM\_TYPE\_IPV6\_EXT*

  *Matches the presence of any IPv6 extension header.*

*See struct* **rte\_flow\_item\_ipv6\_ext***.*

- *RTE\_FLOW\_ITEM\_TYPE\_ICMP6*

  *Matches any ICMPv6 header.*

*See struct* **rte\_flow\_item\_icmp6***.*

- *RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_NS*

  *Matches an ICMPv6 neighbor discovery solicitation.*

*See struct* **rte\_flow\_item\_icmp6\_nd\_ns***.*

- *RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_NA*

  *Matches an ICMPv6 neighbor discovery advertisement.*

*See struct* **rte\_flow\_item\_icmp6\_nd\_na***.*

- *RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_OPT*

  *Matches the presence of any ICMPv6 neighbor discovery option.*

*See struct* **rte\_flow\_item\_icmp6\_nd\_opt***.*

- *RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_OPT\_SLA\_ETH*

  *Matches an ICMPv6 neighbor discovery source Ethernet link-layer address option.*

*See struct* **rte\_flow\_item\_icmp6\_nd\_opt\_sla\_eth***.*

- *RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_OPT\_TLA\_ETH*

  *Matches an ICMPv6 neighbor discovery target Ethernet link-layer address option.*

*See struct* **rte\_flow\_item\_icmp6\_nd\_opt\_tla\_eth***.*

- *RTE\_FLOW\_ITEM\_TYPE\_MARK*

  *Matches specified mark field.*

*See struct* **rte\_flow\_item\_mark***.*

- *RTE\_FLOW\_ITEM\_TYPE\_META*

  *\[META\]*

*Matches a metadata value.*

*See struct* **rte\_flow\_item\_meta***.*

- *RTE\_FLOW\_ITEM\_TYPE\_GRE\_KEY*

  *Matches a GRE optional key field.*

*The value should a big-endian 32bit integer.*

*When this item present the K bit is implicitly matched as '1' in the default mask.*

`spec/mask` *type:*

```
rte_be32_t *
```

- *RTE\_FLOW\_ITEM\_TYPE\_GTP\_PSC*

  *Matches a GTP extension header: PDU session container.*

*Configure flow for GTP packets with extension header type 0x85.*

*See struct* **rte\_flow\_item\_gtp\_psc***.*

- *RTE\_FLOW\_ITEM\_TYPE\_PPPOES*

  *Matches a PPPoE header.*

*Configure flow for PPPoE session packets.*

*See struct* **rte\_flow\_item\_pppoe***.*

- *RTE\_FLOW\_ITEM\_TYPE\_PPPOED*

  *Matches a PPPoE header.*

*Configure flow for PPPoE discovery packets.*

*See struct* **rte\_flow\_item\_pppoe***.*

- *RTE\_FLOW\_ITEM\_TYPE\_PPPOE\_PROTO\_ID*

  *Matches a PPPoE optional proto\_id field.*

*It only applies to PPPoE session packets.*

*See struct* **rte\_flow\_item\_pppoe\_proto\_id***.*

- *RTE\_FLOW\_ITEM\_TYPE\_NSH*

  *Matches Network service header (NSH). See struct* **rte\_flow\_item\_nsh***.*

- *RTE\_FLOW\_ITEM\_TYPE\_IGMP*

  *Matches Internet Group Management Protocol (IGMP). See struct* **rte\_flow\_item\_igmp***.*

- *RTE\_FLOW\_ITEM\_TYPE\_AH*

  *Matches IP Authentication Header (AH). See struct* **rte\_flow\_item\_ah***.*

- *RTE\_FLOW\_ITEM\_TYPE\_HIGIG2*

  *Matches a HIGIG header. see struct* **rte\_flow\_item\_higig2\_hdr***.*

- *RTE\_FLOW\_ITEM\_TYPE\_TAG*

  *\[META\]*

*Matches a tag value.*

*See struct* **rte\_flow\_item\_tag***.*

- *RTE\_FLOW\_ITEM\_TYPE\_L2TPV3OIP*

  *Matches a L2TPv3 over IP header.*

*Configure flow for L2TPv3 over IP packets.*

*See struct* **rte\_flow\_item\_l2tpv3oip***.*

- *RTE\_FLOW\_ITEM\_TYPE\_PFCP*

  *Matches PFCP Header. See struct* **rte\_flow\_item\_pfcp***.*

- *RTE\_FLOW\_ITEM\_TYPE\_ECPRI*

  *Matches eCPRI Header.*

*Configure flow for eCPRI over ETH or UDP packets.*

*See struct* **rte\_flow\_item\_ecpri***.*

- *RTE\_FLOW\_ITEM\_TYPE\_IPV6\_FRAG\_EXT*

  *Matches the presence of IPv6 fragment extension header.*

*See struct* **rte\_flow\_item\_ipv6\_frag\_ext***.*

- *RTE\_FLOW\_ITEM\_TYPE\_GENEVE\_OPT*

  *Matches Geneve Variable Length Option*

*See struct* **rte\_flow\_item\_geneve\_opt**

- *RTE\_FLOW\_ITEM\_TYPE\_INTEGRITY*

  *\[META\]*

*Matches on packet integrity. For some devices application needs to enable integration checks in HW before using this item.*

**See also**

*struct* **rte\_flow\_item\_integrity***.*

- *RTE\_FLOW\_ITEM\_TYPE\_CONNTRACK*

  *\[META\]*

*Matches conntrack state.*

**See also**

*struct* **rte\_flow\_item\_conntrack***.*

- *RTE\_FLOW\_ITEM\_TYPE\_PORT\_REPRESENTOR*

  *\[META\]*

*Matches traffic entering the embedded switch from the given ethdev.*

**See also**

*struct* **rte\_flow\_item\_ethdev**

- *RTE\_FLOW\_ITEM\_TYPE\_REPRESENTED\_PORT*

  *\[META\]*

*Matches traffic entering the embedded switch from the entity represented by the given ethdev.*

**See also**

*struct* **rte\_flow\_item\_ethdev**

- *RTE\_FLOW\_ITEM\_TYPE\_FLEX*

  *Matches a configured set of fields at runtime calculated offsets over the generic network header with variable length and flexible pattern*

**See also**

*struct* **rte\_flow\_item\_flex***.*

- *RTE\_FLOW\_ITEM\_TYPE\_L2TPV2*

  *Matches L2TPv2 Header.*

*See struct* **rte\_flow\_item\_l2tpv2***.*

- *RTE\_FLOW\_ITEM\_TYPE\_PPP*

  *Matches PPP Header.*

*See struct* **rte\_flow\_item\_ppp***.*

- *RTE\_FLOW\_ITEM\_TYPE\_GRE\_OPTION*

  *Matches GRE optional fields.*

*See struct* **rte\_flow\_item\_gre\_opt***.*

- *RTE\_FLOW\_ITEM\_TYPE\_MACSEC*

  *Matches MACsec Ethernet Header.*

*See struct* **rte\_flow\_item\_macsec***.*

- *RTE\_FLOW\_ITEM\_TYPE\_METER\_COLOR*

  *Matches Meter Color Marker.*

*See struct* **rte\_flow\_item\_meter\_color***.*

- *RTE\_FLOW\_ITEM\_TYPE\_IPV6\_ROUTING\_EXT*

  *Matches the presence of IPv6 routing extension header.*

**See also**

*struct* **rte\_flow\_item\_ipv6\_routing\_ext***.*

- *RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ECHO\_REQUEST*

  *Matches an ICMPv6 echo request.*

**See also**

*struct* **rte\_flow\_item\_icmp6\_echo***.*

- *RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ECHO\_REPLY*

  *Matches an ICMPv6 echo reply.*

**See also**

*struct* **rte\_flow\_item\_icmp6\_echo***.*

- *RTE\_FLOW\_ITEM\_TYPE\_QUOTA*

  *Match Quota state*

**See also**

*struct* **rte\_flow\_item\_quota**

- *RTE\_FLOW\_ITEM\_TYPE\_AGGR\_AFFINITY*

  *Matches on the aggregated port of the received packet. Used in case multiple ports are aggregated to the a DPDK port. First port is number 1.*

**See also**

*struct* **rte\_flow\_item\_aggr\_affinity***.*

- *RTE\_FLOW\_ITEM\_TYPE\_TX\_QUEUE*

  *Match Tx queue number. This is valid only for egress rules.*

**See also**

*struct* **rte\_flow\_item\_tx\_queue**

- *RTE\_FLOW\_ITEM\_TYPE\_IB\_BTH*

  *Matches an InfiniBand base transport header in RoCE packet.*

**See also**

*struct* **rte\_flow\_item\_ib\_bth***.*

- *RTE\_FLOW\_ITEM\_TYPE\_PTYPE*

  *Matches the packet type as defined in rte\_mbuf\_ptype.*

*See struct* **rte\_flow\_item\_ptype***.*

- *RTE\_FLOW\_ITEM\_TYPE\_RANDOM*

  *\[META\]*

*Matches a random value.*

*This value is not based on the packet data/headers. The application shouldn't assume that this value is kept during the lifetime of the packet.*

**See also**

*struct* **rte\_flow\_item\_random***.*

- *RTE\_FLOW\_ITEM\_TYPE\_COMPARE*

  *Match packet with various comparison types.*

*See struct* **rte\_flow\_item\_compare***.*

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

### enum rte\_flow\_quota\_state

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*QUOTA state.*

**See also**

*struct* **rte\_flow\_item\_quota**

**Enumerator**

- *RTE\_FLOW\_QUOTA\_STATE\_PASS*

  *PASS quota state*

- *RTE\_FLOW\_QUOTA\_STATE\_BLOCK*

  *BLOCK quota state*

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

### enum rte\_flow\_item\_flex\_field\_mode

*Field bit offset calculation mode.*

**Enumerator**

- *FIELD\_MODE\_DUMMY*

  *Dummy field, used for byte boundary alignment in pattern. Pattern mask and data are ignored in the match. All configuration parameters besides field size are ignored.*

- *FIELD\_MODE\_FIXED*

  *Fixed offset field. The bit offset from header beginning is permanent and defined by field\_base parameter.*

- *FIELD\_MODE\_OFFSET*

  *The field bit offset is extracted from other header field (indirect offset field). The resulting field offset to match is calculated as:*

*field\_base + (\*offset\_base & offset\_mask) \<\< offset\_shift*

- *FIELD\_MODE\_BITMASK*

  *The field bit offset is extracted from other header field (indirect offset field), the latter is considered as bitmask containing some number of one bits, the resulting field offset to match is calculated as:*

*field\_base + bitcount(\*offset\_base & offset\_mask) \<\< offset\_shift*

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

### enum rte\_flow\_item\_flex\_tunnel\_mode

*Flex item field tunnel mode*

**Enumerator**

- *FLEX\_TUNNEL\_MODE\_SINGLE*

  *The protocol header can be present in the packet only once. No multiple flex item flow inclusions (for inner/outer) are allowed. No any relations with tunnel protocols are imposed. The drivers can optimize hardware resource usage to handle match on single flex item of specific type.*

- *FLEX\_TUNNEL\_MODE\_OUTER*

  *Flex item presents outer header only.*

- *FLEX\_TUNNEL\_MODE\_INNER*

  *Flex item presents inner header only.*

- *FLEX\_TUNNEL\_MODE\_MULTI*

  *Flex item presents either inner or outer header. The driver handles as many multiple inners as hardware supports.*

- *FLEX\_TUNNEL\_MODE\_TUNNEL*

  *Flex item presents tunnel protocol header.*

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

### enum rte\_flow\_field\_id

*Packet header field IDs, used by RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD and RTE\_FLOW\_ITEM\_TYPE\_COMPARE.*

**Enumerator**

- *RTE\_FLOW\_FIELD\_START*

  *Start of a packet.*

- *RTE\_FLOW\_FIELD\_MAC\_DST*

  *Destination MAC Address.*

- *RTE\_FLOW\_FIELD\_MAC\_SRC*

  *Source MAC Address.*

- *RTE\_FLOW\_FIELD\_VLAN\_TYPE*

  *VLAN Tag Identifier.*

- *RTE\_FLOW\_FIELD\_VLAN\_ID*

  *VLAN Identifier.*

- *RTE\_FLOW\_FIELD\_MAC\_TYPE*

  *EtherType.*

- *RTE\_FLOW\_FIELD\_IPV4\_DSCP*

  *IPv4 DSCP.*

- *RTE\_FLOW\_FIELD\_IPV4\_TTL*

  *IPv4 Time To Live.*

- *RTE\_FLOW\_FIELD\_IPV4\_SRC*

  *IPv4 Source Address.*

- *RTE\_FLOW\_FIELD\_IPV4\_DST*

  *IPv4 Destination Address.*

- *RTE\_FLOW\_FIELD\_IPV6\_DSCP*

  *IPv6 DSCP.*

- *RTE\_FLOW\_FIELD\_IPV6\_HOPLIMIT*

  *IPv6 Hop Limit.*

- *RTE\_FLOW\_FIELD\_IPV6\_SRC*

  *IPv6 Source Address.*

- *RTE\_FLOW\_FIELD\_IPV6\_DST*

  *IPv6 Destination Address.*

- *RTE\_FLOW\_FIELD\_TCP\_PORT\_SRC*

  *TCP Source Port Number.*

- *RTE\_FLOW\_FIELD\_TCP\_PORT\_DST*

  *TCP Destination Port Number.*

- *RTE\_FLOW\_FIELD\_TCP\_SEQ\_NUM*

  *TCP Sequence Number.*

- *RTE\_FLOW\_FIELD\_TCP\_ACK\_NUM*

  *TCP Acknowledgment Number.*

- *RTE\_FLOW\_FIELD\_TCP\_FLAGS*

  *TCP Flags.*

- *RTE\_FLOW\_FIELD\_UDP\_PORT\_SRC*

  *UDP Source Port Number.*

- *RTE\_FLOW\_FIELD\_UDP\_PORT\_DST*

  *UDP Destination Port Number.*

- *RTE\_FLOW\_FIELD\_VXLAN\_VNI*

  *VXLAN Network Identifier.*

- *RTE\_FLOW\_FIELD\_GENEVE\_VNI*

  *GENEVE Network Identifier.*

- *RTE\_FLOW\_FIELD\_GTP\_TEID*

  *GTP Tunnel Endpoint Identifier.*

- *RTE\_FLOW\_FIELD\_TAG*

  *Tag value.*

- *RTE\_FLOW\_FIELD\_MARK*

  *Mark value.*

- *RTE\_FLOW\_FIELD\_META*

  *Metadata value.*

- *RTE\_FLOW\_FIELD\_POINTER*

  *Memory pointer.*

- *RTE\_FLOW\_FIELD\_VALUE*

  *Immediate value.*

- *RTE\_FLOW\_FIELD\_IPV4\_ECN*

  *IPv4 ECN.*

- *RTE\_FLOW\_FIELD\_IPV6\_ECN*

  *IPv6 ECN.*

- *RTE\_FLOW\_FIELD\_GTP\_PSC\_QFI*

  *GTP QFI.*

- *RTE\_FLOW\_FIELD\_METER\_COLOR*

  *Meter color marker.*

- *RTE\_FLOW\_FIELD\_IPV6\_PROTO*

  *IPv6 next header.*

- *RTE\_FLOW\_FIELD\_FLEX\_ITEM*

  *Flex item.*

- *RTE\_FLOW\_FIELD\_HASH\_RESULT*

  *Hash result.*

- *RTE\_FLOW\_FIELD\_GENEVE\_OPT\_TYPE*

  *GENEVE option type.*

- *RTE\_FLOW\_FIELD\_GENEVE\_OPT\_CLASS*

  *GENEVE option class.*

- *RTE\_FLOW\_FIELD\_GENEVE\_OPT\_DATA*

  *GENEVE option data.*

- *RTE\_FLOW\_FIELD\_MPLS*

  *MPLS header.*

- *RTE\_FLOW\_FIELD\_TCP\_DATA\_OFFSET*

  *TCP data offset.*

- *RTE\_FLOW\_FIELD\_IPV4\_IHL*

  *IPv4 IHL.*

- *RTE\_FLOW\_FIELD\_IPV4\_TOTAL\_LEN*

  *IPv4 total length.*

- *RTE\_FLOW\_FIELD\_IPV6\_PAYLOAD\_LEN*

  *IPv6 payload length.*

- *RTE\_FLOW\_FIELD\_IPV4\_PROTO*

  *IPv4 next protocol.*

- *RTE\_FLOW\_FIELD\_IPV6\_FLOW\_LABEL*

  *IPv6 flow label.*

- *RTE\_FLOW\_FIELD\_IPV6\_TRAFFIC\_CLASS*

  *IPv6 traffic class.*

- *RTE\_FLOW\_FIELD\_ESP\_SPI*

  *ESP SPI.*

- *RTE\_FLOW\_FIELD\_ESP\_SEQ\_NUM*

  *ESP Sequence Number.*

- *RTE\_FLOW\_FIELD\_ESP\_PROTO*

  *ESP next protocol value.*

- *RTE\_FLOW\_FIELD\_RANDOM*

  *Random value.*

- *RTE\_FLOW\_FIELD\_VXLAN\_LAST\_RSVD*

  *VXLAN last reserved byte.*

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

### enum rte\_flow\_item\_compare\_op

*Expected operation types for compare item.*

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

### enum rte\_flow\_action\_type

*Action types.*

*Each possible action is represented by a type. An action can have an associated configuration object. Several actions combined in a list can be assigned to a flow rule and are performed in order.*

*They fall in three categories:*

- •

  *Actions that modify the fate of matching traffic, for instance by dropping or assigning it a specific destination.*

- •

  *Actions that modify matching traffic contents or its properties. This includes adding/removing encapsulation, encryption, compression and marks.*

- •

  *Actions related to the flow rule itself, such as updating counters or making it non-terminating.*

*Flow rules being terminating by default, not specifying any action of the fate kind results in undefined behavior. This applies to both ingress and egress.*

*PASSTHRU, when supported, makes a flow rule non-terminating.*

**Enumerator**

- *RTE\_FLOW\_ACTION\_TYPE\_END*

  *End marker for action lists. Prevents further processing of actions, thereby ending the list.*

*No associated configuration structure.*

- *RTE\_FLOW\_ACTION\_TYPE\_VOID*

  *Used as a placeholder for convenience. It is ignored and simply discarded by PMDs.*

*No associated configuration structure.*

- *RTE\_FLOW\_ACTION\_TYPE\_PASSTHRU*

  *Leaves traffic up for additional processing by subsequent flow rules; makes a flow rule non-terminating.*

*No associated configuration structure.*

- *RTE\_FLOW\_ACTION\_TYPE\_JUMP*

  *RTE\_FLOW\_ACTION\_TYPE\_JUMP*

*Redirects packets to a group on the current device.*

*See struct* **rte\_flow\_action\_jump***.*

- *RTE\_FLOW\_ACTION\_TYPE\_MARK*

  *Attaches an integer value to packets and sets RTE\_MBUF\_F\_RX\_FDIR and RTE\_MBUF\_F\_RX\_FDIR\_ID mbuf flags.*

*See struct* **rte\_flow\_action\_mark***.*

*One should negotiate mark delivery from the NIC to the PMD.*

**See also**

**rte\_eth\_rx\_metadata\_negotiate()**

**RTE\_ETH\_RX\_METADATA\_USER\_MARK**

- *RTE\_FLOW\_ACTION\_TYPE\_FLAG*

  *Flags packets. Similar to MARK without a specific value; only sets the RTE\_MBUF\_F\_RX\_FDIR mbuf flag.*

*No associated configuration structure.*

*One should negotiate flag delivery from the NIC to the PMD.*

**See also**

**rte\_eth\_rx\_metadata\_negotiate()**

**RTE\_ETH\_RX\_METADATA\_USER\_FLAG**

- *RTE\_FLOW\_ACTION\_TYPE\_QUEUE*

  *Assigns packets to a given queue index.*

*See struct* **rte\_flow\_action\_queue***.*

- *RTE\_FLOW\_ACTION\_TYPE\_DROP*

  *Drops packets.*

*PASSTHRU overrides this action if both are specified.*

*No associated configuration structure.*

- *RTE\_FLOW\_ACTION\_TYPE\_COUNT*

  *Enables counters for this flow rule.*

*These counters can be retrieved and reset through* **rte\_flow\_query()** *or* **rte\_flow\_action\_handle\_query()** *if the action provided via handle, see struct* **rte\_flow\_query\_count***.*

*See struct* **rte\_flow\_action\_count***.*

- *RTE\_FLOW\_ACTION\_TYPE\_RSS*

  *Similar to QUEUE, except RSS is additionally performed on packets to spread them among several queues according to the provided parameters.*

*See struct* **rte\_flow\_action\_rss***.*

- *RTE\_FLOW\_ACTION\_TYPE\_PF*

  **Deprecated**

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_PORT\_REPRESENTOR**

**RTE\_FLOW\_ACTION\_TYPE\_REPRESENTED\_PORT**

*Directs matching traffic to the physical function (PF) of the current device.*

*No associated configuration structure.*

- *RTE\_FLOW\_ACTION\_TYPE\_VF*

  **Deprecated**

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_PORT\_REPRESENTOR**

**RTE\_FLOW\_ACTION\_TYPE\_REPRESENTED\_PORT**

*Directs matching traffic to a given virtual function of the current device.*

*See struct* **rte\_flow\_action\_vf***.*

- *RTE\_FLOW\_ACTION\_TYPE\_PORT\_ID*

  **Deprecated**

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_PORT\_REPRESENTOR**

**RTE\_FLOW\_ACTION\_TYPE\_REPRESENTED\_PORT**

*Directs matching traffic to a given DPDK port ID.*

*See struct* **rte\_flow\_action\_port\_id***.*

- *RTE\_FLOW\_ACTION\_TYPE\_METER*

  *Traffic metering and policing (MTR).*

*See struct* **rte\_flow\_action\_meter***. See file* **rte\_mtr.h** *for MTR object configuration.*

- *RTE\_FLOW\_ACTION\_TYPE\_SECURITY*

  *Redirects packets to security engine of current device for security processing as specified by security session.*

*See struct* **rte\_flow\_action\_security***.*

- *RTE\_FLOW\_ACTION\_TYPE\_OF\_DEC\_NW\_TTL*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Implements OFPAT\_DEC\_NW\_TTL ('decrement IP TTL') as defined by the OpenFlow Switch Specification.*

*No associated configuration structure.*

- *RTE\_FLOW\_ACTION\_TYPE\_OF\_POP\_VLAN*

  *Implements OFPAT\_POP\_VLAN ('pop the outer VLAN tag') as defined by the OpenFlow Switch Specification.*

*No associated configuration structure.*

- *RTE\_FLOW\_ACTION\_TYPE\_OF\_PUSH\_VLAN*

  *Implements OFPAT\_PUSH\_VLAN ('push a new VLAN tag') as defined by the OpenFlow Switch Specification.*

*See struct* **rte\_flow\_action\_of\_push\_vlan***.*

- *RTE\_FLOW\_ACTION\_TYPE\_OF\_SET\_VLAN\_VID*

  *Implements OFPAT\_SET\_VLAN\_VID ('set the 802.1q VLAN ID') as defined by the OpenFlow Switch Specification.*

*See struct* **rte\_flow\_action\_of\_set\_vlan\_vid***.*

- *RTE\_FLOW\_ACTION\_TYPE\_OF\_SET\_VLAN\_PCP*

  *Implements OFPAT\_SET\_LAN\_PCP ('set the 802.1q priority') as defined by the OpenFlow Switch Specification.*

*See struct* **rte\_flow\_action\_of\_set\_vlan\_pcp***.*

- *RTE\_FLOW\_ACTION\_TYPE\_OF\_POP\_MPLS*

  *Implements OFPAT\_POP\_MPLS ('pop the outer MPLS tag') as defined by the OpenFlow Switch Specification.*

*See struct* **rte\_flow\_action\_of\_pop\_mpls***.*

- *RTE\_FLOW\_ACTION\_TYPE\_OF\_PUSH\_MPLS*

  *Implements OFPAT\_PUSH\_MPLS ('push a new MPLS tag') as defined by the OpenFlow Switch Specification.*

*See struct* **rte\_flow\_action\_of\_push\_mpls***.*

- *RTE\_FLOW\_ACTION\_TYPE\_VXLAN\_ENCAP*

  *Encapsulate flow in VXLAN tunnel as defined in* **rte\_flow\_action\_vxlan\_encap** *action structure.*

*See struct* **rte\_flow\_action\_vxlan\_encap***.*

- *RTE\_FLOW\_ACTION\_TYPE\_VXLAN\_DECAP*

  *Decapsulate outer most VXLAN tunnel from matched flow.*

*If flow pattern does not define a valid VXLAN tunnel (as specified by RFC7348) then the PMD should return a RTE\_FLOW\_ERROR\_TYPE\_ACTION error.*

- *RTE\_FLOW\_ACTION\_TYPE\_NVGRE\_ENCAP*

  *Encapsulate flow in NVGRE tunnel defined in the* **rte\_flow\_action\_nvgre\_encap** *action structure.*

*See struct* **rte\_flow\_action\_nvgre\_encap***.*

- *RTE\_FLOW\_ACTION\_TYPE\_NVGRE\_DECAP*

  *Decapsulate outer most NVGRE tunnel from matched flow.*

*If flow pattern does not define a valid NVGRE tunnel (as specified by RFC7637) then the PMD should return a RTE\_FLOW\_ERROR\_TYPE\_ACTION error.*

- *RTE\_FLOW\_ACTION\_TYPE\_RAW\_ENCAP*

  *Add outer header whose template is provided in its data buffer*

*See struct* **rte\_flow\_action\_raw\_encap***.*

- *RTE\_FLOW\_ACTION\_TYPE\_RAW\_DECAP*

  *Remove outer header whose template is provided in its data buffer.*

*See struct* **rte\_flow\_action\_raw\_decap**

- *RTE\_FLOW\_ACTION\_TYPE\_SET\_IPV4\_SRC*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Modify IPv4 source address in the outermost IPv4 header.*

*If flow pattern does not define a valid RTE\_FLOW\_ITEM\_TYPE\_IPV4, then the PMD should return a RTE\_FLOW\_ERROR\_TYPE\_ACTION error.*

*See struct* **rte\_flow\_action\_set\_ipv4***.*

- *RTE\_FLOW\_ACTION\_TYPE\_SET\_IPV4\_DST*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Modify IPv4 destination address in the outermost IPv4 header.*

*If flow pattern does not define a valid RTE\_FLOW\_ITEM\_TYPE\_IPV4, then the PMD should return a RTE\_FLOW\_ERROR\_TYPE\_ACTION error.*

*See struct* **rte\_flow\_action\_set\_ipv4***.*

- *RTE\_FLOW\_ACTION\_TYPE\_SET\_IPV6\_SRC*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Modify IPv6 source address in the outermost IPv6 header.*

*If flow pattern does not define a valid RTE\_FLOW\_ITEM\_TYPE\_IPV6, then the PMD should return a RTE\_FLOW\_ERROR\_TYPE\_ACTION error.*

*See struct* **rte\_flow\_action\_set\_ipv6***.*

- *RTE\_FLOW\_ACTION\_TYPE\_SET\_IPV6\_DST*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Modify IPv6 destination address in the outermost IPv6 header.*

*If flow pattern does not define a valid RTE\_FLOW\_ITEM\_TYPE\_IPV6, then the PMD should return a RTE\_FLOW\_ERROR\_TYPE\_ACTION error.*

*See struct* **rte\_flow\_action\_set\_ipv6***.*

- *RTE\_FLOW\_ACTION\_TYPE\_SET\_TP\_SRC*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Modify source port number in the outermost TCP/UDP header.*

*If flow pattern does not define a valid RTE\_FLOW\_ITEM\_TYPE\_TCP or RTE\_FLOW\_ITEM\_TYPE\_UDP, then the PMD should return a RTE\_FLOW\_ERROR\_TYPE\_ACTION error.*

*See struct* **rte\_flow\_action\_set\_tp***.*

- *RTE\_FLOW\_ACTION\_TYPE\_SET\_TP\_DST*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Modify destination port number in the outermost TCP/UDP header.*

*If flow pattern does not define a valid RTE\_FLOW\_ITEM\_TYPE\_TCP or RTE\_FLOW\_ITEM\_TYPE\_UDP, then the PMD should return a RTE\_FLOW\_ERROR\_TYPE\_ACTION error.*

*See struct* **rte\_flow\_action\_set\_tp***.*

- *RTE\_FLOW\_ACTION\_TYPE\_MAC\_SWAP*

  *Swap the source and destination MAC addresses in the outermost Ethernet header.*

*If flow pattern does not define a valid RTE\_FLOW\_ITEM\_TYPE\_ETH, then the PMD should return a RTE\_FLOW\_ERROR\_TYPE\_ACTION error.*

*No associated configuration structure.*

- *RTE\_FLOW\_ACTION\_TYPE\_DEC\_TTL*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Decrease TTL value directly*

*No associated configuration structure.*

- *RTE\_FLOW\_ACTION\_TYPE\_SET\_TTL*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Set TTL value*

*See struct* **rte\_flow\_action\_set\_ttl**

- *RTE\_FLOW\_ACTION\_TYPE\_SET\_MAC\_SRC*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Set source MAC address from matched flow.*

*If flow pattern does not define a valid RTE\_FLOW\_ITEM\_TYPE\_ETH, the PMD should return a RTE\_FLOW\_ERROR\_TYPE\_ACTION error.*

*See struct* **rte\_flow\_action\_set\_mac***.*

- *RTE\_FLOW\_ACTION\_TYPE\_SET\_MAC\_DST*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Set destination MAC address from matched flow.*

*If flow pattern does not define a valid RTE\_FLOW\_ITEM\_TYPE\_ETH, the PMD should return a RTE\_FLOW\_ERROR\_TYPE\_ACTION error.*

*See struct* **rte\_flow\_action\_set\_mac***.*

- *RTE\_FLOW\_ACTION\_TYPE\_INC\_TCP\_SEQ*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Increase sequence number in the outermost TCP header.*

*Action configuration specifies the value to increase TCP sequence number as a big-endian 32 bit integer.*

`conf` *type:*

```
rte_be32_t *
```

*Using this action on non-matching traffic will result in undefined behavior.*

- *RTE\_FLOW\_ACTION\_TYPE\_DEC\_TCP\_SEQ*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Decrease sequence number in the outermost TCP header.*

*Action configuration specifies the value to decrease TCP sequence number as a big-endian 32 bit integer.*

`conf` *type:*

```
rte_be32_t *
```

*Using this action on non-matching traffic will result in undefined behavior.*

- *RTE\_FLOW\_ACTION\_TYPE\_INC\_TCP\_ACK*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Increase acknowledgment number in the outermost TCP header.*

*Action configuration specifies the value to increase TCP acknowledgment number as a big-endian 32 bit integer.*

`conf` *type:*

```
rte_be32_t *
```

*Using this action on non-matching traffic will result in undefined behavior.*

- *RTE\_FLOW\_ACTION\_TYPE\_DEC\_TCP\_ACK*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Decrease acknowledgment number in the outermost TCP header.*

*Action configuration specifies the value to decrease TCP acknowledgment number as a big-endian 32 bit integer.*

`conf` *type:*

```
rte_be32_t *
```

*Using this action on non-matching traffic will result in undefined behavior.*

- *RTE\_FLOW\_ACTION\_TYPE\_SET\_TAG*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Set Tag.*

*Tag is for internal flow usage only and is not delivered to the application.*

*See struct* **rte\_flow\_action\_set\_tag***.*

- *RTE\_FLOW\_ACTION\_TYPE\_SET\_META*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Set metadata on ingress or egress path.*

*See struct* **rte\_flow\_action\_set\_meta***.*

- *RTE\_FLOW\_ACTION\_TYPE\_SET\_IPV4\_DSCP*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Modify IPv4 DSCP in the outermost IP header.*

*If flow pattern does not define a valid RTE\_FLOW\_ITEM\_TYPE\_IPV4, then the PMD should return a RTE\_FLOW\_ERROR\_TYPE\_ACTION error.*

*See struct* **rte\_flow\_action\_set\_dscp***.*

- *RTE\_FLOW\_ACTION\_TYPE\_SET\_IPV6\_DSCP*

  **Warning**

*This is a legacy action.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD**

*Modify IPv6 DSCP in the outermost IP header.*

*If flow pattern does not define a valid RTE\_FLOW\_ITEM\_TYPE\_IPV6, then the PMD should return a RTE\_FLOW\_ERROR\_TYPE\_ACTION error.*

*See struct* **rte\_flow\_action\_set\_dscp***.*

- *RTE\_FLOW\_ACTION\_TYPE\_AGE*

  *Report as aged flow if timeout passed without any matching on the flow.*

*See struct* **rte\_flow\_action\_age***. See function rte\_flow\_get\_q\_aged\_flows See function rte\_flow\_get\_aged\_flows see enum RTE\_ETH\_EVENT\_FLOW\_AGED See struct* **rte\_flow\_query\_age** *See struct* **rte\_flow\_update\_age**

- *RTE\_FLOW\_ACTION\_TYPE\_SAMPLE*

  *The matching packets will be duplicated with specified ratio and applied with own set of actions with a fate action.*

*See struct* **rte\_flow\_action\_sample***.*

- *RTE\_FLOW\_ACTION\_TYPE\_SHARED*

  **Deprecated**

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_INDIRECT**

*Describe action shared across multiple flow rules.*

*Allow multiple rules reference the same action by handle (see struct rte\_flow\_shared\_action).*

- *RTE\_FLOW\_ACTION\_TYPE\_MODIFY\_FIELD*

  *Modify a packet header field, tag, mark or metadata.*

*Allow the modification of an arbitrary header field via set, add and sub operations or copying its content into tag, meta or mark for future processing.*

*See struct* **rte\_flow\_action\_modify\_field***.*

- *RTE\_FLOW\_ACTION\_TYPE\_INDIRECT*

  *An action handle is referenced in a rule through an indirect action.*

*The same action handle may be used in multiple rules for the same or different ethdev ports.*

- *RTE\_FLOW\_ACTION\_TYPE\_CONNTRACK*

  *\[META\]*

*Enable tracking a TCP connection state.*

**See also**

*struct* **rte\_flow\_action\_conntrack***.*

- *RTE\_FLOW\_ACTION\_TYPE\_METER\_COLOR*

  *Color the packet to reflect the meter color result. Set the meter color in the mbuf to the selected color.*

*See struct* **rte\_flow\_action\_meter\_color***.*

- *RTE\_FLOW\_ACTION\_TYPE\_PORT\_REPRESENTOR*

  *At embedded switch level, sends matching traffic to the given ethdev.*

**See also**

*struct* **rte\_flow\_action\_ethdev**

- *RTE\_FLOW\_ACTION\_TYPE\_REPRESENTED\_PORT*

  *At embedded switch level, send matching traffic to the entity represented by the given ethdev.*

**See also**

*struct* **rte\_flow\_action\_ethdev**

- *RTE\_FLOW\_ACTION\_TYPE\_METER\_MARK*

  *Traffic metering and marking (MTR).*

**See also**

*struct* **rte\_flow\_action\_meter\_mark** *See file* **rte\_mtr.h** *for MTR profile object configuration.*

- *RTE\_FLOW\_ACTION\_TYPE\_SEND\_TO\_KERNEL*

  *Send packets to the kernel, without going to userspace at all. The packets will be received by the kernel driver sharing the same device as the DPDK port on which this action is configured. This action mostly suits bifurcated driver model.*

*No associated configuration structure.*

- *RTE\_FLOW\_ACTION\_TYPE\_QUOTA*

  *Apply the quota verdict (PASS or BLOCK) to a flow.*

**See also**

*struct* **rte\_flow\_action\_quota**

*struct* **rte\_flow\_query\_quota**

*struct* **rte\_flow\_update\_quota**

- *RTE\_FLOW\_ACTION\_TYPE\_SKIP\_CMAN*

  *Skip congestion management configuration.*

*Using* **rte\_eth\_cman\_config\_set()***, the application can configure ethdev Rx queue's congestion mechanism. This flow action allows to skip the congestion configuration applied to the given ethdev Rx queue.*

- *RTE\_FLOW\_ACTION\_TYPE\_IPV6\_EXT\_PUSH*

  *RTE\_FLOW\_ACTION\_TYPE\_IPV6\_EXT\_PUSH*

*Push IPv6 extension into IPv6 packet.*

**See also**

*struct* **rte\_flow\_action\_ipv6\_ext\_push***.*

- *RTE\_FLOW\_ACTION\_TYPE\_IPV6\_EXT\_REMOVE*

  *RTE\_FLOW\_ACTION\_TYPE\_IPV6\_EXT\_REMOVE*

*Remove IPv6 extension from IPv6 packet whose type is provided in its configuration buffer.*

**See also**

*struct* **rte\_flow\_action\_ipv6\_ext\_remove***.*

- *RTE\_FLOW\_ACTION\_TYPE\_INDIRECT\_LIST*

  *Action handle to reference flow actions list.*

**See also**

*struct* **rte\_flow\_action\_indirect\_list**

- *RTE\_FLOW\_ACTION\_TYPE\_PROG*

  *Program action. These actions are defined by the program currently loaded on the device. For example, these actions are applicable to devices that can be programmed through the P4 language.*

**See also**

*struct* **rte\_flow\_action\_prog***.*

- *RTE\_FLOW\_ACTION\_TYPE\_NAT64*

  *NAT64 translation of IPv4/IPv6 headers.*

**See also**

*struct* **rte\_flow\_action\_nat64**

- *RTE\_FLOW\_ACTION\_TYPE\_JUMP\_TO\_TABLE\_INDEX*

  *RTE\_FLOW\_ACTION\_TYPE\_JUMP\_TO\_TABLE\_INDEX,*

*Redirects packets to a particular index in a flow table.*

**See also**

*struct* **rte\_flow\_action\_jump\_to\_table\_index***.*

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

### enum rte\_flow\_quota\_mode

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*QUOTA operational mode.*

**See also**

*struct* **rte\_flow\_action\_quota**

**Enumerator**

- *RTE\_FLOW\_QUOTA\_MODE\_PACKET*

  *Count packets.*

- *RTE\_FLOW\_QUOTA\_MODE\_L2*

  *Count packet bytes starting from L2.*

- *RTE\_FLOW\_QUOTA\_MODE\_L3*

  *Count packet bytes starting from L3.*

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

### enum rte\_flow\_update\_quota\_op

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Indirect QUOTA update operations.*

**See also**

*struct* **rte\_flow\_update\_quota**

**Enumerator**

- *RTE\_FLOW\_UPDATE\_QUOTA\_SET*

  *Set new quota value.*

- *RTE\_FLOW\_UPDATE\_QUOTA\_ADD*

  *Increase quota value.*

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

### enum rte\_flow\_nat64\_type

*NAT64 translation type for IP headers.*

**Enumerator**

- *RTE\_FLOW\_NAT64\_6TO4*

  *IPv6 to IPv4 headers translation.*

- *RTE\_FLOW\_NAT64\_4TO6*

  *IPv4 to IPv6 headers translation.*

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

### enum rte\_flow\_conntrack\_state

*The state of a TCP connection.*

**Enumerator**

- *RTE\_FLOW\_CONNTRACK\_STATE\_SYN\_RECV*

  *SYN-ACK packet was seen.*

- *RTE\_FLOW\_CONNTRACK\_STATE\_ESTABLISHED*

  *3-way handshake was done.*

- *RTE\_FLOW\_CONNTRACK\_STATE\_FIN\_WAIT*

  *First FIN packet was received to close the connection.*

- *RTE\_FLOW\_CONNTRACK\_STATE\_CLOSE\_WAIT*

  *First FIN was ACKed.*

- *RTE\_FLOW\_CONNTRACK\_STATE\_LAST\_ACK*

  *Second FIN was received, waiting for the last ACK.*

- *RTE\_FLOW\_CONNTRACK\_STATE\_TIME\_WAIT*

  *Second FIN was ACKed, connection was closed.*

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

### enum rte\_flow\_conntrack\_tcp\_last\_index

*The last passed TCP packet flags of a connection.*

**Enumerator**

- *RTE\_FLOW\_CONNTRACK\_FLAG\_NONE*

  *No Flag.*

- *RTE\_FLOW\_CONNTRACK\_FLAG\_SYN*

  *With SYN flag.*

- *RTE\_FLOW\_CONNTRACK\_FLAG\_SYNACK*

  *With SYNACK flag.*

- *RTE\_FLOW\_CONNTRACK\_FLAG\_FIN*

  *With FIN flag.*

- *RTE\_FLOW\_CONNTRACK\_FLAG\_ACK*

  *With ACK flag.*

- *RTE\_FLOW\_CONNTRACK\_FLAG\_RST*

  *With RST flag.*

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

### enum rte\_flow\_modify\_op

*Operation types for MODIFY\_FIELD action.*

**Enumerator**

- *RTE\_FLOW\_MODIFY\_SET*

  *Set a new value.*

- *RTE\_FLOW\_MODIFY\_ADD*

  *Add a value to a field.* \

- *RTE\_FLOW\_MODIFY\_SUB*

  *Subtract a value from a field.*

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

### enum rte\_flow\_error\_type

*Verbose error types.*

*Most of them provide the type of the object referenced by struct* **rte\_flow\_error.cause***.*

**Enumerator**

- *RTE\_FLOW\_ERROR\_TYPE\_NONE*

  *No error.*

- *RTE\_FLOW\_ERROR\_TYPE\_UNSPECIFIED*

  *Cause unspecified.*

- *RTE\_FLOW\_ERROR\_TYPE\_HANDLE*

  *Flow rule (handle).*

- *RTE\_FLOW\_ERROR\_TYPE\_ATTR\_GROUP*

  *Group field.*

- *RTE\_FLOW\_ERROR\_TYPE\_ATTR\_PRIORITY*

  *Priority field.*

- *RTE\_FLOW\_ERROR\_TYPE\_ATTR\_INGRESS*

  *Ingress field.*

- *RTE\_FLOW\_ERROR\_TYPE\_ATTR\_EGRESS*

  *Egress field.*

- *RTE\_FLOW\_ERROR\_TYPE\_ATTR\_TRANSFER*

  *Transfer field.*

- *RTE\_FLOW\_ERROR\_TYPE\_ATTR*

  *Attributes structure.*

- *RTE\_FLOW\_ERROR\_TYPE\_ITEM\_NUM*

  *Pattern length.*

- *RTE\_FLOW\_ERROR\_TYPE\_ITEM\_SPEC*

  *Item specification.*

- *RTE\_FLOW\_ERROR\_TYPE\_ITEM\_LAST*

  *Item specification range.*

- *RTE\_FLOW\_ERROR\_TYPE\_ITEM\_MASK*

  *Item specification mask.*

- *RTE\_FLOW\_ERROR\_TYPE\_ITEM*

  *Specific pattern item.*

- *RTE\_FLOW\_ERROR\_TYPE\_ACTION\_NUM*

  *Number of actions.*

- *RTE\_FLOW\_ERROR\_TYPE\_ACTION\_CONF*

  *Action configuration.*

- *RTE\_FLOW\_ERROR\_TYPE\_ACTION*

  *Specific action.*

- *RTE\_FLOW\_ERROR\_TYPE\_STATE*

  *Current device state.*

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

### enum rte\_flow\_conv\_op

*Conversion operations for flow API objects.*

**See also**

**rte\_flow\_conv()**

**Enumerator**

- *RTE\_FLOW\_CONV\_OP\_NONE*

  *No operation to perform.*

**rte\_flow\_conv()** *simply returns 0.*

- *RTE\_FLOW\_CONV\_OP\_ATTR*

  *Convert attributes structure.*

*This is a basic copy of an attributes structure.*

- •

  `src` *type:*

```
const struct rte_flow_attr *
```

- •

  `dst` *type:*

```
struct rte_flow_attr *
```

- *RTE\_FLOW\_CONV\_OP\_ITEM*

  *Convert a single item.*

*Duplicates* `spec`*,* `last` *and* `mask` *but not outside objects.*

- •

  `src` *type:*

```
const struct rte_flow_item *
```

- •

  `dst` *type:*

```
struct rte_flow_item *
```

- *RTE\_FLOW\_CONV\_OP\_ITEM\_MASK*

  *Convert a single item mask.*

*Duplicates only* `mask`*.*

- •

  `src` *type:*

```
const struct rte_flow_item *
```

- •

  `dst` *type:*

```
struct rte_flow_item *
```

- *RTE\_FLOW\_CONV\_OP\_ACTION*

  *Convert a single action.*

*Duplicates* `conf` *but not outside objects.*

- •

  `src` *type:*

```
const struct rte_flow_action *
```

- •

  `dst` *type:*

```
struct rte_flow_action *
```

- *RTE\_FLOW\_CONV\_OP\_PATTERN*

  *Convert an entire pattern.*

*Duplicates all pattern items at once with the same constraints as RTE\_FLOW\_CONV\_OP\_ITEM.*

- •

  `src` *type:*

```
const struct rte_flow_item *
```

- •

  `dst` *type:*

```
struct rte_flow_item *
```

- *RTE\_FLOW\_CONV\_OP\_ACTIONS*

  *Convert a list of actions.*

*Duplicates the entire list of actions at once with the same constraints as RTE\_FLOW\_CONV\_OP\_ACTION.*

- •

  `src` *type:*

```
const struct rte_flow_action *
```

- •

  `dst` *type:*

```
struct rte_flow_action *
```

- *RTE\_FLOW\_CONV\_OP\_RULE*

  *Convert a complete flow rule description.*

*Comprises attributes, pattern and actions together at once with the usual constraints.*

- •

  `src` *type:*

```
const struct rte_flow_conv_rule *
```

- •

  `dst` *type:*

```
struct rte_flow_conv_rule *
```

- *RTE\_FLOW\_CONV\_OP\_ITEM\_NAME*

  *Convert item type to its name string.*

*Writes a NUL-terminated string to* `dst`*. Like snprintf(), the returned value excludes the terminator which is always written nonetheless.*

- •

  `src` *type:*

```
(const void *)enum rte_flow_item_type
```

- •

  `dst` *type:*

```
char *
```

- *RTE\_FLOW\_CONV\_OP\_ACTION\_NAME*

  *Convert action type to its name string.*

*Writes a NUL-terminated string to* `dst`*. Like snprintf(), the returned value excludes the terminator which is always written nonetheless.*

- •

  `src` *type:*

```
(const void *)enum rte_flow_action_type
```

- •

  `dst` *type:*

```
char *
```

- *RTE\_FLOW\_CONV\_OP\_ITEM\_NAME\_PTR*

  *Convert item type to pointer to item name.*

*Retrieves item name pointer from its type. The string itself is not copied; instead, a unique pointer to an internal static constant storage is written to* `dst`*.*

- •

  `src` *type:*

```
(const void *)enum rte_flow_item_type
```

- •

  `dst` *type:*

```
const char **
```

- *RTE\_FLOW\_CONV\_OP\_ACTION\_NAME\_PTR*

  *Convert action type to pointer to action name.*

*Retrieves action name pointer from its type. The string itself is not copied; instead, a unique pointer to an internal static constant storage is written to* `dst`*.*

- •

  `src` *type:*

```
(const void *)enum rte_flow_action_type
```

- •

  `dst` *type:*

```
const char **
```

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

### enum rte\_flow\_table\_insertion\_type

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Template table flow rules insertion type.*

**Enumerator**

- *RTE\_FLOW\_TABLE\_INSERTION\_TYPE\_PATTERN*

  *Pattern-based insertion.*

- *RTE\_FLOW\_TABLE\_INSERTION\_TYPE\_INDEX*

  *Index-based insertion.*

- *RTE\_FLOW\_TABLE\_INSERTION\_TYPE\_INDEX\_WITH\_PATTERN*

  *Index-based insertion with pattern.*

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

### enum rte\_flow\_table\_hash\_func

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Template table hash index calculation function.*

**Enumerator**

- *RTE\_FLOW\_TABLE\_HASH\_FUNC\_DEFAULT*

  *Default hash calculation.*

- *RTE\_FLOW\_TABLE\_HASH\_FUNC\_LINEAR*

  *Linear hash calculation.*

- *RTE\_FLOW\_TABLE\_HASH\_FUNC\_CRC32*

  *32-bit checksum hash calculation.*

- *RTE\_FLOW\_TABLE\_HASH\_FUNC\_CRC16*

  *16-bit checksum hash calculation.*

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

### enum rte\_flow\_op\_status

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Asynchronous operation status.*

**Enumerator**

- *RTE\_FLOW\_OP\_SUCCESS*

  *The operation was completed successfully.*

- *RTE\_FLOW\_OP\_ERROR*

  *The operation was not completed successfully.*

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

### enum rte\_flow\_query\_update\_mode

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Query and update operational mode.*

**See also**

**rte\_flow\_action\_handle\_query\_update()**

**rte\_flow\_async\_action\_handle\_query\_update()**

**Enumerator**

- *RTE\_FLOW\_QU\_QUERY\_FIRST*

  *Query before update.*

- *RTE\_FLOW\_QU\_UPDATE\_FIRST*

  *Query after update.*

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

### enum rte\_flow\_encap\_hash\_field

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Destination field type for the hash calculation, when encap action is used. The encap field implies the size, meaning XXX\_SRC\_PORT hash len is 2 bytes, while XXX\_NVGRE\_FLOW\_ID hash len is 1 byte.*

**See also**

*function* **rte\_flow\_calc\_encap\_hash**

**Enumerator**

- *RTE\_FLOW\_ENCAP\_HASH\_FIELD\_SRC\_PORT*

  *Calculate hash placed in UDP source port field.*

- *RTE\_FLOW\_ENCAP\_HASH\_FIELD\_NVGRE\_FLOW\_ID*

  *Calculate hash placed in NVGRE flow ID field.*

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

## Function Documentation

### \_\_rte\_experimental int rte\_flow\_dev\_dump (uint16\_t port\_id, struct rte\_flow \* flow, FILE \* file, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Dump hardware internal representation information of rte flow to file.*

**Parameters**

*port\_id The port identifier of the Ethernet device.* \
 *flow The pointer of flow rule to dump. Dump all rules if NULL.* \
 *file A pointer to a file for output.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 on success, a negative value otherwise.*

### static \_\_rte\_experimental int rte\_flow\_dynf\_metadata\_avail (void)` [inline]`, ` [static]`

*Check if mbuf dynamic field for metadata is registered.*

**Returns**

*True if registered, false otherwise.*

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

### \_\_rte\_experimental int rte\_flow\_dynf\_metadata\_register (void)

*Register mbuf dynamic field and flag for metadata.*

*This function must be called prior to use SET\_META action in order to register the dynamic mbuf field. Otherwise, the data cannot be delivered to application.*

**Returns**

*0 on success, a negative errno value otherwise and rte\_errno is set.*

### int rte\_flow\_validate (uint16\_t port\_id, const struct rte\_flow\_attr \* attr, const struct rte\_flow\_item pattern\[\], const struct rte\_flow\_action actions\[\], struct rte\_flow\_error \* error)

*Check whether a flow rule can be created on a given port.*

*The flow rule is validated for correctness and whether it could be accepted by the device given sufficient resources. The rule is checked against the current device mode and queue configuration. The flow rule may also optionally be validated against existing flow rules and device resources. This function has no effect on the target device.*

*The returned value is guaranteed to remain valid only as long as no successful calls to* **rte\_flow\_create()** *or* **rte\_flow\_destroy()** *are made in the meantime and no device parameter affecting flow rules in any way are modified, due to possible collisions or resource limitations (although in such cases EINVAL should not be returned).*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *attr Flow rule attributes.* \
 *pattern Pattern specification (list terminated by the END pattern item).* \
 *actions Associated actions (list terminated by the END action).* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 if flow rule is valid and can be created. A negative errno value otherwise (rte\_errno is also set), the following errors are defined:*

*-ENOSYS: underlying device does not support this functionality.*

*-EIO: underlying device is removed.*

*-EINVAL: unknown or invalid rule specification.*

*-ENOTSUP: valid but unsupported rule specification (e.g. partial bit-masks are unsupported).*

*-EEXIST: collision with an existing rule. Only returned if device supports flow rule collision checking and there was a flow rule collision. Not receiving this return code is no guarantee that creating the rule will not fail due to a collision.*

*-ENOMEM: not enough memory to execute the function, or if the device supports resource validation, resource limitation on the device.*

*-EBUSY: action cannot be performed due to busy device resources, may succeed if the affected queues or even the entire port are in a stopped state (see* **rte\_eth\_dev\_rx\_queue\_stop()** *and* **rte\_eth\_dev\_stop()***).*

### struct rte\_flow \* rte\_flow\_create (uint16\_t port\_id, const struct rte\_flow\_attr \* attr, const struct rte\_flow\_item pattern\[\], const struct rte\_flow\_action actions\[\], struct rte\_flow\_error \* error)

*Create a flow rule on a given port.*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *attr Flow rule attributes.* \
 *pattern Pattern specification (list terminated by the END pattern item).* \
 *actions Associated actions (list terminated by the END action).* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*A valid handle in case of success, NULL otherwise and rte\_errno is set to the positive version of one of the error codes defined for* **rte\_flow\_validate()***.*

### int rte\_flow\_destroy (uint16\_t port\_id, struct rte\_flow \* flow, struct rte\_flow\_error \* error)

*Destroy a flow rule on a given port.*

*Failure to destroy a flow rule handle may occur when other flow rules depend on it, and destroying it would result in an inconsistent state.*

*This function is only guaranteed to succeed if handles are destroyed in reverse order of their creation.*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *flow Flow rule handle to destroy.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 on success, a negative errno value otherwise and rte\_errno is set.*

### \_\_rte\_experimental int rte\_flow\_actions\_update (uint16\_t port\_id, struct rte\_flow \* flow, const struct rte\_flow\_action actions\[\], struct rte\_flow\_error \* error)

*Update a flow rule with new actions on a given port.*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *flow Flow rule handle to update.* \
 *actions Associated actions (list terminated by the END action).* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 on success, a negative errno value otherwise and rte\_errno is set.*

### int rte\_flow\_flush (uint16\_t port\_id, struct rte\_flow\_error \* error)

*Destroy all flow rules associated with a port.*

*In the unlikely event of failure, handles are still considered destroyed and no longer valid but the port must be assumed to be in an inconsistent state.*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 on success, a negative errno value otherwise and rte\_errno is set.*

### int rte\_flow\_query (uint16\_t port\_id, struct rte\_flow \* flow, const struct rte\_flow\_action \* action, void \* data, struct rte\_flow\_error \* error)

*Query an existing flow rule.*

*This function allows retrieving flow-specific data such as counters. Data is gathered by special actions which must be present in the flow rule definition.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_COUNT**

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *flow Flow rule handle to query.* \
 *action Action definition as defined in original flow rule.* \
 *data Pointer to storage for the associated query data type.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 on success, a negative errno value otherwise and rte\_errno is set.*

### int rte\_flow\_isolate (uint16\_t port\_id, int set, struct rte\_flow\_error \* error)

*Restrict ingress traffic to the defined flow rules.*

*Isolated mode guarantees that all ingress traffic comes from defined flow rules only (current and future). When enabled with a bifurcated driver, non-matched packets are routed to the kernel driver interface. When disabled (the default), there may be some default rules routing traffic to the DPDK port.*

*Besides making ingress more deterministic, it allows PMDs to safely reuse resources otherwise assigned to handle the remaining traffic, such as global RSS configuration settings, VLAN filters, MAC address entries, legacy filter API rules and so on in order to expand the set of possible flow rule types.*

*Calling this function as soon as possible after device initialization, ideally before the first call to* **rte\_eth\_dev\_configure()***, is recommended to avoid possible failures due to conflicting settings.*

*Once effective, leaving isolated mode may not be possible depending on PMD implementation.*

*Additionally, the following functionality has no effect on the underlying port and may return errors such as ENOTSUP ('not supported'):*

- •

  *Toggling promiscuous mode.*

- •

  *Toggling allmulticast mode.*

- •

  *Configuring MAC addresses.*

- •

  *Configuring multicast addresses.*

- •

  *Configuring VLAN filters.*

- •

  *Configuring Rx filters through the legacy API (e.g. FDIR).*

- •

  *Configuring global RSS settings.*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *set Nonzero to enter isolated mode, attempt to leave it otherwise.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 on success, a negative errno value otherwise and rte\_errno is set.*

### int rte\_flow\_error\_set (struct rte\_flow\_error \* error, int code, enum rte\_flow\_error\_type type, const void \* cause, const char \* message)

*Initialize flow error structure.*

**Parameters**

*error Pointer to flow error structure (may be NULL).* \
 *code Related error code (rte\_errno).* \
 *type Cause field and error types.* \
 *cause Object responsible for the error.* \
 *message Human-readable error message.*

**Returns**

*Negative error code (errno value) and rte\_errno is set.*

### \_\_rte\_deprecated size\_t rte\_flow\_copy (struct rte\_flow\_desc \* fd, size\_t len, const struct rte\_flow\_attr \* attr, const struct rte\_flow\_item \* items, const struct rte\_flow\_action \* actions)

**Deprecated**

*Copy an rte\_flow rule description.*

*This interface is kept for compatibility with older applications but is implemented as a wrapper to* **rte\_flow\_conv()***. It is deprecated due to its lack of flexibility and reliance on a type unusable with C++ programs (struct* **rte\_flow\_desc***).*

**Parameters**

*fd Flow rule description.* \
 *len Total size of allocated data for the flow description.* \
 *attr Flow rule attributes.* \
 *items Pattern specification (list terminated by the END pattern item).* \
 *actions Associated actions (list terminated by the END action).*

**Returns**

*If len is greater or equal to the size of the flow, the total size of the flow description and its data. If len is lower than the size of the flow, the number of bytes that would have been written to desc had it been sufficient. Nothing is written.*

### \_\_rte\_experimental int rte\_flow\_conv (enum rte\_flow\_conv\_op op, void \* dst, size\_t size, const void \* src, struct rte\_flow\_error \* error)

*Flow object conversion helper.*

*This function performs conversion of various flow API objects to a pre-allocated destination buffer. See enum rte\_flow\_conv\_op for possible operations and details about each of them.*

*Since destination buffer must be large enough, it works in a manner reminiscent of snprintf():*

- •

  *If* `size` *is 0,* `dst` *may be a NULL pointer, otherwise* `dst` *must be non-NULL.*

- •

  *If positive, the returned value represents the number of bytes needed to store the conversion of* `src` *to* `dst` *according to* `op` *regardless of the* `size` *parameter.*

- •

  *Since no more than* `size` *bytes can be written to* `dst`*, output is truncated and may be inconsistent when the returned value is larger than that.*

- •

  *In case of conversion error, a negative error code is returned and* `dst` *contents are unspecified.*

**Parameters**

*op Operation to perform, related to the object type of* `dst`*.* \
 *dst Destination buffer address. Must be suitably aligned by the caller.* \
 *size Destination buffer size in bytes.* \
 *src Source object to copy. Depending on* `op`*, its type may differ from that of* `dst`*.* \
 *error Perform verbose error reporting if not NULL. Initialized in case of error only.*

**Returns**

*The number of bytes required to convert* `src` *to* `dst` *on success, a negative errno value otherwise and rte\_errno is set.*

**See also**

**rte\_flow\_conv\_op**

### \_\_rte\_experimental int rte\_flow\_get\_aged\_flows (uint16\_t port\_id, void \*\* contexts, uint32\_t nb\_contexts, struct rte\_flow\_error \* error)

*Get aged-out flows of a given port.*

*RTE\_ETH\_EVENT\_FLOW\_AGED event will be triggered when at least one new aged out flow was detected after the last call to rte\_flow\_get\_aged\_flows. This function can be called to get the aged flows asynchronously from the event callback or synchronously regardless the event. This is not safe to call rte\_flow\_get\_aged\_flows function with other flow functions from multiple threads simultaneously.*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *contexts The address of an array of pointers to the aged-out flows contexts.* \
 *nb\_contexts The length of context array pointers.* \
 *error Perform verbose error reporting if not NULL. Initialized in case of error only.*

**Returns**

*if nb\_contexts is 0, return the amount of all aged contexts. if nb\_contexts is not 0 , return the amount of aged flows reported in the context array, otherwise negative errno value.*

**See also**

**rte\_flow\_action\_age**

**RTE\_ETH\_EVENT\_FLOW\_AGED**

### \_\_rte\_experimental int rte\_flow\_get\_q\_aged\_flows (uint16\_t port\_id, uint32\_t queue\_id, void \*\* contexts, uint32\_t nb\_contexts, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Get aged-out flows of a given port on the given flow queue.*

*If application configure port attribute with RTE\_FLOW\_PORT\_FLAG\_STRICT\_QUEUE, there is no RTE\_ETH\_EVENT\_FLOW\_AGED event and this function must be called to get the aged flows synchronously.*

*If application configure port attribute without RTE\_FLOW\_PORT\_FLAG\_STRICT\_QUEUE, RTE\_ETH\_EVENT\_FLOW\_AGED event will be triggered at least one new aged out flow was detected on any flow queue after the last call to rte\_flow\_get\_q\_aged\_flows. In addition, the* `queue_id` *will be ignored. This function can be called to get the aged flows asynchronously from the event callback or synchronously regardless the event.*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *queue\_id Flow queue to query. Ignored when RTE\_FLOW\_PORT\_FLAG\_STRICT\_QUEUE not set.* \
 *contexts The address of an array of pointers to the aged-out flows contexts.* \
 *nb\_contexts The length of context array pointers.* \
 *error Perform verbose error reporting if not NULL. Initialized in case of error only.*

**Returns**

*if nb\_contexts is 0, return the amount of all aged contexts. if nb\_contexts is not 0 , return the amount of aged flows reported in the context array, otherwise negative errno value.*

**See also**

**rte\_flow\_action\_age**

**RTE\_ETH\_EVENT\_FLOW\_AGED**

*rte\_flow\_port\_flag*

### \_\_rte\_experimental struct rte\_flow\_action\_handle \* rte\_flow\_action\_handle\_create (uint16\_t port\_id, const struct rte\_flow\_indir\_action\_conf \* conf, const struct rte\_flow\_action \* action, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Create an indirect action object that can be used in flow rules via its handle. The created object handle has single state and configuration across all the flow rules using it.*

**Parameters**

*port\_id The port identifier of the Ethernet device.* \
 *conf Action configuration for the indirect action object creation.* \
 *action Specific configuration of the indirect action object.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*A valid handle in case of success, NULL otherwise and rte\_errno is set to one of the error codes defined:*

- •

  *(ENODEV) if port\_id invalid.*

- •

  *(ENOSYS) if underlying device does not support this functionality.*

- •

  *(EIO) if underlying device is removed.*

- •

  *(EINVAL) if action invalid.*

- •

  *(ENOTSUP) if action valid but unsupported.*

### \_\_rte\_experimental int rte\_flow\_action\_handle\_destroy (uint16\_t port\_id, struct rte\_flow\_action\_handle \* handle, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Destroy indirect action by handle.*

**Parameters**

*port\_id The port identifier of the Ethernet device.* \
 *handle Handle for the indirect action object to be destroyed.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

- •

  *(0) if success.*

- •

  *(-ENODEV) if port\_id invalid.*

- •

  *(-ENOSYS) if underlying device does not support this functionality.*

- •

  *(-EIO) if underlying device is removed.*

- •

  *(-ENOENT) if action pointed by action handle was not found.*

- •

  *(-EBUSY) if action pointed by action handle still used by some rules rte\_errno is also set.*

### \_\_rte\_experimental int rte\_flow\_action\_handle\_update (uint16\_t port\_id, struct rte\_flow\_action\_handle \* handle, const void \* update, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Update in-place the action configuration and / or state pointed by action handle with the configuration provided as update argument. The update of the action configuration effects all flow rules reusing the action via handle. The update general pointer provides the ability of partial updating.*

**Parameters**

*port\_id The port identifier of the Ethernet device.* \
 *handle Handle for the indirect action object to be updated.* \
 *update Update profile specification used to modify the action pointed by handle. update could be with the same type of the immediate action corresponding to the handle argument when creating, or a wrapper structure includes action configuration to be updated and bit fields to indicate the member of fields inside the action to update.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

- •

  *(0) if success.*

- •

  *(-ENODEV) if port\_id invalid.*

- •

  *(-ENOSYS) if underlying device does not support this functionality.*

- •

  *(-EIO) if underlying device is removed.*

- •

  *(-EINVAL) if update invalid.*

- •

  *(-ENOTSUP) if update valid but unsupported.*

- •

  *(-ENOENT) if indirect action object pointed by handle was not found. rte\_errno is also set.*

### \_\_rte\_experimental int rte\_flow\_action\_handle\_query (uint16\_t port\_id, const struct rte\_flow\_action\_handle \* handle, void \* data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Query the direct action by corresponding indirect action object handle.*

*Retrieve action-specific data such as counters. Data is gathered by special action which may be present/referenced in more than one flow rule definition.*

**See also**

**RTE\_FLOW\_ACTION\_TYPE\_COUNT**

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *handle Handle for the action object to query.* \
 *data Pointer to storage for the associated query data type.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 on success, a negative errno value otherwise and rte\_errno is set.*

### \_\_rte\_experimental int rte\_flow\_tunnel\_decap\_set (uint16\_t port\_id, struct rte\_flow\_tunnel \* tunnel, struct rte\_flow\_action \*\* actions, uint32\_t \* num\_of\_actions, struct rte\_flow\_error \* error)

*Allocate an array of actions to be used in rte\_flow\_create, to implement tunnel-decap-set for the given tunnel. Sample usage: actions vxlan\_decap / tunnel-decap-set(tunnel properties) / jump group 0 / end*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *tunnel Tunnel properties.* \
 *actions Array of actions to be allocated by the PMD. This array should be concatenated with the actions array provided to rte\_flow\_create.* \
 *num\_of\_actions Number of actions allocated.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 on success, a negative errno value otherwise and rte\_errno is set.*

### \_\_rte\_experimental int rte\_flow\_tunnel\_match (uint16\_t port\_id, struct rte\_flow\_tunnel \* tunnel, struct rte\_flow\_item \*\* items, uint32\_t \* num\_of\_items, struct rte\_flow\_error \* error)

*Allocate an array of items to be used in rte\_flow\_create, to implement tunnel-match for the given tunnel. Sample usage: pattern tunnel-match(tunnel properties) / outer-header-matches / inner-header-matches / end*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *tunnel Tunnel properties.* \
 *items Array of items to be allocated by the PMD. This array should be concatenated with the items array provided to rte\_flow\_create.* \
 *num\_of\_items Number of items allocated.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 on success, a negative errno value otherwise and rte\_errno is set.*

### \_\_rte\_experimental uint64\_t rte\_flow\_restore\_info\_dynflag (void)

*On reception of a mbuf from HW, a call to* **rte\_flow\_get\_restore\_info()** *may be required to retrieve some metadata. This function returns the associated mbuf ol\_flags.*

*Note: the dynamic flag is registered during a call to* **rte\_eth\_rx\_metadata\_negotiate()** *with RTE\_ETH\_RX\_METADATA\_TUNNEL\_ID.*

**Returns**

*The offload flag indicating* **rte\_flow\_get\_restore\_info()** *must be called.*

### \_\_rte\_experimental int rte\_flow\_get\_restore\_info (uint16\_t port\_id, struct rte\_mbuf \* m, struct rte\_flow\_restore\_info \* info, struct rte\_flow\_error \* error)

*If a mbuf contains the* **rte\_flow\_restore\_info\_dynflag()** *flag in ol\_flags, populate the current packet processing state.*

*One should negotiate tunnel metadata delivery from the NIC to the HW.*

**See also**

**rte\_eth\_rx\_metadata\_negotiate()**

**RTE\_ETH\_RX\_METADATA\_TUNNEL\_ID**

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *m Mbuf struct.* \
 *info Restore information. Upon success contains the HW state.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 on success, a negative errno value otherwise and rte\_errno is set.*

### \_\_rte\_experimental int rte\_flow\_tunnel\_action\_decap\_release (uint16\_t port\_id, struct rte\_flow\_action \* actions, uint32\_t num\_of\_actions, struct rte\_flow\_error \* error)

*Release the action array as allocated by rte\_flow\_tunnel\_decap\_set.*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *actions Array of actions to be released.* \
 *num\_of\_actions Number of elements in actions array.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 on success, a negative errno value otherwise and rte\_errno is set.*

### \_\_rte\_experimental int rte\_flow\_tunnel\_item\_release (uint16\_t port\_id, struct rte\_flow\_item \* items, uint32\_t num\_of\_items, struct rte\_flow\_error \* error)

*Release the item array as allocated by rte\_flow\_tunnel\_match.*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *items Array of items to be released.* \
 *num\_of\_items Number of elements in item array.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 on success, a negative errno value otherwise and rte\_errno is set.*

### int rte\_flow\_pick\_transfer\_proxy (uint16\_t port\_id, uint16\_t \* proxy\_port\_id, struct rte\_flow\_error \* error)

*Get a proxy port to manage 'transfer' flows.*

*Managing 'transfer' flows requires that the user communicate them via a port which has the privilege to control the embedded switch. For some vendors, all ports in a given switching domain have this privilege. For other vendors, it's only one port.*

*This API indicates such a privileged port (a 'proxy') for a given port in the same switching domain.*

**Note**

*If the PMD serving* `port_id` *doesn't have the corresponding method implemented, the API will return* `port_id` *via* `proxy_port_id`*.*

**Parameters**

*port\_id Indicates the port to get a 'proxy' for* \
 *proxy\_port\_id Indicates the 'proxy' port* \
 *error If not NULL, allows the PMD to provide verbose report in case of error*

**Returns**

*0 on success, a negative error code otherwise*

### \_\_rte\_experimental struct rte\_flow\_item\_flex\_handle \* rte\_flow\_flex\_item\_create (uint16\_t port\_id, const struct rte\_flow\_item\_flex\_conf \* conf, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Create the flex item with specified configuration over the Ethernet device.*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *conf Item configuration.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*Non-NULL opaque pointer on success, NULL otherwise and rte\_errno is set.*

### \_\_rte\_experimental int rte\_flow\_flex\_item\_release (uint16\_t port\_id, const struct rte\_flow\_item\_flex\_handle \* handle, struct rte\_flow\_error \* error)

*Release the flex item on the specified Ethernet device.*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *handle Handle of the item existing on the specified device.* \
 *error Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.*

**Returns**

*0 on success, a negative errno value otherwise and rte\_errno is set.*

### \_\_rte\_experimental int rte\_flow\_info\_get (uint16\_t port\_id, struct rte\_flow\_port\_info \* port\_info, struct rte\_flow\_queue\_info \* queue\_info, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL:** *this API may change without prior notice.*

*Get information about flow engine resources.*

**Parameters**

*port\_id Port identifier of Ethernet device.* \
 *port\_info A pointer to a structure of type* **rte\_flow\_port\_info to be filled with the resources information of the port.** \
 *queue\_info* **A pointer to a structure of type rte\_flow\_queue\_info to be filled with the asynchronous queues information.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

### \_\_rte\_experimental int rte\_flow\_configure (uint16\_t port\_id, const struct rte\_flow\_port\_attr \* port\_attr, uint16\_t nb\_queue, const struct rte\_flow\_queue\_attr \* queue\_attr\[\], struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Configure the port's flow API engine.**

**This API can only be invoked before the application starts using the rest of the flow library functions.**

**The API can be invoked multiple times to change the settings. The port, however, may reject changes and keep the old config.**

**Parameters in configuration attributes must not exceed numbers of resources returned by the rte\_flow\_info\_get API.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *port\_attr* **Port configuration attributes.** \
 *nb\_queue* **Number of flow queues to be configured.** \
 *queue\_attr* **Array that holds attributes for each flow queue. Number of elements is set in** `port_attr.nb_queues`**.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

### \_\_rte\_experimental struct rte\_flow\_pattern\_template \* rte\_flow\_pattern\_template\_create (uint16\_t port\_id, const struct rte\_flow\_pattern\_template\_attr \* template\_attr, const struct rte\_flow\_item pattern\[\], struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Create flow pattern template.**

**The pattern template defines common matching fields without values. For example, matching on 5 tuple TCP flow, the template will be eth(null) + IPv4(source + dest) + TCP(s\_port + d\_port), while values for each rule will be set during the flow rule creation. The number and order of items in the template must be the same at the rule creation.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *template\_attr* **Pattern template attributes.** \
 *pattern* **Pattern specification (list terminated by the END pattern item). The spec member of an item is not used unless the end member is used.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**Handle on success, NULL otherwise and rte\_errno is set.**

### \_\_rte\_experimental int rte\_flow\_pattern\_template\_destroy (uint16\_t port\_id, struct rte\_flow\_pattern\_template \* pattern\_template, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Destroy flow pattern template.**

**This function may be called only when there are no more tables referencing this template.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *pattern\_template* **Handle of the template to be destroyed.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

### \_\_rte\_experimental struct rte\_flow\_actions\_template \* rte\_flow\_actions\_template\_create (uint16\_t port\_id, const struct rte\_flow\_actions\_template\_attr \* template\_attr, const struct rte\_flow\_action actions\[\], const struct rte\_flow\_action masks\[\], struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Create flow actions template.**

**The actions template holds a list of action types without values. For example, the template to change TCP ports is TCP(s\_port + d\_port), while values for each rule will be set during the flow rule creation. The number and order of actions in the template must be the same at the rule creation.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *template\_attr* **Template attributes.** \
 *actions* **Associated actions (list terminated by the END action). The spec member is only used if** `masks` **spec is non-zero.** \
 *masks* **List of actions that marks which of the action's member is constant. A mask has the same format as the corresponding action. If the action field in** `masks` **is not 0, the corresponding value in an action from** `actions` **will be the part of the template and used in all flow rules. The order of actions in** `masks` **is the same as in** `actions`**. In case of indirect actions present in** `actions`**, the actual action type should be present in** `mask`**.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**Handle on success, NULL otherwise and rte\_errno is set.**

### \_\_rte\_experimental int rte\_flow\_actions\_template\_destroy (uint16\_t port\_id, struct rte\_flow\_actions\_template \* actions\_template, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Destroy flow actions template.**

**This function may be called only when there are no more tables referencing this template.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *actions\_template* **Handle to the template to be destroyed.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

### \_\_rte\_experimental bool rte\_flow\_template\_table\_resizable (\_\_rte\_unused uint16\_t port\_id, const struct rte\_flow\_template\_table\_attr \* tbl\_attr)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Query whether a table can be resized.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *tbl\_attr* **Template table.**

**Returns**

**True if the table can be resized.**

### \_\_rte\_experimental struct rte\_flow\_template\_table \* rte\_flow\_template\_table\_create (uint16\_t port\_id, const struct rte\_flow\_template\_table\_attr \* table\_attr, struct rte\_flow\_pattern\_template \* pattern\_templates\[\], uint8\_t nb\_pattern\_templates, struct rte\_flow\_actions\_template \* actions\_templates\[\], uint8\_t nb\_actions\_templates, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Create flow template table.**

**A template table consists of multiple pattern templates and actions templates associated with a single set of rule attributes (group ID, priority and traffic direction).**

**Each rule is free to use any combination of pattern and actions templates and specify particular values for items and actions it would like to change.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *table\_attr* **Template table attributes.** \
 *pattern\_templates* **Array of pattern templates to be used in this table.** \
 *nb\_pattern\_templates* **The number of pattern templates in the pattern\_templates array.** \
 *actions\_templates* **Array of actions templates to be used in this table.** \
 *nb\_actions\_templates* **The number of actions templates in the actions\_templates array.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**Handle on success, NULL otherwise and rte\_errno is set.**

### \_\_rte\_experimental int rte\_flow\_template\_table\_destroy (uint16\_t port\_id, struct rte\_flow\_template\_table \* template\_table, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Destroy flow template table.**

**This function may be called only when there are no more flow rules referencing this table.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *template\_table* **Handle to the table to be destroyed.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

### \_\_rte\_experimental int rte\_flow\_group\_set\_miss\_actions (uint16\_t port\_id, uint32\_t group\_id, const struct rte\_flow\_group\_attr \* attr, const struct rte\_flow\_action actions\[\], struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Set group miss actions.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *group\_id* **Identifier of a group to set miss actions for.** \
 *attr* **Group attributes.** \
 *actions* **List of group miss actions.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

### \_\_rte\_experimental struct rte\_flow \* rte\_flow\_async\_create (uint16\_t port\_id, uint32\_t queue\_id, const struct rte\_flow\_op\_attr \* op\_attr, struct rte\_flow\_template\_table \* template\_table, const struct rte\_flow\_item pattern\[\], uint8\_t pattern\_template\_index, const struct rte\_flow\_action actions\[\], uint8\_t actions\_template\_index, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Enqueue rule creation operation.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue used to insert the rule.** \
 *op\_attr* **Rule creation operation attributes.** \
 *template\_table* **Template table to select templates from.** \
 *pattern* **List of pattern items to be used. The list order should match the order in the pattern template. The spec is the only relevant member of the item that is being used.** \
 *pattern\_template\_index* **Pattern template index in the table.** \
 *actions* **List of actions to be used. The list order should match the order in the actions template.** \
 *actions\_template\_index* **Actions template index in the table.** \
 *user\_data* **The user data that will be returned on the completion events.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**Handle on success, NULL otherwise and rte\_errno is set. The rule handle doesn't mean that the rule has been populated. Only completion result indicates that if there was success or failure.**

### \_\_rte\_experimental struct rte\_flow \* rte\_flow\_async\_create\_by\_index (uint16\_t port\_id, uint32\_t queue\_id, const struct rte\_flow\_op\_attr \* op\_attr, struct rte\_flow\_template\_table \* template\_table, uint32\_t rule\_index, const struct rte\_flow\_action actions\[\], uint8\_t actions\_template\_index, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Enqueue rule creation operation.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue used to insert the rule.** \
 *op\_attr* **Rule creation operation attributes.** \
 *template\_table* **Template table to select templates from.** \
 *rule\_index* **Rule index in the table.** \
 *actions* **List of actions to be used. The list order should match the order in the actions template.** \
 *actions\_template\_index* **Actions template index in the table.** \
 *user\_data* **The user data that will be returned on the completion events.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**Handle on success, NULL otherwise and rte\_errno is set. The rule handle doesn't mean that the rule has been populated. Only completion result indicates that if there was success or failure.**

### \_\_rte\_experimental struct rte\_flow \* rte\_flow\_async\_create\_by\_index\_with\_pattern (uint16\_t port\_id, uint32\_t queue\_id, const struct rte\_flow\_op\_attr \* op\_attr, struct rte\_flow\_template\_table \* template\_table, uint32\_t rule\_index, const struct rte\_flow\_item pattern\[\], uint8\_t pattern\_template\_index, const struct rte\_flow\_action actions\[\], uint8\_t actions\_template\_index, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Enqueue rule creation by index with pattern operation. Packets are only matched if there is a rule inserted at the index.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue used to insert the rule.** \
 *op\_attr* **Rule creation operation attributes.** \
 *template\_table* **Template table to select templates from.** \
 *rule\_index* **Rule index in the table. Inserting a rule to already occupied index results in undefined behavior.** \
 *pattern* **List of pattern items to be used. The list order should match the order in the pattern template. The spec is the only relevant member of the item that is being used.** \
 *pattern\_template\_index* **Pattern template index in the table.** \
 *actions* **List of actions to be used. The list order should match the order in the actions template.** \
 *actions\_template\_index* **Actions template index in the table.** \
 *user\_data* **The user data that will be returned on the completion events.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**Handle on success, NULL otherwise and rte\_errno is set. The rule handle doesn't mean that the rule has been populated. Only completion result indicates that if there was success or failure.**

### \_\_rte\_experimental int rte\_flow\_async\_destroy (uint16\_t port\_id, uint32\_t queue\_id, const struct rte\_flow\_op\_attr \* op\_attr, struct rte\_flow \* flow, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Enqueue rule destruction operation.**

**This function enqueues a destruction operation on the queue. Application should assume that after calling this function the rule handle is not valid anymore. Completion indicates the full removal of the rule from the HW.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue which is used to destroy the rule. This must match the queue on which the rule was created.** \
 *op\_attr* **Rule destruction operation attributes.** \
 *flow* **Flow handle to be destroyed.** \
 *user\_data* **The user data that will be returned on the completion events.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

### \_\_rte\_experimental int rte\_flow\_async\_actions\_update (uint16\_t port\_id, uint32\_t queue\_id, const struct rte\_flow\_op\_attr \* op\_attr, struct rte\_flow \* flow, const struct rte\_flow\_action actions\[\], uint8\_t actions\_template\_index, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Enqueue rule update operation.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue used to insert the rule.** \
 *op\_attr* **Rule creation operation attributes.** \
 *flow* **Flow rule to be updated.** \
 *actions* **List of actions to be used. The list order should match the order in the actions template.** \
 *actions\_template\_index* **Actions template index in the table.** \
 *user\_data* **The user data that will be returned on the completion events.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

### \_\_rte\_experimental int rte\_flow\_push (uint16\_t port\_id, uint32\_t queue\_id, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Push all internally stored rules to the HW. Postponed rules are rules that were inserted with the postpone flag set. Can be used to notify the HW about batch of rules prepared by the SW to reduce the number of communications between the HW and SW.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue to be pushed.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

### \_\_rte\_experimental int rte\_flow\_pull (uint16\_t port\_id, uint32\_t queue\_id, struct rte\_flow\_op\_result res\[\], uint16\_t n\_res, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Pull a rte flow operation. The application must invoke this function in order to complete the flow rule offloading and to retrieve the flow rule operation status.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue which is used to pull the operation.** \
 *res* **Array of results that will be set.** \
 *n\_res* **Maximum number of results that can be returned. This value is equal to the size of the res array.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**Number of results that were pulled, a negative errno value otherwise and rte\_errno is set.**

### \_\_rte\_experimental struct rte\_flow\_action\_handle \* rte\_flow\_async\_action\_handle\_create (uint16\_t port\_id, uint32\_t queue\_id, const struct rte\_flow\_op\_attr \* op\_attr, const struct rte\_flow\_indir\_action\_conf \* indir\_action\_conf, const struct rte\_flow\_action \* action, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Enqueue indirect action creation operation.**

**See also**

**rte\_flow\_action\_handle\_create**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue which is used to create the rule.** \
 *op\_attr* **Indirect action creation operation attributes.** \
 *indir\_action\_conf* **Action configuration for the indirect action object creation.** \
 *action* **Specific configuration of the indirect action object.** \
 *user\_data* **The user data that will be returned on the completion events.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**A valid handle in case of success, NULL otherwise and rte\_errno is set.**

### \_\_rte\_experimental int rte\_flow\_async\_action\_handle\_destroy (uint16\_t port\_id, uint32\_t queue\_id, const struct rte\_flow\_op\_attr \* op\_attr, struct rte\_flow\_action\_handle \* action\_handle, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Enqueue indirect action destruction operation. The destroy queue must be the same as the queue on which the action was created.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue which is used to destroy the rule.** \
 *op\_attr* **Indirect action destruction operation attributes.** \
 *action\_handle* **Handle for the indirect action object to be destroyed.** \
 *user\_data* **The user data that will be returned on the completion events.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

### \_\_rte\_experimental int rte\_flow\_async\_action\_handle\_update (uint16\_t port\_id, uint32\_t queue\_id, const struct rte\_flow\_op\_attr \* op\_attr, struct rte\_flow\_action\_handle \* action\_handle, const void \* update, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Enqueue indirect action update operation.**

**See also**

**rte\_flow\_action\_handle\_create**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue which is used to update the rule.** \
 *op\_attr* **Indirect action update operation attributes.** \
 *action\_handle* **Handle for the indirect action object to be updated.** \
 *update* **Update profile specification used to modify the action pointed by handle.** *update* **could be with the same type of the immediate action corresponding to the** *handle* **argument when creating, or a wrapper structure includes action configuration to be updated and bit fields to indicate the member of fields inside the action to update.** \
 *user\_data* **The user data that will be returned on the completion events.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

### \_\_rte\_experimental int rte\_flow\_async\_action\_handle\_query (uint16\_t port\_id, uint32\_t queue\_id, const struct rte\_flow\_op\_attr \* op\_attr, const struct rte\_flow\_action\_handle \* action\_handle, void \* data, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Enqueue indirect action query operation.**

**Retrieve action-specific data such as counters. Data is gathered by special action which may be present/referenced in more than one flow rule definition. Data will be available only when completion event returns.**

**See also**

**rte\_flow\_async\_action\_handle\_query**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue which is used to query the action.** \
 *op\_attr* **Indirect action update operation attributes.** \
 *action\_handle* **Handle for the action object to query.** \
 *data* **Pointer to storage for the associated query data type. The out data will be available only when completion event returns from rte\_flow\_pull.** \
 *user\_data* **The user data that will be returned on the completion events.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

### \_\_rte\_experimental int rte\_flow\_action\_handle\_query\_update (uint16\_t port\_id, struct rte\_flow\_action\_handle \* handle, const void \* update, void \* query, enum rte\_flow\_query\_update\_mode mode, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Query and/or update indirect flow action. If both query and update not NULL, the function atomically queries and updates indirect action. Query and update are carried in order specified in the mode parameter. If ether query or update is NULL, the function executes complementing operation.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *handle* **Handle for the indirect action object to be updated.** \
 *update* **If not NULL, update profile specification used to modify the action pointed by handle.** \
 *query* **If not NULL pointer to storage for the associated query data type.** \
 *mode* **Operational mode.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

- •

  **(-ENODEV) if** *port\_id* **invalid.**

- •

  **(-ENOTSUP) if underlying device does not support this functionality.**

- •

  **(-EINVAL) if** *handle* **or** *mode* **invalid or both** *query* **and** *update* **are NULL.**

### \_\_rte\_experimental int rte\_flow\_async\_action\_handle\_query\_update (uint16\_t port\_id, uint32\_t queue\_id, const struct rte\_flow\_op\_attr \* attr, struct rte\_flow\_action\_handle \* handle, const void \* update, void \* query, enum rte\_flow\_query\_update\_mode mode, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Enqueue async indirect flow action query and/or update**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue which is used to update the rule.** \
 *attr* **Indirect action update operation attributes.** \
 *handle* **Handle for the indirect action object to be updated.** \
 *update* **If not NULL, update profile specification used to modify the action pointed by handle.** \
 *query* **If not NULL, pointer to storage for the associated query data type. Query result returned on async completion event.** \
 *mode* **Operational mode.** \
 *user\_data* **The user data that will be returned on async completion event.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**0 on success, a negative errno value otherwise and rte\_errno is set.**

- •

  **(-ENODEV) if** *port\_id* **invalid.**

- •

  **(-ENOTSUP) if underlying device does not support this functionality.**

- •

  **(-EINVAL) if** *handle* **or** *mode* **invalid or both** *update* **and** *query* **are NULL.**

### \_\_rte\_experimental struct rte\_flow\_action\_list\_handle \* rte\_flow\_action\_list\_handle\_create (uint16\_t port\_id, const struct rte\_flow\_indir\_action\_conf \* conf, const struct rte\_flow\_action \* actions, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Create an indirect flow action object from flow actions list. The object is identified by a unique handle. The handle has single state and configuration across all the flow rules using it.**

**Parameters**

*port\_id* **The port identifier of the Ethernet device.** \
 *conf* **Action configuration for the indirect action list creation.** \
 *actions* **Specific configuration of the indirect action lists.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**A valid handle in case of success, NULL otherwise and rte\_errno is set to one of the error codes defined:**

- •

  **(-ENODEV) if** *port\_id* **invalid.**

- •

  **(-ENOSYS) if underlying device does not support this functionality.**

- •

  **(-EIO) if underlying device is removed.**

- •

  **(-EINVAL) if** *actions* **list invalid.**

- •

  **(-ENOTSUP) if** *action* **list element valid but unsupported.**

### \_\_rte\_experimental struct rte\_flow\_action\_list\_handle \* rte\_flow\_async\_action\_list\_handle\_create (uint16\_t port\_id, uint32\_t queue\_id, const struct rte\_flow\_op\_attr \* attr, const struct rte\_flow\_indir\_action\_conf \* conf, const struct rte\_flow\_action \* actions, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Async function call to create an indirect flow action object from flow actions list. The object is identified by a unique handle. The handle has single state and configuration across all the flow rules using it.**

**Parameters**

*port\_id* **The port identifier of the Ethernet device.** \
 *queue\_id* **Flow queue which is used to update the rule.** \
 *attr* **Indirect action update operation attributes.** \
 *conf* **Action configuration for the indirect action list creation.** \
 *actions* **Specific configuration of the indirect action list.** \
 *user\_data* **The user data that will be returned on async completion event.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

**A valid handle in case of success, NULL otherwise and rte\_errno is set to one of the error codes defined:**

- •

  **(-ENODEV) if** *port\_id* **invalid.**

- •

  **(-ENOSYS) if underlying device does not support this functionality.**

- •

  **(-EIO) if underlying device is removed.**

- •

  **(-EINVAL) if** *actions* **list invalid.**

- •

  **(-ENOTSUP) if** *action* **list element valid but unsupported.**

### \_\_rte\_experimental int rte\_flow\_action\_list\_handle\_destroy (uint16\_t port\_id, struct rte\_flow\_action\_list\_handle \* handle, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Destroy indirect actions list by handle.**

**Parameters**

*port\_id* **The port identifier of the Ethernet device.** \
 *handle* **Handle for the indirect actions list to be destroyed.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

- •

  **(0) if success.**

- •

  **(-ENODEV) if** *port\_id* **invalid.**

- •

  **(-ENOSYS) if underlying device does not support this functionality.**

- •

  **(-EIO) if underlying device is removed.**

- •

  **(-ENOENT) if actions list pointed by** *action* **handle was not found.**

- •

  **(-EBUSY) if actions list pointed by** *action* **handle still used**

### \_\_rte\_experimental int rte\_flow\_async\_action\_list\_handle\_destroy (uint16\_t port\_id, uint32\_t queue\_id, const struct rte\_flow\_op\_attr \* op\_attr, struct rte\_flow\_action\_list\_handle \* handle, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Enqueue indirect action list destruction operation. The destroy queue must be the same as the queue on which the action was created.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue which is used to destroy the rule.** \
 *op\_attr* **Indirect action destruction operation attributes.** \
 *handle* **Handle for the indirect action object to be destroyed.** \
 *user\_data* **The user data that will be returned on the completion events.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

- •

  **(0) if success.**

- •

  **(-ENODEV) if** *port\_id* **invalid.**

- •

  **(-ENOSYS) if underlying device does not support this functionality.**

- •

  **(-EIO) if underlying device is removed.**

- •

  **(-ENOENT) if actions list pointed by** *action* **handle was not found.**

- •

  **(-EBUSY) if actions list pointed by** *action* **handle still used**

### \_\_rte\_experimental int rte\_flow\_action\_list\_handle\_query\_update (uint16\_t port\_id, const struct rte\_flow\_action\_list\_handle \* handle, const void \*\* update, void \*\* query, enum rte\_flow\_query\_update\_mode mode, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Query and/or update indirect flow actions list. If both query and update not NULL, the function atomically queries and updates indirect action. Query and update are carried in order specified in the mode parameter. If ether query or update is NULL, the function executes complementing operation.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *handle* **Handle for the indirect actions list object to be updated.** \
 *update* **If the action list handle was created from n actions A1 / A2 ... An / END non-NULL update parameter is an array \[U1, U2, ... Un\] where Ui points to Ai update context or NULL if Ai should not be updated.** \
 *query* **If the action list handle was created from n actions A1 / A2 ... An / END non-NULL query parameter is an array \[Q1, Q2, ... Qn\] where Qi points to Ai query context or NULL if Ai should not be queried.** \
 *mode* **Operational mode.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

- •

  **(0) if success.**

- •

  **(-ENODEV) if** *port\_id* **invalid.**

- •

  **(-ENOTSUP) if underlying device does not support this functionality.**

- •

  **(-EINVAL) if** *handle* **or** *mode* **invalid or both** *query* **and** *update* **are NULL.**

### \_\_rte\_experimental int rte\_flow\_async\_action\_list\_handle\_query\_update (uint16\_t port\_id, uint32\_t queue\_id, const struct rte\_flow\_op\_attr \* attr, const struct rte\_flow\_action\_list\_handle \* handle, const void \*\* update, void \*\* query, enum rte\_flow\_query\_update\_mode mode, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Enqueue async indirect flow actions list query and/or update If both query and update not NULL, the function atomically queries and updates indirect action. Query and update are carried in order specified in the mode parameter. If ether query or update is NULL, the function executes complementing operation.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue\_id* **Flow queue which is used to update the rule.** \
 *attr* **Indirect action update operation attributes.** \
 *handle* **Handle for the indirect actions list object to be updated.** \
 *update* **If the action list handle was created from n actions A1 / A2 ... An / END non-NULL update parameter is an array \[U1, U2, ... Un\] where Ui points to Ai update context or NULL if Ai should not be updated.** \
 *query* **If the action list handle was created from n actions A1 / A2 ... An / END non-NULL query parameter is an array \[Q1, Q2, ... Qn\] where Qi points to Ai query context or NULL if Ai should not be queried. Query result returned on async completion event.** \
 *mode* **Operational mode.** \
 *user\_data* **The user data that will be returned on async completion event.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

- •

  **(0) if success.**

- •

  **(-ENODEV) if** *port\_id* **invalid.**

- •

  **(-ENOTSUP) if underlying device does not support this functionality.**

- •

  **(-EINVAL) if** *handle* **or** *mode* **invalid or both** *update* **and** *query* **are NULL.**

### \_\_rte\_experimental int rte\_flow\_calc\_table\_hash (uint16\_t port\_id, const struct rte\_flow\_template\_table \* table, const struct rte\_flow\_item pattern\[\], uint8\_t pattern\_template\_index, uint32\_t \* hash, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Calculate the hash for a given pattern in a given table as calculated by the HW.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *table* **The table the SW wishes to simulate.** \
 *pattern* **The values to be used in the hash calculation.** \
 *pattern\_template\_index* **The pattern index in the table to be used for the calculation.** \
 *hash* **Used to return the calculated hash.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

- •

  **(0) if success.**

- •

  **(-ENODEV) if** *port\_id* **invalid.**

- •

  **(-ENOTSUP) if underlying device does not support this functionality.**

### \_\_rte\_experimental int rte\_flow\_calc\_encap\_hash (uint16\_t port\_id, const struct rte\_flow\_item pattern\[\], enum rte\_flow\_encap\_hash\_field dest\_field, uint8\_t hash\_len, uint8\_t \* hash, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Simulate HW hash calculation that is done when an encap action is being used. This hash can be stored in tunnel outer header to improve packet distribution.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *pattern* **The values to be used in the hash calculation.** \
 *dest\_field* **Type of destination field for hash calculation.** \
 *hash\_len* **The length of the hash pointer in bytes. Should be according to dest\_field.** \
 *hash* **Used to return the calculated hash. It will be written in network order, so hash\[0\] is the MSB. The number of bytes is based on the destination field type.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

- •

  **(0) if success.**

- •

  **(-ENODEV) if** *port\_id* **invalid.**

- •

  **(-ENOTSUP) if underlying device does not support this functionality.**

- •

  **(-EINVAL) if** *pattern* **doesn't hold enough information to calculate the hash or the dest is not supported.**

### \_\_rte\_experimental int rte\_flow\_template\_table\_resize (uint16\_t port\_id, struct rte\_flow\_template\_table \* table, uint32\_t nb\_rules, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Update template table for new flow rules capacity.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *table* **Template table to modify.** \
 *nb\_rules* **New flow rules capacity.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

- •

  **(0) if success.**

- •

  **(-ENODEV) if** *port\_id* **invalid.**

- •

  **(-ENOTSUP) if underlying device does not support this functionality.**

- •

  **(-EINVAL) if** *table* **is not resizable or** *table* **resize to** *nb\_rules* **is not supported or unrecoverable** *table* **error.**

### \_\_rte\_experimental int rte\_flow\_async\_update\_resized (uint16\_t port\_id, uint32\_t queue, const struct rte\_flow\_op\_attr \* attr, struct rte\_flow \* rule, void \* user\_data, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Update** *rule* **for the new** *table* **configuration after table resize. Must be called for each** *rule* **created before** *table* **resize. If called for** *rule* **created after** *table* **resize returns success.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *queue* **Flow queue for async operation.** \
 *attr* **Async operation attributes.** \
 *rule* **Flow rule to update.** \
 *user\_data* **The user data that will be returned on async completion event.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

- •

  **(0) if success.**

- •

  **(-ENODEV) if** *port\_id* **invalid.**

- •

  **(-ENOTSUP) if underlying device does not support this functionality.**

- •

  **(-EINVAL) if** *table* **was not resized. If** *rule* **cannot be updated after** *table* **resize, unrecoverable** *table* **error.**

### \_\_rte\_experimental int rte\_flow\_template\_table\_resize\_complete (uint16\_t port\_id, struct rte\_flow\_template\_table \* table, struct rte\_flow\_error \* error)

**Warning**

**EXPERIMENTAL: this API may change without prior notice.**

**Resume normal operational mode after table was resized and table rules were updated for the new table configuration.**

**Parameters**

*port\_id* **Port identifier of Ethernet device.** \
 *table* **Template table that undergoing resize operation.** \
 *error* **Perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.**

**Returns**

- •

  **(0) if success.**

- •

  **(-ENODEV) if** *port\_id* **invalid.**

- •

  **(-ENOTSUP) if underlying device does not support this functionality.**

- •

  **(-EBUSY) if not all** *table* **rules were updated.**

- •

  **(-EINVAL) if** *table* **cannot complete table resize, unrecoverable error.**

## Variable Documentation

### const struct rte\_flow\_item\_quota rte\_flow\_item\_quota\_mask` [static]`

**Initial value:.PP**

```
= {
    .state = (enum rte_flow_quota_state)0xff
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_QUOTA**

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

### const struct rte\_flow\_item\_higig2\_hdr rte\_flow\_item\_higig2\_hdr\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr = {
        .ppt1 = {
            .classification = RTE_BE16(UINT16_MAX),
            .vid = RTE_BE16(0xfff),
        },
    },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_HIGIG2.**

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

### const struct rte\_flow\_item\_any rte\_flow\_item\_any\_mask` [static]`

**Initial value:.PP**

```
= {
    .num = 0x00000000,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_ANY.**

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

### const struct rte\_flow\_item\_port\_id rte\_flow\_item\_port\_id\_mask` [static]`

**Initial value:.PP**

```
= {
    .id = 0xffffffff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_PORT\_ID.**

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

### const struct rte\_flow\_item\_raw rte\_flow\_item\_raw\_mask` [static]`

**Initial value:.PP**

```
= {
    .relative = 1,
    .search = 1,
    .reserved = 0x3fffffff,
    .offset = 0xffffffff,
    .limit = 0xffff,
    .length = 0xffff,
    .pattern = NULL,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_RAW.**

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

### const struct rte\_flow\_item\_eth rte\_flow\_item\_eth\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
    .hdr.src_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
    .hdr.ether_type = RTE_BE16(0x0000),
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_ETH.**

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

### const struct rte\_flow\_item\_vlan rte\_flow\_item\_vlan\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr.vlan_tci = RTE_BE16(0x0fff),
    .hdr.eth_proto = RTE_BE16(0x0000),
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_VLAN.**

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

### const struct rte\_flow\_item\_ipv4 rte\_flow\_item\_ipv4\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr = {
        .src_addr = RTE_BE32(0xffffffff),
        .dst_addr = RTE_BE32(0xffffffff),
    },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_IPV4.**

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

### const struct rte\_flow\_item\_ipv6 rte\_flow\_item\_ipv6\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr = {
        .src_addr = RTE_IPV6_MASK_FULL,
        .dst_addr = RTE_IPV6_MASK_FULL,
    },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_IPV6.**

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

### const struct rte\_flow\_item\_icmp rte\_flow\_item\_icmp\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr = {
        .icmp_type = 0xff,
        .icmp_code = 0xff,
    },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_ICMP.**

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

### const struct rte\_flow\_item\_udp rte\_flow\_item\_udp\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr = {
        .src_port = RTE_BE16(0xffff),
        .dst_port = RTE_BE16(0xffff),
    },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_UDP.**

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

### const struct rte\_flow\_item\_tcp rte\_flow\_item\_tcp\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr = {
        .src_port = RTE_BE16(0xffff),
        .dst_port = RTE_BE16(0xffff),
    },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_TCP.**

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

### const struct rte\_flow\_item\_sctp rte\_flow\_item\_sctp\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr = {
        .src_port = RTE_BE16(0xffff),
        .dst_port = RTE_BE16(0xffff),
    },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_SCTP.**

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

### const struct rte\_flow\_item\_vxlan rte\_flow\_item\_vxlan\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr.vni = { 0xff, 0xff, 0xff },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_VXLAN.**

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

### const struct rte\_flow\_item\_e\_tag rte\_flow\_item\_e\_tag\_mask` [static]`

**Initial value:.PP**

```
= {
    .rsvd_grp_ecid_b = RTE_BE16(0x3fff),
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_E\_TAG.**

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

### const struct rte\_flow\_item\_nvgre rte\_flow\_item\_nvgre\_mask` [static]`

**Initial value:.PP**

```
= {
    .tni =  { 0xff, 0xff, 0xff },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_NVGRE.**

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

### const struct rte\_flow\_item\_mpls rte\_flow\_item\_mpls\_mask` [static]`

**Initial value:.PP**

```
= {
    .label_tc_s = { 0xff, 0xff, 0xf0 },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_MPLS.**

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

### const struct rte\_flow\_item\_gre rte\_flow\_item\_gre\_mask` [static]`

**Initial value:.PP**

```
= {
    .protocol = RTE_BE16(0xffff),
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_GRE.**

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

### const struct rte\_flow\_item\_fuzzy rte\_flow\_item\_fuzzy\_mask` [static]`

**Initial value:.PP**

```
= {
    .thresh = 0xffffffff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_FUZZY.**

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

### const struct rte\_flow\_item\_gtp rte\_flow\_item\_gtp\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr.teid = RTE_BE32(UINT32_MAX),
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_GTP.**

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

### const struct rte\_flow\_item\_esp rte\_flow\_item\_esp\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr = {
        .spi = RTE_BE32(0xffffffff),
    },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_ESP.**

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

### const struct rte\_flow\_item\_geneve rte\_flow\_item\_geneve\_mask` [static]`

**Initial value:.PP**

```
= {
    .vni =  { 0xff, 0xff, 0xff },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_GENEVE.**

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

### const struct rte\_flow\_item\_vxlan\_gpe rte\_flow\_item\_vxlan\_gpe\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr.vni =  { 0xff, 0xff, 0xff },
}
```

**Deprecated**

**See also**

**rte\_flow\_item\_vxlan\_mask**

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_VXLAN\_GPE.**

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

### const struct rte\_flow\_item\_arp\_eth\_ipv4 rte\_flow\_item\_arp\_eth\_ipv4\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr.arp_data.arp_sha.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
    .hdr.arp_data.arp_sip = RTE_BE32(UINT32_MAX),
    .hdr.arp_data.arp_tha.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
    .hdr.arp_data.arp_tip = RTE_BE32(UINT32_MAX),
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_ARP\_ETH\_IPV4.**

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

### const struct rte\_flow\_item\_ipv6\_ext rte\_flow\_item\_ipv6\_ext\_mask` [static]`

**Initial value:.PP**

```
= {
    .next_hdr = 0xff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_IPV6\_EXT.**

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

### const struct rte\_flow\_item\_icmp6 rte\_flow\_item\_icmp6\_mask` [static]`

**Initial value:.PP**

```
= {
    .type = 0xff,
    .code = 0xff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_ICMP6.**

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

### const struct rte\_flow\_item\_icmp6\_nd\_ns rte\_flow\_item\_icmp6\_nd\_ns\_mask` [static]`

**Initial value:.PP**

```
= {
    .target_addr = RTE_IPV6_MASK_FULL,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_NS.**

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

### const struct rte\_flow\_item\_icmp6\_nd\_na rte\_flow\_item\_icmp6\_nd\_na\_mask` [static]`

**Initial value:.PP**

```
= {
    .target_addr = RTE_IPV6_MASK_FULL,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_NA.**

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

### const struct rte\_flow\_item\_icmp6\_nd\_opt rte\_flow\_item\_icmp6\_nd\_opt\_mask` [static]`

**Initial value:.PP**

```
= {
    .type = 0xff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_OPT.**

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

### const struct rte\_flow\_item\_icmp6\_nd\_opt\_sla\_eth rte\_flow\_item\_icmp6\_nd\_opt\_sla\_eth\_mask` [static]`

**Initial value:.PP**

```
= {
    .sla.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_OPT\_SLA\_ETH.**

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

### const struct rte\_flow\_item\_icmp6\_nd\_opt\_tla\_eth rte\_flow\_item\_icmp6\_nd\_opt\_tla\_eth\_mask` [static]`

**Initial value:.PP**

```
= {
    .tla.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_ICMP6\_ND\_OPT\_TLA\_ETH.**

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

### const struct rte\_flow\_item\_meta rte\_flow\_item\_meta\_mask` [static]`

**Initial value:.PP**

```
= {
    .data = UINT32_MAX,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_META.**

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

### const struct rte\_flow\_item\_gtp\_psc rte\_flow\_item\_gtp\_psc\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr.qfi = 0x3f,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_GTP\_PSC.**

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

### const struct rte\_flow\_item\_pppoe\_proto\_id rte\_flow\_item\_pppoe\_proto\_id\_mask` [static]`

**Initial value:.PP**

```
= {
    .proto_id = RTE_BE16(0xffff),
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_PPPOE\_PROTO\_ID.**

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

### const struct rte\_flow\_item\_tag rte\_flow\_item\_tag\_mask` [static]`

**Initial value:.PP**

```
= {
    .data = 0xffffffff,
    .index = 0xff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_TAG.**

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

### const struct rte\_flow\_item\_l2tpv3oip rte\_flow\_item\_l2tpv3oip\_mask` [static]`

**Initial value:.PP**

```
= {
    .session_id = RTE_BE32(UINT32_MAX),
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_L2TPV3OIP.**

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

### const struct rte\_flow\_item\_mark rte\_flow\_item\_mark\_mask` [static]`

**Initial value:.PP**

```
= {
    .id = 0xffffffff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_MARK.**

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

### const struct rte\_flow\_item\_nsh rte\_flow\_item\_nsh\_mask` [static]`

**Initial value:.PP**

```
= {
    .mdtype = 0xf,
    .next_proto = 0xff,
    .spi = 0xffffff,
    .sindex = 0xff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_NSH.**

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

### const struct rte\_flow\_item\_igmp rte\_flow\_item\_igmp\_mask` [static]`

**Initial value:.PP**

```
= {
    .group_addr = 0xffffffff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_IGMP.**

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

### const struct rte\_flow\_item\_ah rte\_flow\_item\_ah\_mask` [static]`

**Initial value:.PP**

```
= {
    .spi = 0xffffffff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_AH.**

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

### const struct rte\_flow\_item\_pfcp rte\_flow\_item\_pfcp\_mask` [static]`

**Initial value:.PP**

```
= {
    .s_field = 0x01,
    .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)),
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_PFCP.**

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

### const struct rte\_flow\_item\_ecpri rte\_flow\_item\_ecpri\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr = {
        .common = {
            .u32 = 0x0,
        },
    },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_ECPRI.**

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

### const struct rte\_flow\_item\_geneve\_opt rte\_flow\_item\_geneve\_opt\_mask` [static]`

**Initial value:.PP**

```
= {
    .option_type = 0xff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_GENEVE\_OPT.**

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

### const struct rte\_flow\_item\_conntrack rte\_flow\_item\_conntrack\_mask` [static]`

**Initial value:.PP**

```
= {
    .flags = 0xffffffff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_CONNTRACK.**

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

### const struct rte\_flow\_item\_ethdev rte\_flow\_item\_ethdev\_mask` [static]`

**Initial value:.PP**

```
= {
    .port_id = 0xffff,
}
```

**Default mask for items based on struct rte\_flow\_item\_ethdev**

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

### const struct rte\_flow\_item\_l2tpv2 rte\_flow\_item\_l2tpv2\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr = {
        .common = {
            .flags_version = RTE_BE16(0xcb0f),
        },
    },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_L2TPV2.**

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

### const struct rte\_flow\_item\_ppp rte\_flow\_item\_ppp\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr = {
        .addr = 0xff,
        .ctrl = 0xff,
        .proto_id = RTE_BE16(0xffff),
    }
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_PPP.**

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

### const struct rte\_flow\_item\_ib\_bth rte\_flow\_item\_ib\_bth\_mask` [static]`

**Initial value:.PP**

```
= {
    .hdr = {
        .opcode = 0xff,
        .dst_qp =  { 0xff, 0xff, 0xff },
    },
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_IB\_BTH.**

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

### const struct rte\_flow\_item\_random rte\_flow\_item\_random\_mask` [static]`

**Initial value:.PP**

```
= {
    .value = UINT32_MAX,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_RANDOM.**

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

### const struct rte\_flow\_item\_meter\_color rte\_flow\_item\_meter\_color\_mask` [static]`

**Initial value:.PP**

```
= {
    .color = RTE_COLORS,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_METER\_COLOR.**

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

### const struct rte\_flow\_item\_aggr\_affinity rte\_flow\_item\_aggr\_affinity\_mask` [static]`

**Initial value:.PP**

```
= {
    .affinity = 0xff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_AGGR\_AFFINITY.**

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

### const struct rte\_flow\_item\_tx\_queue rte\_flow\_item\_tx\_queue\_mask` [static]`

**Initial value:.PP**

```
= {
    .tx_queue = 0xffff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TX\_QUEUE.**

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

### const struct rte\_flow\_item\_ptype rte\_flow\_item\_ptype\_mask` [static]`

**Initial value:.PP**

```
= {
    .packet_type = 0xffffffff,
}
```

**Default mask for RTE\_FLOW\_ITEM\_TYPE\_PTYPE.**

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

## Author

**Generated automatically by Doxygen for DPDK from the source code.**
