i40e_stat_update48(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… i40e_stat_update48(9) β€” the manual page, bestie edition πŸŽ€

okay so this is i40e_stat_update48(9) from the Kernel API Manual, and honestly? it's a little 48-bit legend. she reads a chip stat, she keeps it honest, she slays. let's get into it ✨


🌸 NAME 🌸

i40e_stat_update48 β€” read and update a 48 bit stat from the chip. that's it, that's her whole job πŸ’–


✨ SYNOPSIS ✨

void i40e_stat_update48 (struct i40e_hw *hw , u32 hireg , u32 loreg ,
bool offset_loaded , u64 *offset , u64 *stat );

like, that's the whole vibe check right there πŸ‘‘


🫢 ARGUMENTS 🫢

  • hw β€” ptr to the hardware info. the main character struct, we love her πŸ’œ
  • hireg β€” the high 32 bit reg to read. the upper half, highkey important πŸ”₯
  • loreg β€” the low 32 bit reg to read. the lower half, equally iconic ✨
  • offset_loaded β€” has the initial offset been loaded yet. yes/no, bool style, no cap 🌈
  • offset β€” ptr to current offset value. the little subtraction number we keep around πŸŽ€
  • stat β€” ptr to the stat. this is where the answer ends up, periodt πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

here's the tea, bestie: the device stats are not reset at PFReset, so they likely will not be zeroed when the driver starts. like, they just be carrying old numbers around with no shame 😭

so what do we do? we save the first values we read and use them as offsets to be subtracted from the raw values, in order to report stats that count from zero. iconique behaviour, truly 🧚

and in the process, we also manage the potential roll-over. not me handling overflow AND being cute πŸ’€βœ¨


πŸ‘‘ SEE ALSO πŸ‘‘

first up, the source file herself:

  • Kernel file ./drivers/net/ethernet/intel/i40e/i40e_main.c

and now the extended friend group (the whole i40e family tree, fr fr β€” every single one, no skips πŸ™ˆ):


and that's the whole page, bestie 🫢✨

this little legend comes from ./drivers/net/ethernet/intel/i40e β€” October 2026 era, and honestly she ate πŸ’…πŸŽ€ ngl, go read your stats, subtract your offsets, and manage that roll-over like the main character you are πŸŒΈπŸ’–

πŸ“¦ where this page comes from