rte_mtr_driver.h(3)
π rte_mtr_driver.h π
okay bestie, we're in rte_mtr_driver.h(3) territory β that's section 3 of the Library Functions Manual, iykyk. this is the RTE Generic Traffic Metering and Policing API, driver side, and it's giving very much "internal use only" energy. let's get into it π«Ά
β¨ NAME β¨
rte_mtr_driver.h β the header itself, that's it, that's the name, periodt.
πΈ SYNOPSIS πΈ
first thing you're gonna do is pull in your lil friends:
#include <stdint.h>
#include <rte_errno.h>
#include 'rte_ethdev.h'
#include 'ethdev_driver.h'
#include 'rte_mtr.h'
π Functions π
here's the roster, bestie:
static int rte_mtr_error_set (struct rte_mtr_error *error, int code,
enum rte_mtr_error_type type, const void *cause, const char
*message)
const struct rte_mtr_ops * rte_mtr_ops_get (uint16_t port_id, struct
rte_mtr_error *error)
two functions. that's the whole menu. short and iconic β¨
π¦ Detailed Description π¦
so this is the RTE Generic Traffic Metering and Policing API (Driver Side). say that five times fast, no cap.
the tea: this file provides implementation helpers for internal use by PMDs. they are not intended to be exposed to applications, and they are not subject to ABI versioning. so if you're an app developer thinking "ooh cute, let me call these" β bestie, no. π that's not your lane. these are for PMDs only.
Definition in file rte_mtr_driver.h.
π Function Documentation π
π int rte_mtr_error_set (struct rte_mtr_error * error, int code, enum rte_mtr_error_type type, const void * cause, const char * message)
[inline], [static] β yeah she's both, she's got range π
Initialize generic error structure.
and she doesn't stop there β this function also sets rte_errno to a given value. multitasking queen.
Parameters
errorβ Pointer to error structure (may beNULL).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 238 of file rte_mtr_driver.h.
π const struct rte_mtr_ops * rte_mtr_ops_get (uint16_t port_id, struct rte_mtr_error * error)
Get generic traffic metering and policing operations structure from a port.
you hand her a port, she hands you the ops struct. that's the whole vibe check. π₯
Parameters
port_idβ The port identifier of the Ethernet device.errorβ Error details.
Returns
- The traffic metering and policing operations structure associated with
port_idon success,NULLotherwise.
π Author π
Generated automatically by Doxygen for DPDK from the source code. so nobody actually hand-wrote this, it's a robot's icon behavior, we respect it. π€β¨
and that's the whole page bestie, we ate and left no crumbs ππ
π cute lil sign-off: this was DPDK, Version 25.11.3, serving rte_mtr_driver.h(3) realness. mwah. π
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms