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

# rte\_pmd\_dpaa2.h(3)

## NAME

rte\_pmd\_dpaa2.h

## SYNOPSIS

`#include <rte_compat.h>`\
 `#include <rte_flow.h>`\

### Functions

int **rte\_pmd\_dpaa2\_mux\_flow\_create** (uint32\_t dpdmux\_id, struct **rte\_flow\_item** pattern\[\], struct **rte\_flow\_action** actions\[\])\
 \_\_rte\_experimental void **rte\_pmd\_dpaa2\_mux\_dump\_counter** (FILE \*f, uint32\_t dpdmux\_id, int num\_if)\
 \_\_rte\_experimental int **rte\_pmd\_dpaa2\_mux\_rx\_frame\_len** (uint32\_t dpdmux\_id, uint16\_t max\_rx\_frame\_len)\
 int **rte\_pmd\_dpaa2\_set\_custom\_hash** (uint16\_t port\_id, uint16\_t offset, uint8\_t size)\
 \_\_rte\_experimental void **rte\_pmd\_dpaa2\_thread\_init** (void)\
 \_\_rte\_experimental uint32\_t **rte\_pmd\_dpaa2\_get\_tlu\_hash** (uint8\_t \*key, int size)\

## Detailed Description

NXP dpaa2 PMD specific functions.

Definition in file **rte\_pmd\_dpaa2.h**.

## Function Documentation

### int rte\_pmd\_dpaa2\_mux\_flow\_create (uint32\_t dpdmux\_id, struct rte\_flow\_item pattern\[\], struct rte\_flow\_action actions\[\])

Create a flow rule to demultiplex ethernet traffic to separate network interfaces.

**Parameters**

*dpdmux\_id* ID of the DPDMUX MC object. \
 *pattern* Pattern specification. \
 *actions* Associated actions.

**Returns**

0 in case of success, otherwise failure.

### \_\_rte\_experimental void rte\_pmd\_dpaa2\_mux\_dump\_counter (FILE \* f, uint32\_t dpdmux\_id, int num\_if)

**Warning**

**EXPERIMENTAL:** this API may change, or be removed, without prior notice

Dump demultiplex ethernet traffic counters

**Parameters**

*f* output stream \
 *dpdmux\_id* ID of the DPDMUX MC object. \
 *num\_if* number of interface in dpdmux object

### \_\_rte\_experimental int rte\_pmd\_dpaa2\_mux\_rx\_frame\_len (uint32\_t dpdmux\_id, uint16\_t max\_rx\_frame\_len)

**Warning**

**EXPERIMENTAL:** this API may change, or be removed, without prior notice

demultiplex interface max rx frame length configure

**Parameters**

*dpdmux\_id* ID of the DPDMUX MC object. \
 *max\_rx\_frame\_len* maximum receive frame length (will be checked to be minimux of all dpnis)

### int rte\_pmd\_dpaa2\_set\_custom\_hash (uint16\_t port\_id, uint16\_t offset, uint8\_t size)

Create a custom hash key on basis of offset of start of packet and size. for e.g. if we need GRE packets (non-vlan and without any extra headers) to be hashed on basis of inner IP header, we will provide offset as: 14 (eth) + 20 (IP) + 4 (GRE) + 12 (Inner Src offset) = 50 and size as 8 bytes.

**Parameters**

*port\_id* The port identifier of the Ethernet device. \
 *offset* Offset from the start of packet which needs to be included to calculate hash \
 *size* Size of the hash input key

**Returns**

- •

  0 if successful.

- •

  Negative in case of failure.

### \_\_rte\_experimental void rte\_pmd\_dpaa2\_thread\_init (void)

**Warning**

**EXPERIMENTAL:** this API may change, or be removed, without prior notice

Do thread specific initialization

### \_\_rte\_experimental uint32\_t rte\_pmd\_dpaa2\_get\_tlu\_hash (uint8\_t \* key, int size)

**Warning**

**EXPERIMENTAL:** this API may change, or be removed, without prior notice

Generate the DPAA2 WRIOP based hash value

**Parameters**

*key* Array of key data \
 *size* Size of the hash input key in bytes

**Returns**

- •

  0 if successful.

- •

  Negative in case of failure.

## Author

Generated automatically by Doxygen for DPDK from the source code.
