batadv_forw...t_list_steal(9)
π NAME π
okay so, hi bestie, this is batadv_forw...t_list_steal(9) straight out of the Kernel API Manual, and the whole vibe is: batadv_forw_packet_list_steal β it claims a list of forward packets so they can get free()'d. that's it, that's the job. π«Ά
β¨ SYNOPSIS β¨
void batadv_forw_packet_list_steal (struct hlist_head *forw_list ,
struct hlist_head *cleanup_list , const struct batadv_hard_iface
*hard_iface );
no cap, that's the whole signature β copy it exactly, she's particular about her types π
π ARGUMENTS π
forw_listβ the forward packets that are about to get stolen. yes, stolen. it's giving heist movie π¦cleanup_listβ a backup pointer, so you can still dispose of the packet later. literally the safety net, keep her close πhard_ifaceβ the interface you're stealing forward packets from.
πΈ DESCRIPTION πΈ
so here's the tea: this function claims responsibility to free any forw_packet queued up on the given hard_iface. like, it's volunteering as tribute π
and if hard_iface is NULL? bestie, it goes wide β forwarding packets on all hard interfaces will be claimed. main character energy, no interface left behind π
the packets are being moved from the forw_list to the cleanup_list. and bestie, that move is the whole point β it makes it possible for already running threads to notice the claim. the way that concurrency works is genuinely iconic β
π¦ SEE ALSO π¦
it all lives in the Kernel file ./net/batman-adv/send.c, and the whole friend group is here:
batadv_send_skb_packet(9)batadv_send_broadcast_skb(9)batadv_send_unicast_skb(9)batadv_send_skb_to_orig(9)batadv_send_skb_push_fill_unicast(9)batadv_send_skb_prepare_unicast(9)batadv_send_skb_prepare_unicast_4addr(9)batadv_send_skb_unicast(9)batadv_send_skb_via_tt_generic(9)batadv_send_skb_via_gw(9)batadv_forw_packet_free(9)batadv_forw_packet_alloc(9)batadv_forw_packet_was_stolen(9)batadv_forw_packet_steal(9)batadv_forw_packet_list_free(9)batadv_forw_packet_queue(9)batadv_forw_packet_bcast_queue(9)batadv_forw_packet_ogmv1_queue(9)batadv_forw_bcast_packet_to_list(9)batadv_forw_bcast_packet_if(9)batadv_send_no_broadcast(9)__batadv_forw_bcast_packet(9)batadv_forw_bcast_packet(9)batadv_send_bcast_packet(9)batadv_forw_packet_bcasts_left(9)batadv_forw_packet_bcasts_dec(9)batadv_forw_packet_is_rebroadcast(9)batadv_send_outstanding_bcast_packet(9)batadv_purge_outstanding_packets(9)
ngl bestie, if you're poking at forwarding packets from multiple threads, read thesteal/was_stolenpair before you do anything. the claim is only visible because the packets got moved β that's the whole trick π§
and that's the page!! mwah π this one's from ./net/batman-adv, dated October 2026, filed under batadv_forw...t_list_steal(9) β go forth and steal responsibly, queen πβ¨
π¦ 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