batadv_tp_update_cwnd(9)
π 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:
- if the session is in Slow Start, the CWND has to be increased by 1 MSS every unique received ACK π±βπ³
- 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:
BATADV_TP_DEF_TEST_LENGTH(9)BATADV_TP_AWND(9)BATADV_TP_RECV_TIMEOUT(9)BATADV_TP_MAX_RTO(9)BATADV_TP_FIRST_SEQ(9)BATADV_TP_PLEN(9)BATADV_TP_MAX_UNACKED(9)batadv_tp_session_cookie(9)batadv_tp_cwnd(9)batadv_tp_update_rto(9)batadv_tp_batctl_notify(9)batadv_tp_batctl_error_notify(9)batadv_tp_list_find_sender(9)batadv_tp_list_active(9)batadv_tp_list_find_sender_session(9)batadv_tp_sender_release(9)batadv_tp_sender_put(9)batadv_tp_list_detach(9)batadv_tp_sender_cleanup(9)batadv_tp_sender_end(9)batadv_tp_sender_shutdown(9)batadv_tp_sender_stopped(9)batadv_tp_sender_finish(9)batadv_tp_reset_sender_timer(9)batadv_tp_sender_timeout(9)batadv_tp_fill_prerandom(9)batadv_tp_send_msg(9)enum batadv_tp_ack_reaction(9)batadv_tp_handle_ack(9)batadv_tp_recv_ack(9)batadv_tp_avail(9)batadv_tp_wait_available(9)batadv_tp_send(9)batadv_tp_start_kthread(9)batadv_tp_start(9)batadv_tp_stop(9)batadv_tp_list_find_receiver_session(9)batadv_tp_receiver_release(9)batadv_tp_receiver_put(9)batadv_tp_reset_receiver_timer(9)batadv_tp_receiver_shutdown(9)batadv_tp_send_ack(9)batadv_tp_handle_out_of_order(9)batadv_tp_ack_unordered(9)batadv_tp_init_recv(9)batadv_tp_recv_msg(9)batadv_tp_meter_recv(9)batadv_tp_stop_all(9)batadv_tp_meter_init(9)
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
- 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