batadv_add_counter(9)
π 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:
- Kernel file
./net/batman-adv/main.hπ BATADV_TP_MAX_NUM(9)enum batadv_mesh_state(9)enum batadv_uev_action(9)enum batadv_uev_type(9)batadv_print_vid(9)batadv_compare_eth(9)batadv_has_timed_out(9)batadv_atomic_dec_not_zero(9)batadv_smallest_signed_int(9)batadv_seq_before(9)batadv_seq_after(9)batadv_inc_counter(9)BATADV_SKB_CB(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms