---
name: "rte_mtr_params"
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_mtr_params"
---

# rte\_mtr\_params(3)

## NAME

rte\_mtr\_params

## SYNOPSIS

`#include <rte_mtr.h>`

### Data Fields

uint32\_t **meter\_profile\_id**\
 int **use\_prev\_mtr\_color**\
 enum **rte\_color** \* **dscp\_table**\
 enum **rte\_color** \* **vlan\_table**\
 int **meter\_enable**\
 uint64\_t **stats\_mask**\
 uint32\_t **meter\_policy\_id**\
 enum **rte\_color** **default\_input\_color**\

## Detailed Description

Parameters for each traffic metering & policing object

**See also**

enum **rte\_mtr\_stats\_type**

Definition at line **264** of file **rte\_mtr.h**.

## Field Documentation

### uint32\_t meter\_profile\_id

Meter profile ID.

**See also**

**rte\_mtr\_meter\_profile\_add()**

Definition at line **266** of file **rte\_mtr.h**.

### int use\_prev\_mtr\_color

Meter input color in case of MTR object chaining. When non-zero: if a previous MTR object is enabled in the same flow, then the color determined by the latest MTR object in the same flow is used as the input color by the current MTR object, otherwise the current MTR object uses the *dscp\_table* to determine the input color. When zero: the color determined by any previous MTR object in same flow is ignored by the current MTR object, which uses the *dscp\_table* to determine the input color.

Definition at line **277** of file **rte\_mtr.h**.

### enum rte\_color\* dscp\_table

Meter input color based on IP DSCP protocol field.

Valid when *input\_color\_proto\_mask* set to any of the following RTE\_MTR\_COLOR\_IN\_PROTO\_OUTER\_IP, RTE\_MTR\_COLOR\_IN\_PROTO\_INNER\_IP

When non-NULL: it points to a pre-allocated and pre-populated table with exactly 64 elements providing the input color for each value of the IPv4/IPv6 Differentiated Services Code Point (DSCP) input packet field.

When NULL: it is equivalent to setting this parameter to an all-green populated table (i.e. table with all the 64 elements set to green color). The color blind mode is configured by setting *use\_prev\_mtr\_color* to 0 and *dscp\_table* to either NULL or to an all-green populated table.

When *use\_prev\_mtr\_color* is non-zero value or when *dscp\_table* contains at least one yellow or red color element, then the color aware mode is configured.

**See also**

enum rte\_mtr\_color\_in\_protocol::RTE\_MTR\_COLOR\_IN\_PROTO\_OUTER\_IP

enum rte\_mtr\_color\_in\_protocol::RTE\_MTR\_COLOR\_IN\_PROTO\_INNER\_IP

struct rte\_mtr\_params::input\_color\_proto\_mask

Definition at line **304** of file **rte\_mtr.h**.

### enum rte\_color\* vlan\_table

Meter input color based on VLAN DEI(1bit), PCP(3 bits) protocol fields.

Valid when *input\_color\_proto\_mask* set to any of the following RTE\_MTR\_COLOR\_IN\_PROTO\_OUTER\_VLAN, RTE\_MTR\_COLOR\_IN\_PROTO\_INNER\_VLAN

When non-NULL: it points to a pre-allocated and pre-populated table with exactly 16 elements providing the input color for each value of the DEI(1bit), PCP(3 bits) input packet field.

When NULL: it is equivalent to setting this parameter to an all-green populated table (i.e. table with all the 16 elements set to green color). The color blind mode is configured by setting *use\_prev\_mtr\_color* to 0 and *vlan\_table* to either NULL or to an all-green populated table.

When *use\_prev\_mtr\_color* is non-zero value or when *vlan\_table* contains at least one yellow or red color element, then the color aware mode is configured.

**See also**

enum rte\_mtr\_color\_in\_protocol::RTE\_MTR\_COLOR\_IN\_PROTO\_OUTER\_VLAN

enum rte\_mtr\_color\_in\_protocol::RTE\_MTR\_COLOR\_IN\_PROTO\_INNER\_VLAN

struct rte\_mtr\_params::input\_color\_proto\_mask

Definition at line **330** of file **rte\_mtr.h**.

### int meter\_enable

Non-zero to enable the meter, zero to disable the meter at the time of MTR object creation. Ignored when the meter profile indicated by *meter\_profile\_id* is set to NONE.

**See also**

**rte\_mtr\_meter\_disable()**

Definition at line **336** of file **rte\_mtr.h**.

### uint64\_t stats\_mask

Set of stats counters to be enabled.

**See also**

enum **rte\_mtr\_stats\_type**

Definition at line **341** of file **rte\_mtr.h**.

### uint32\_t meter\_policy\_id

Meter policy ID.

**See also**

**rte\_mtr\_meter\_policy\_add()**

Definition at line **344** of file **rte\_mtr.h**.

### enum rte\_color default\_input\_color

Input color to be set for the input packet when none of the enabled input color methods is applicable to the input packet. Ignored when this when *input\_color\_proto\_mask* set to zero.

Definition at line **350** of file **rte\_mtr.h**.

## Author

Generated automatically by Doxygen for DPDK from the source code.
