i40e_get_ethtool_stats(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… i40e_get_ethtool_stats(9) β€” the Kernel API Manual glow-up ✨

okay so bestie, welcome to the Kernel API Manual page for i40e_get_ethtool_stats(9). yes that's the whole title, she's long, she's iconic, we move πŸŽ€


✨ NAME ✨

i40e_get_ethtool_stats β€” copy stat values into the buffer you supplied, no cap πŸ’«


πŸ¦‹ SYNOPSIS πŸ¦‹

void i40e_get_ethtool_stats (struct net_device *netdev , struct
       ethtool_stats *stats , u64 *data );

like, that's the whole signature. three args, void return, she simply does the thing and leaves 🌸


πŸŽ€ ARGUMENTS πŸŽ€

  • netdev β€” the netdev we're collecting stats for. the main character, basically πŸ‘‘
  • stats β€” the ethtool stats command structure. she's the messenger 🧚
  • data β€” the buffer that ethtool handed over. this is where the numbers go πŸ“

πŸ’– DESCRIPTION πŸ’–

so here's the vibe: this function copies the stats values for this netdev into the buffer. that's it. that's the whole job 🫢

but listen β€” it expects data to be pre-allocated to the size returned by i40e_get_stats_count. so like, don't come in here with a tiny buffer and act surprised, okay? 😭

also, and this is the important part: all statistics must be copied in a static order, and the count must not change for a given netdev. fr fr, that's a hard requirement. see i40e_get_stats_count for more details β€” she's the one who explains the whole ordering situation πŸ’…

and if a statistic is not currently valid β€” like, say, a disabled queue β€” this function just reports its value as zero. no drama, no error, just 0. lowkey elegant 🌈


πŸ”₯ SEE ALSO πŸ”₯

the whole girlies' group chat, in the kernel file ./drivers/net/ethernet/intel/i40e/i40e_ethtool.c:

like, that's a lot of friends. she's popular πŸ’€


mwah, that's the page! πŸ’œ this little love letter lives in ./drivers/net/ethernet/intel/i40e and it's dated October 2026 β€” slay, she's timeless β­πŸ¦‹

πŸ“¦ where this page comes from