__i40e_add_ethtool_stats(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 __i40e_add_ethtool_stats β€” the Kernel API Manual bestie era 🌸

okay so welcome to the <pink>Kernel API Manual</pink> entry for __i40e_add_ethtool_stats(9), and honestly? she's a little copy-paste gremlin and we love her for it πŸ’…


✨ NAME ✨

__i40e_add_ethtool_stats β€” copy stats into the ethtool supplied buffer πŸ’«

literally that's the whole job. copying stats. into a buffer. that ethtool handed over. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

void __i40e_add_ethtool_stats (u64 **data , void *pointer , const struct
i40e_stats stats[] , const unsigned int size );

yes the spacing is exactly like that, do not come for me, that's how it's written in the source and we respect the source 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • data β€” the ethtool stats buffer, aka the destination of the whole situation πŸ’–
  • pointer β€” location to copy stats from, aka the vibe source πŸ”₯
  • stats β€” array of stats to copy, the actual menu of what's going down
  • size β€” the size of the stats definition, because we gotta know how much we're working with πŸ‘‘

🌈 DESCRIPTION 🌈

okay bestie, storytime. this function copies the stats defined by the stats array, using pointer as the base, into the data buffer that ethtool supplied. it's giving "assemble the receipt" energy 🧾✨

and here's the iconic part: it updates the data pointer so it points at the next empty location β€” which is exactly why you can keep calling __i40e_add_ethtool_stats again and again and the stats just keep stacking up, one after another. no bookkeeping needed on your end, she handles the pointer for you πŸ˜­πŸ’œ

🚨 but the plot twist: if pointer is null, she sets the data values to zero and updates the pointer to skip these stats entirely. no pointer, no stats, just zeros and moving on. periodt. πŸ’€

⭐ SEE ALSO ⭐

the whole friend group, in the exact order they appear, and yes i'm listing every single one because we don't do "etc." in this house πŸŽ€


πŸ’– cute lil sign-off πŸ’–

this icon lives in <lavender>./drivers/net/ethernet/intel/i40e</lavender> and the docs are dated <yellow>October 2026</yellow> 🌸 go read the neighbors, they're all equally unhinged and equally important. mwah, bye bestie πŸ«Άβœ¨πŸ’…

πŸ“¦ where this page comes from