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

# rte\_tm\_ops\_get(3)

Part of [rte\_tm\_driver.h(3)](/rte_tm_driver.h/3.md).

## NAME

rte\_tm\_driver.h

## SYNOPSIS

`#include <stdint.h>`\
 `#include <rte_errno.h>`\
 `#include 'rte_ethdev.h'`\
 `#include 'ethdev_driver.h'`\
 `#include 'rte_tm.h'`\

### Functions

static int **rte\_tm\_error\_set** (struct **rte\_tm\_error** \*error, int code, enum **rte\_tm\_error\_type** type, const void \*cause, const char \*message)\
 const struct rte\_tm\_ops \* **rte\_tm\_ops\_get** (uint16\_t port\_id, struct **rte\_tm\_error** \*error)\

## Detailed Description

RTE Generic Traffic Manager API (Driver Side)

This file provides implementation helpers for internal use by PMDs, they are not intended to be exposed to applications and are not subject to ABI versioning.

Definition in file **rte\_tm\_driver.h**.

## Function Documentation

### static int rte\_tm\_error\_set (struct rte\_tm\_error \* error, int code, enum rte\_tm\_error\_type type, const void \* cause, const char \* message)` [inline]`, ` [static]`

Initialize generic error structure.

This function also sets rte\_errno to a given value.

**Parameters**

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

**Returns**

Error code.

Definition at line **314** of file **rte\_tm\_driver.h**.

### const struct rte\_tm\_ops \* rte\_tm\_ops\_get (uint16\_t port\_id, struct rte\_tm\_error \* error)

Get generic traffic manager operations structure from a port

**Parameters**

*port\_id* The port identifier of the Ethernet device. \
 *error* Error details

**Returns**

The traffic manager operations structure associated with port\_id on success, NULL otherwise.

## Author

Generated automatically by Doxygen for DPDK from the source code.
