mesh_path_flush_by_nexthop(9)
π mesh_path_flush_by_nexthop(9)
okay so bestie, welcome to the Kernel API Manual entry for mesh_path_flush_by_nexthop(9) β yes that's the whole name, yes it's a mouthful, no we're not shortening it, it's iconic as is π
β¨ NAME β¨
mesh_path_flush_by_nexthop β Deletes mesh paths if their next hop matches π§Ήπ¦
like, it goes through and yeets the mesh paths whose next hop is the one you point at. that's the whole vibe.
πΈ SYNOPSIS πΈ
void mesh_path_flush_by_nexthop (struct sta_info *sta );
no return value, it's a void girly, she does the work and leaves π
π«Ά ARGUMENTS π«Ά
staβ mesh peer to match. that's it, that's the whole argument. you hand her a mesh peer and she matches against it, slay.
π DESCRIPTION π
okay so the RCU notes, because this part is important and I need you to actually read it, bestie π
this function is called when a mesh plink transitions from PLINK_ESTAB to any other state β and the reason is lowkey genius: PLINK_ESTAB state is the only one that allows path creation. so the moment you leave that state, the paths gotta go.
and this all happens before the sta can be freed β because sta_info_destroy calls this β which means any reader sitting in an rcu read block will be protected against the plink disappearing. no cap, that's the safety guarantee, and it's giving main character energy π₯
ngl the ordering here is the whole point β flush happens first, free happens after, readers stay protected. don't mess with the sequence, fr fr.
π SEE ALSO π
Kernel file ./net/mac80211/mesh_pathtbl.c β and the whole friend group:
mesh_path_assign_nexthop(9)mesh_path_move_to_queue(9)mesh_path_lookup(9)mesh_path_lookup_by_idx(9)mpp_path_lookup_by_idx(9)mesh_path_add_gate(9)mesh_gate_del(9)mesh_gate_num(9)mesh_path_add(9)mesh_plink_broken(9)mesh_path_flush_by_iface(9)table_path_del(9)mesh_path_del(9)mesh_path_tx_pending(9)mesh_path_send_to_gates(9)mesh_path_discard_frame(9)mesh_path_flush_pending(9)mesh_path_fix_nexthop(9)
and that's the page!! π this one lives in ./net/mac80211, dated October 2026, and it's filed under mesh_path_flush_by_nexthop(9) forever and ever. go forth and flush responsibly, bestie πβ¨
π¦ 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