iavf_add_queue_stats(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… iavf_add_queue_stats(9) πŸ’…

ok so this is a page from the Kernel API Manual β€” it's iavf_add_queue_stats, and it's literally the function that copies your queue stats into the buffer you hand it. bestie, it's giving "tiny but essential" πŸŽ€


✨ NAME ✨

iavf_add_queue_stats β€” copy queue statistics into supplied buffer πŸ’–


🌸 SYNOPSIS 🌸

void iavf_add_queue_stats (u64 **data , struct iavf_ring *ring );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • data β€” the ethtool stats buffer 🫢 this is where the numbers go, and yeah, it's a u64 ** because the pointer gets bumped along as we fill.
  • ring β€” the ring to copy πŸ‘‘ that's the source of truth for the queue stats.

πŸ’€ DESCRIPTION πŸ’€

ok so here's the whole situation, and it's actually kind of important, so pay attention πŸ™ˆ

Queue statistics must be copied while protected by u64_stats_fetch_begin, which means we can't just directly use iavf_add_ethtool_stats. like, we literally can't, no cap. so this function exists to do it the safe way ✨

It assumes that the queue stats are defined in iavf_gstrings_queue_stats. if they're not β€” that's on you, not on this function πŸ’…

Now, the two paths:

  • If the ring pointer is null, it zeroes out the queue stat values and updates the data pointer.
  • Otherwise, it safely copies the stats from the ring into the supplied buffer, and updates the data pointer when finished.
⚠️ big one: this function expects to be called while under rcu_read_lock. like, that's not optional, bestie. don't call it without that lock or it's gonna be a bad time 😭

🌈 SEE ALSO 🌈


and that's the whole page, bestie πŸ’œ this one lives in ./drivers/net/ethernet/intel/iavf, dated October 2026 β€” go forth and copy those stats safely under your rcu lock, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from