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

# RTE\_PMD\_DLB2\_SET\_QE\_WEIGHT(3)

DLB PMD-specific functions.

Part of [rte\_pmd\_dlb2.h(3)](/rte_pmd_dlb2.h/3.md).

## NAME

rte\_pmd\_dlb2.h - DLB PMD-specific functions.

## SYNOPSIS

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

### Macros

\#define **RTE\_PMD\_DLB2\_GET\_QID\_DEPTH**(x)   ((x)-\>rsvd & 0x3)\
 \#define **RTE\_PMD\_DLB2\_SET\_QID\_DEPTH**(x,  v)   ((x)-\>rsvd = ((x)-\>rsvd & ~0x3) \| (v & 0x3))\
 \#define **RTE\_PMD\_DLB2\_GET\_QE\_WEIGHT**(x)   (((x)-\>rsvd \>\> 2) & 0x3)\
 \#define **RTE\_PMD\_DLB2\_SET\_QE\_WEIGHT**(x,  v)   ((x)-\>rsvd = ((x)-\>rsvd & 0x3) \| ((v & 0x3) \<\< 2))\

### Enumerations

enum **rte\_pmd\_dlb2\_token\_pop\_mode** \

### Functions

\_\_rte\_experimental int **rte\_pmd\_dlb2\_set\_token\_pop\_mode** (uint8\_t dev\_id, uint8\_t port\_id, enum **rte\_pmd\_dlb2\_token\_pop\_mode** mode)\

## Detailed Description

DLB PMD-specific functions.

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

## Macro Definition Documentation

### #define RTE\_PMD\_DLB2\_GET\_QID\_DEPTH(x) ((x)-\>rsvd & 0x3)

Macro function to get QID depth of **rte\_event** metadata. Currently lower 2 bits of 'rsvd' field are used to store QID depth.

Definition at line **26** of file **rte\_pmd\_dlb2.h**.

### #define RTE\_PMD\_DLB2\_SET\_QID\_DEPTH(x, v) ((x)-\>rsvd = ((x)-\>rsvd & ~0x3) \| (v & 0x3))

Macro function to set QID depth of **rte\_event** metadata. Currently lower 2 bits of 'rsvd' field are used to store QID depth.

Definition at line **32** of file **rte\_pmd\_dlb2.h**.

### #define RTE\_PMD\_DLB2\_GET\_QE\_WEIGHT(x) (((x)-\>rsvd \>\> 2) & 0x3)

Macro function to get QE weight from **rte\_event** metadata. Currently upper 2 bits of 'rsvd' field are used to store QE weight.

Definition at line **38** of file **rte\_pmd\_dlb2.h**.

### #define RTE\_PMD\_DLB2\_SET\_QE\_WEIGHT(x, v) ((x)-\>rsvd = ((x)-\>rsvd & 0x3) \| ((v & 0x3) \<\< 2))

Macro function to set QE weight from **rte\_event** metadata. Currently upper 2 bits of 'rsvd' field are used to store QE weight.

Definition at line **44** of file **rte\_pmd\_dlb2.h**.

## Enumeration Type Documentation

### enum rte\_pmd\_dlb2\_token\_pop\_mode

**Warning**

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

Selects the token pop mode for a DLB2 port.

Definition at line **52** of file **rte\_pmd\_dlb2.h**.

## Function Documentation

### \_\_rte\_experimental int rte\_pmd\_dlb2\_set\_token\_pop\_mode (uint8\_t dev\_id, uint8\_t port\_id, enum rte\_pmd\_dlb2\_token\_pop\_mode mode)

**Warning**

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

Configure the token pop mode for a DLB2 port. By default, all ports use RTE\_PMD\_DLB2\_AUTO\_POP. This function must be called before calling **rte\_event\_port\_setup()** for the port, but after calling **rte\_event\_dev\_configure()**.

**Parameters**

*dev\_id* The identifier of the event device. \
 *port\_id* The identifier of the event port. \
 *mode* The token pop mode.

**Returns**

- •

  0: Success

- •

  EINVAL: Invalid parameter dev\_id, port\_id, or mode

- •

  EINVAL: The DLB2 device is not configured or is already running, or the port is already setup

## Author

Generated automatically by Doxygen for DPDK from the source code.
