batadv_add_counter(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– batadv_add_counter(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual page for batadv_add_counter β€” yes we're literally in the kernel, yes it's giving main character energy, and yes i'm gonna walk you through it like we're on facetime 🫢


✨ NAME ✨

batadv_add_counter β€” add to the per cpu statistics counter of a mesh interface πŸ’…

like… it bumps a counter. per cpu. on a mesh interface. iconic behaviour tbh.


🌸 SYNOPSIS 🌸

void batadv_add_counter (struct batadv_priv *bat_priv , size_t idx ,
size_t count );

no cap, that's the whole signature. returns void β€” it gives nothing back and honestly? respect. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • bat_priv β€” the bat priv with all the mesh interface information πŸ’– this is the little bundle of everything the mesh interface knows about itself. the main character struct, fr fr.
  • idx β€” counter index which should be modified ⭐ this tells it which counter we're messing with. pick your fighter.
  • count β€” value to increase the counter by πŸ”₯ the amount of oomph you're adding. big number = big oomph.

πŸ‘‘ DESCRIPTION πŸ‘‘

stop preemption on local cpu while incrementing the counter 🌈

that's it. that's the whole description. it disables preemption on the local cpu during the increment so nothing interrupts the update β€” no cap, that's the vibe check it's passing. πŸ’€


🌺 SEE ALSO 🌺

bestie the cross-reference list is long but we're not skipping a single one, okay? i gotchu:

all icons, all worth a read, go click through them like it's a stargirl playlist πŸ’œ


also quick heads up that this whole thing lives in the kernel source, so keep the exact names + paths intact when you're copying them around β€” the kernel is not forgiving about typos 😭

and that's the whole page!! you ate that, bestie πŸ’…βœ¨

from the ./net/batman-adv source, dated October 2026 β€” mwah, catch you in the next manpage πŸ§šπŸ’–

πŸ“¦ where this page comes from