bond_select_active_slave(9)
π bond_select_active_slave(9) β Kernel API Manual, bestie edition β¨
okay so picture this: you're deep in the kernel, you're in the bonding driver, and the whole squad of network slaves needs a little vibe check to figure out who's the main character right now. that's this function. it's from the Kernel API Manual, and it's giving "quietly holding the group chat together" energy π
πΈ NAME πΈ
bond_select_active_slave β picks a new active slave, but only if one's actually needed. lowkey the most reasonable function in the file fr fr π«Ά
β¨ SYNOPSIS β¨
void bond_select_active_slave (struct bonding *bond );
it returns nothing (void), it takes exactly one thing, and that thing is a bonding struct. no cap. π
π ARGUMENTS π
bondβ our bonding struct π like, ours. the one you're working with. your buddy. your ride or die.
π¦ DESCRIPTION π¦
soooo this function is the one you call when the active-slave situation needs a refresh. specifically, you should call it when one of these three things goes down:
- The old
curr_active_slavehas been released or lost its link π like she's gone, or at least she's not connecting anymore. - The
primary_slavehas got its link back π welcome back babe, we missed you. - A slave has got its link back and there's no old
curr_active_slaveβ so somebody's gotta step up and be the icon π
π¨ important caveat, do not skip this one: the caller must hold RTNL. that's not a suggestion, that's the rule. hold it before you call. no exceptions π
π₯ SEE ALSO π₯
all the siblings and neighbors, in the order the manpage gives them β this is the whole friend group, no one gets left out π«Ά
Also worth knowing: the Kernel file ./drivers/net/bonding/bond_main.c is where this whole situation lives.
bond_dev_queue_xmit(9)bond_vlan_rx_add_vid(9)bond_vlan_rx_kill_vid(9)bond_ipsec_dev(9)bond_ipsec_add_sa(9)bond_ipsec_del_sa(9)bond_ipsec_offload_ok(9)bond_advance_esn_state(9)bond_xfrm_update_stats(9)bond_set_dev_addr(9)bond_choose_primary_or_current(9)bond_find_best_slave(9)bond_change_active_slave(9)bond_xmit_hash(9)bond_xmit_hash_xdp(9)bond_get_slave_by_id(9)bond_rr_gen_slave_id(9)bond_sk_hash_l34(9)
that's the whole page bestie, go hold RTNL and slay π β¨
this masterpiece came from ./drivers/net/bonding, dated October 2026 β and yes, she's still bond_select_active_slave(9) in the header, iconic behavior π
π¦ 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