batadv_hop_penalty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_hop_penalty(9) β€” the kernel API manual, bestie edition

okay so this is a page from the Kernel API Manual and it's literally all about batadv_hop_penalty β€” like, the tiny little function that takes your TQ value and hits it with the hop penalty stick πŸŽ€ It's one of those batman-adv internals that lives in ./net/batman-adv/bat_iv_ogm.c, so yeah, mesh brain stuff. iykyk πŸ¦‹


✨ NAME ✨

batadv_hop_penalty β€” apply the configured hop penalty to a TQ value. that's it, that's the whole job πŸ’…


🌸 SYNOPSIS 🌸

u8 batadv_hop_penalty (u8 tq , const struct batadv_priv *bat_priv );

like, it takes a u8 and hands you back a u8. no drama, no cap ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • tq β€” the input TQ value, aka the poor little number that's about to get reduced πŸ™ˆ
  • bat_priv β€” the bat priv, which is holding all the mesh interface information. the main character struct fr fr πŸ‘‘

πŸ’– RETURN πŸ’–

it returns the TQ value after the hop penalty has been applied β€” so like, the same value but post-glow-down πŸ’…βœ¨


πŸ¦‹ SEE ALSO πŸ¦‹

bestie, this list is long and i'm obsessed with how thorough it is. it all kicks off in the kernel file ./net/batman-adv/bat_iv_ogm.c, and then:


ngl there's no danger here, it's just a TQ value getting its hop penalty applied. go read the batch of them if you want the whole lore 🫢

and that's the whole page, bestie!! this one's from the source tree ./net/batman-adv, dated October 2026 β€” keep it in your bookmarks, it's iconic πŸ’œπŸŒˆβ­

πŸ“¦ where this page comes from