rte_mtr_error(3)

πŸ’– rte_mtr_error πŸ’–

okay bestie, gather round, because today we're getting into rte_mtr_error(3) from the DPDK Library Functions Manual and honestly? it's giving "small struct, big feelings" ✨


🌸 NAME 🌸

rte_mtr_error β€” the little struct that tells you what went wrong when your traffic metering shenanigans go sideways 🫢


✨ SYNOPSIS ✨

#include <rte_mtr.h>

πŸŽ€ Data Fields

  • enum rte_mtr_error_type type
  • const void * cause
  • const char * message

πŸ¦‹ Detailed Description πŸ¦‹

It's a verbose error structure definition, periodt. Like, she's not just a vibes-only "something broke" β€” she tells the whole story πŸ’…

So here's the tea: this object is normally allocated by applications and set by PMDs, and the message points to a constant string which does not need to be freed by the application. Iconic, no cleanup required, we love that for us πŸŽ€

But (and this is the part where you go 😭) its pointer can be considered valid only as long as its associated DPDK port remains configured. Closing the underlying device or unloading the PMD invalidates it. So don't be holding onto that pointer like it's your emotional support bestie after the port's gone β€” she's gone too πŸ’€

And listen: both cause and message may be NULL regardless of the error type. Yep, even when there's an error type. No cap. πŸ™ˆ

Definition at line 554 of file rte_mtr.h.

πŸ‘‘ Field Documentation πŸ‘‘

🌈 enum rte_mtr_error_type type

Cause field and error type. That's the "what kind of problem are we having today" field πŸ’œ

Definition at line 555 of file rte_mtr.h.

🌸 const void* cause

Object responsible for the error. The literal culprit. The main character of the crime scene πŸ”₯

Definition at line 556 of file rte_mtr.h.

πŸ“ const char* message

Human-readable error message β€” aka the part you actually read instead of squinting at numbers ✨

Definition at line 557 of file rte_mtr.h.

⭐ Author ⭐

Generated automatically by Doxygen for DPDK from the source code. (Not a human author, just a very productive robot 🧚)


okay that's the whole page, bestie, you ate that 🫢 and just so we're keeping receipts: this was auto-magic'd out of the DPDK docs, Version 25.11.3, so if you're on a different version, vibe check your own headers first πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from