bond_get_slave_by_id(9)
π bond_get_slave_by_id β from the Kernel API Manual, bestie β¨
okay so picture this: you're deep in the kernel, you're in the bonding driver, and you need a transmit slave by its id. that's the whole vibe of this page. it's bond_get_slave_by_id(9), and yes she's a real one π«Ά
πΈ NAME πΈ
bond_get_slave_by_id β get xmit slave with slave_id π«
β¨ SYNOPSIS β¨
struct slave * bond_get_slave_by_id (struct bonding *bond , int slave_id );
literally that's it. returns a struct slave *, takes a struct bonding * and an int. clean, iconic, no notes π
π ARGUMENTS π
bondβ the bonding device that's doing the transmitting, she's the main character here πslave_idβ the slave id you want, and it goes up toslave_cnt-1, and that's the one you'll transmit through π¦
π DESCRIPTION π
okay so here's the tea β: this function tries to get the slave with slave_id. but β and this is the important part β in case it fails, it does not just give up and cry about it π. nope. it tries to find the first available slave for transmission instead. fallback queen behavior, honestly π
π₯ SEE ALSO π₯
so like, the whole friend group lives in the kernel file ./drivers/net/bonding/bond_main.c, and here's everyone in the group chat:
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_select_active_slave(9)bond_xmit_hash(9)bond_xmit_hash_xdp(9)bond_rr_gen_slave_id(9)bond_sk_hash_l34(9)
iykyk π
ngl bestie, if you're reading this in the source tree, you're already doing amazing. go get that slave π§
and that's the page!! this one's from the ./drivers/net/bonding corner of the world πΈ, dated October 2026, and it's bond_get_slave_by_id(9) signing off β mwah, slay, periodt ππ
π¦ 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