batadv_ring_buffer_avg(9)
π batadv_ring_buffer_avg β the kernel API glow-up
okay so bestie, welcome to batadv_ring_buffer_avg(9) from the Kernel API Manual β¨ this one's a tiny little function but she's important, and I'm gonna walk you through her whole vibe, no cap π«Ά
β¨ NAME β¨
batadv_ring_buffer_avg β literally computes the average of all the non-zero values chillin' inside the given ring buffer π like, she looks at your ring buffer, ignores the zeros (they're not invited to the party π), and hands you back the average. iconic behavior.
π SYNOPSIS π
u8 batadv_ring_buffer_avg (const u8 lq_recv[] );
that's it. that's the whole signature. short queen π note the u8 return type and the const u8 array β copy it exactly, don't get creative with my girl's types fr fr.
πΈ ARGUMENTS πΈ
lq_recvβ pointer to the ring buffer π« that's the one and only thing you hand her. just a pointer. she does the rest.
π¦ RETURN π¦
the computed average value β¨ yep, that's the whole return story β she gives you back the average she calculated.
π SEE ALSO π
okay this list is long, like she has a whole extended friend group, and every single one of them deserves a shoutout π so here we go, no skipping, no cutting corners:
- Kernel file
./net/batman-adv/bat_iv_ogm.c enum batadv_dup_status(9)batadv_ring_buffer_set(9)batadv_iv_ogm_orig_get(9)batadv_iv_ogm_neigh_new(9)batadv_iv_ogm_iface_enable(9)batadv_iv_ogm_iface_disable(9)batadv_iv_ogm_iface_update_mac(9)batadv_iv_ogm_primary_iface_set(9)batadv_iv_ogm_emit_send_time(9)batadv_iv_ogm_fwd_send_time(9)batadv_hop_penalty(9)batadv_iv_ogm_aggr_packet(9)batadv_iv_ogm_send_to_if(9)batadv_iv_ogm_emit(9)batadv_iv_ogm_can_aggregate(9)batadv_iv_ogm_aggregate_new(9)batadv_iv_ogm_aggregate(9)batadv_iv_ogm_queue_add(9)batadv_iv_ogm_forward(9)batadv_iv_ogm_slide_own_bcast_window(9)batadv_iv_ogm_schedule_buff(9)batadv_iv_ogm_schedule(9)batadv_iv_ogm_reschedule(9)batadv_iv_orig_ifinfo_sum(9)batadv_iv_ogm_neigh_ifinfo_sum(9)batadv_iv_ogm_orig_update(9)batadv_iv_ogm_calc_tq(9)batadv_iv_ogm_update_seqnos(9)batadv_orig_to_direct_router(9)batadv_iv_ogm_process_per_outif(9)batadv_iv_ogm_process_reply(9)batadv_iv_ogm_process(9)batadv_iv_send_outstanding_bat_ogm_packet(9)batadv_iv_ogm_receive(9)batadv_iv_ogm_neigh_get_tq_avg(9)batadv_iv_ogm_orig_dump_subentry(9)batadv_iv_ogm_orig_dump_entry(9)batadv_iv_ogm_orig_dump_bucket(9)batadv_iv_ogm_orig_dump(9)batadv_iv_ogm_neigh_diff(9)batadv_iv_ogm_neigh_dump_neigh(9)batadv_iv_ogm_neigh_dump_hardif(9)batadv_iv_ogm_neigh_dump(9)batadv_iv_ogm_neigh_cmp(9)batadv_iv_ogm_neigh_is_sob(9)batadv_iv_iface_enabled(9)batadv_iv_init_sel_class(9)batadv_iv_gw_get_best_gw_node(9)batadv_iv_gw_is_eligible(9)batadv_iv_gw_dump_entry(9)batadv_iv_gw_dump(9)batadv_iv_init(9)batadv_iv_deinit(9)
like... the way she knows everybody in bat_iv_ogm.c? main character energy, honestly π§β¨
π real talk though bestie: the important bit is that she averages the non-zero entries only β zeros get filtered out before the math happens. that's the whole point of her, iykyk.
okay and finally, the boring-but-mandatory paperwork bit, but make it cute π this page comes from the source tree ./net/batman-adv and it's dated October 2026 β so like, future girlie knows what's up β bookmark her, she's a keeper ππ¦πΈ
periodt. π
π¦ 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