i40e_add_queue_stats(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 i40e_add_queue_stats(9) β€” like, the queue-stats copier πŸ’…

okay so bestie, welcome to section 9 of the Kernel API Manual, where we're talking about i40e_add_queue_stats β€” the little function that copies your queue statistics straight into the buffer you hand it. no cap, she's a team player. 🫢


✨ NAME ✨

i40e_add_queue_stats β€” copy queue statistics into supplied buffer


πŸ¦‹ SYNOPSIS πŸ¦‹

void i40e_add_queue_stats (u64 **data , struct i40e_ring *ring );

πŸŽ€ ARGUMENTS πŸŽ€

  • data β€” the ethtool stats buffer, aka where the numbers are gonna live
  • ring β€” the ring to copy, aka the source material πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so here's the vibe: queue statistics must be copied while they're protected by u64_stats_fetch_begin, which means we literally cannot just go straight to i40e_add_ethtool_stats β€” that would be a mess, and not the cute kind. πŸ™ˆ

This function operates on the assumption that the queue stats are defined in i40e_gstrings_queue_stats. iykyk.

Now, the branch moment:

  • if the ring pointer is null, we zero out the queue stat values and update the data pointer β€” clean slate, iconic ✨
  • otherwise, we safely copy the stats from the ring into the supplied buffer, and update the data pointer when we're finished πŸ’«
⚠️ heads up bestie β€” this function expects to be called while under rcu_read_lock. that's not optional, that's the whole vibe check. don't @ me.

πŸ”₯ SEE ALSO πŸ”₯


bestie, that's the whole page πŸ’œ it lives in ./drivers/net/ethernet/intel/i40e, dated October 2026, and yes it's i40e_add_queue_stats(9) β€” literally the main character of this manpage. slay, go protect your stats with rcu_read_lock, and drink some water. πŸ“βœ¨

πŸ“¦ where this page comes from