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 ipackets
  • uint64_t opackets
  • uint64_t ibytes
  • uint64_t obytes
  • uint64_t imissed
  • uint64_t ierrors
  • uint64_t oerrors
  • uint64_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