efx_nic_describe_stats(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… efx_nic_describe_stats(9) β€” Kernel API Manual πŸŽ€

okay so bestie, welcome to the efx_nic_describe_stats page, straight out of the Kernel API Manual ✨ this one's a lil function that describes supported statistics for ethtool, and honestly? it's giving "small but iconic." no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

size_t efx_nic_describe_stats (const struct efx_hw_stat_desc *desc ,
       size_t count , const unsigned long *mask , u8 **names );

that's the whole vibe. four args, one size_t coming back at you. periodt. πŸ’«


🌸 ARGUMENTS 🌸

  • desc β€” the array of struct efx_hw_stat_desc that's out here describing the statistics. it's the main character of this operation, ngl. πŸ‘‘
  • count β€” the length of the desc array. like, how many besties are in the group chat. πŸ”’
  • mask β€” a bitmask of which elements of desc are enabled. which ones made the cut, fr fr. βœ…
  • names β€” a buffer to copy names to, or NULL. and listen: the names get copied starting at intervals of ETH_GSTRING_LEN bytes. that spacing detail is important, don't sleep on it. 🫢

✨ DESCRIPTION ✨

so what does it actually do?? it returns the number of visible statistics β€” meaning the number of set bits in the first count bits of mask for which a name is defined. that's the whole deal. set bit + name exists = counted. πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

go read those too, they're literally the friends of this function. squad goals. 🌈


πŸ’€ tiny reminder bestie: if names is NULL, that's a whole valid mood β€” the function still tells you the count. just don't go dereferencing nothing, iykyk. πŸ™ˆ

mwah πŸ’‹ that's the page! this lil slice of kernel wisdom lives at ./drivers/net/ethernet/sfc, dated October 2026, and it's signed off as efx_nic_describe_stats(9) β€” go forth and count your bits, bestie πŸ§šβ€β™€οΈπŸ’œπŸŒΈ

πŸ“¦ where this page comes from