i40e_add_ethtool_stats(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– i40e_add_ethtool_stats β€” the kernel API manual, bestie edition πŸŽ€

Okay so this is a page from the Kernel API Manual, and honestly? It's a little macro with main character energy. Let's get into it ✨


🌸 NAME 🌸

i40e_add_ethtool_stats β€” literally just copy stats into the ethtool-supplied buffer, that's the whole vibe 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

i40e_add_ethtool_stats (data , pointer , stats );

⭐ ARGUMENTS ⭐

  • data β€” the ethtool stats buffer, i.e. the lil destination situation πŸ’…
  • pointer β€” where the stats are actually stored
  • stats β€” a static const array of stat definitions, iconic

✨ DESCRIPTION ✨

So this is a macro to make using __i40e_add_ethtool_stats way easier πŸ’– It takes a static constant stats array and passes along the ARRAY_SIZE.

Why do we love her? Because she avoids typos β€” she makes sure we're passing the size that actually goes with the given stats array. No mismatched sizes, no chaos, no cap. πŸ‘‘

⚠️ Heads up bestie: the parameter stats is evaluated twice, so avoid parameters with side effects. Not me warning you twice because she gets read twice πŸ˜­πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/net/ethernet/intel/i40e/i40e_ethtool.c, plus struct i40e_stats(9) and honestly a whole friend group of functions:


🧚 Sign-off 🧚

This one came from ./drivers/net/ethernet/intel/i40e, dated October 2026 β€” and the manual name, in case you forgot, is i40e_add_ethtool_stats(9). Bye bestie, go pass those ARRAY_SIZEs correctly πŸ’œπŸŽ€

πŸ“¦ where this page comes from