DPDK 22.11.5
Functions
rte_tm_driver.h File Reference
#include <stdint.h>
#include <rte_errno.h>
#include "rte_ethdev.h"
#include "ethdev_driver.h"
#include "rte_tm.h"

Go to the source code of this file.

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

◆ rte_tm_error_set()

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 
)
inlinestatic

Initialize generic error structure.

This function also sets rte_errno to a given value.

Parameters
[out]errorPointer to error structure (may be NULL).
[in]codeRelated error code (rte_errno).
[in]typeCause field and error type.
[in]causeObject responsible for the error.
[in]messageHuman-readable error message.
Returns
Error code.

Definition at line 302 of file rte_tm_driver.h.

◆ rte_tm_ops_get()

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
[in]port_idThe port identifier of the Ethernet device.
[out]errorError details
Returns
The traffic manager operations structure associated with port_id on success, NULL otherwise.