---
name: "rte_tm_shaper_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_tm_shaper_params"
---

# rte\_tm\_shaper\_params(3)

## NAME

rte\_tm\_shaper\_params

## SYNOPSIS

`#include <rte_tm.h>`

### Data Fields

struct **rte\_tm\_token\_bucket** **committed**\
 struct **rte\_tm\_token\_bucket** **peak**\
 int32\_t **pkt\_length\_adjust**\
 int **packet\_mode**\

## Detailed Description

Shaper (rate limiter) profile

Multiple shaper instances can share the same shaper profile. Each node has zero or one private shaper (only one node using it) and/or zero, one or several shared shapers (multiple nodes use the same shaper instance). A private shaper is used to perform traffic shaping for a single node, while a shared shaper is used to perform traffic shaping for a group of nodes.

Single rate shapers use a single token bucket. A single rate shaper can be configured by setting the rate of the committed bucket to zero, which effectively disables this bucket. The peak bucket is used to limit the rate and the burst size for the current shaper.

Dual rate shapers use both the committed and the peak token buckets. The rate of the peak bucket has to be bigger than zero, as well as greater than or equal to the rate of the committed bucket.

**See also**

struct **rte\_tm\_capabilities::shaper\_private\_packet\_mode\_supported**

struct **rte\_tm\_capabilities::shaper\_private\_byte\_mode\_supported**

struct **rte\_tm\_capabilities::shaper\_shared\_packet\_mode\_supported**

struct **rte\_tm\_capabilities::shaper\_shared\_byte\_mode\_supported**

Definition at line **1039** of file **rte\_tm.h**.

## Field Documentation

### struct rte\_tm\_token\_bucket committed

Committed token bucket

Definition at line **1041** of file **rte\_tm.h**.

### struct rte\_tm\_token\_bucket peak

Peak token bucket

Definition at line **1044** of file **rte\_tm.h**.

### int32\_t pkt\_length\_adjust

Signed value to be added to the length of each packet for the purpose of shaping. Can be used to correct the packet length with the framing overhead bytes that are also consumed on the wire (e.g. RTE\_TM\_ETH\_FRAMING\_OVERHEAD\_FCS). This field is ignored when the profile enables packet mode.

Definition at line **1052** of file **rte\_tm.h**.

### int packet\_mode

When zero, the byte mode is enabled for the current profile, so the *rate* and *size* fields in both the committed and peak token buckets are specified in bytes per second and bytes, respectively. When non-zero, the packet mode is enabled for the current profile, so the *rate* and *size* fields in both the committed and peak token buckets are specified in packets per second and packets, respectively.

Definition at line **1062** of file **rte\_tm.h**.

## Author

Generated automatically by Doxygen for DPDK from the source code.
