batadv_tp_update_cwnd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_tp_update_cwnd(9) β€” the Kernel API Manual glow-up πŸŽ€

okay so bestie, this is a page straight out of the Kernel API Manual, and the function is literally called batadv_tp_update_cwnd β€” say that five times fast, I dare you. It's the congestion-window maintenance baddie for batman-adv's TP meter, and she is serving ✨ traffic control ✨. Let's get into it.


✨ NAME ✨

batadv_tp_update_cwnd β€” update the Congestion Windows πŸ’«

(no cap, that's the whole name section, she's lowkey mysterious like that)


🌸 SYNOPSIS 🌸

void batadv_tp_update_cwnd (struct batadv_tp_sender *tp_vars , u32 mss
);

that's it. that's the whole signature. returns void, so she doesn't even give you a little status code back β€” she just does the thing and moves on. main character energy fr fr πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • tp_vars β€” the private data of the current TP meter session 🫢 this is your session's little diary, and it's where the congestion window lives.
  • mss β€” maximum segment size of transmission πŸ“ aka how big one segment is allowed to be. it matters, keep it around.

πŸŽ€ DESCRIPTION πŸŽ€

so here's the tea β˜• β€” depending on what mood the session is in, the congestion window grows differently. there are exactly two (2) vibes, and here they are, numbered like the icon she is:

  1. if the session is in Slow Start, the CWND has to be increased by 1 MSS every unique received ACK πŸŒ±β†’πŸŒ³
  2. if the session is in Congestion Avoidance, the CWND has to be increased by MSS * MSS / CWND for every unique received ACK πŸŒπŸ’¨

like, yes bestie, the second one is a whole little division situation. it's giving "we're being polite now, we've learned our lesson." the way that formula just scales itself down as the window gets bigger? obsessed 😭πŸ”₯

key word in both of those, and i cannot stress this enough: unique received ACK. keep that in your notes for the vibe check πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

first up, the home base kernel file: ./net/batman-adv/tp_meter.c 🏠 β€” everything below lives around there, and you should absolutely go read all of them, iykyk:

forty-nine entries of pure reading material, bestie. a whole syllabus. put on your comfiest hoodie and get into it πŸ§šπŸ’œ


and that's the page!! source: ./net/batman-adv, dated October 2026, and the lovely lady herself goes by batadv_tp_update_cwnd(9) β€” mwah, stan her, protect her, retweet πŸ’‹πŸ’–πŸŽ€

πŸ“¦ where this page comes from