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 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 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_id on success, NULL otherwise.

πŸ’œ 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