rte_eth_stats(3)
πΈ NAME πΈ
rte_eth_stats β bestie, it's a struct, and it's the one holding all your Ethernet port stats π
This page is from the DPDK Library Functions Manual, section 3, and it's literally just the glow-up guide to one little C struct. Living in rte_ethdev.h, serving numbers. Iconic behavior.
β¨ SYNOPSIS β¨
Pop it in like this:
#include <rte_ethdev.h>
π Data Fields π
eight of them, all uint64_t, all gorgeous:
uint64_t ipacketsuint64_t opacketsuint64_t ibytesuint64_t obytesuint64_t imisseduint64_t ierrorsuint64_t oerrorsuint64_t rx_nombuf
π¦ Detailed Description π¦
Okay so the vibe here is: this is a structure used to retrieve statistics for an Ethernet port. That's the whole job. Stats girl. π
BUT β and this is the part where I need you to lock in β not all statistics fields in struct rte_eth_stats are supported by any type of network interface card (NIC). Not every NIC is gonna hand you every number, no cap. And if any statistics field is not supported, its value is 0. So a zero doesn't always mean "nothing happened," bestie, sometimes it means "your hardware literally does not do this." Read that twice. π«Ά
Also, listen: all byte-related statistics do not include Ethernet FCS β regardless of whether these bytes have been delivered to the application (see RTE_ETH_RX_OFFLOAD_KEEP_CRC). So don't come for me with the byte-count math, the FCS is simply not in there. Periodt. π
Definition at line 262 of file rte_ethdev.h.
π Field Documentation π
Every single one of these little divas, in order:
uint64_t ipackets
Total number of successfully received packets. Successfully!! We love a W. β¨
Definition at line 263 of file rte_ethdev.h.
uint64_t opackets
Total number of successfully transmitted packets. Going out, looking cute, no drama. π
Definition at line 264 of file rte_ethdev.h.
uint64_t ibytes
Total number of successfully received bytes. The byte-counting counterpart to ipackets, she's thorough, she's precise. π₯
Definition at line 265 of file rte_ethdev.h.
uint64_t obytes
Total number of successfully transmitted bytes. Sending it, and sending it successfully. π
Definition at line 266 of file rte_ethdev.h.
uint64_t imissed
Total of Rx packets dropped by the HW, because there are no available buffer (i.e. Rx queues are full). π
So this is the "the queues were full, nothing to put your packet in, hardware said bye" counter. It's a hardware-side drop, not a software girlboss move. If this number is climbing, your Rx queues are literally full, and that is a vibe check you need to pass. π
Definition at line 271 of file rte_ethdev.h.
uint64_t ierrors
Total number of erroneous received packets. Messy incoming. Not slay. π
Definition at line 272 of file rte_ethdev.h.
uint64_t oerrors
Total number of failed transmitted packets. The sends that did not make it out the door. We don't talk about them, but we do count them. π
Definition at line 273 of file rte_ethdev.h.
uint64_t rx_nombuf
Total number of Rx mbuf allocation failures. Ran out of mbufs on the receive side β that's a whole mood and it's not a good one. π«
Definition at line 274 of file rte_ethdev.h.
π Author π
Generated automatically by Doxygen for DPDK from the source code. So like, a robot wrote my homework, but bestie, the robot ate. π
And that's the whole page!! Thanks for reading β this was DPDK Version 25.11.3, rte_eth_stats(3), and if you scrolled all the way down here just to hang out with me, you're my favorite. Go count your packets. πβ¨π
π¦ 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