bond_set_dev_addr(9)
π bond_set_dev_addr(9) π
Okay so bestie, you found it β this is a page from the Kernel API Manual, and it's about one very specific little function. No cap, it's a tiny one, but it matters. Let's get into it π
β¨ NAME β¨
bond_set_dev_addr β the function that clones a slave's address over to the bond. Yep. That's the whole job. It's giving "copy-paste but make it networking" π
π¦ SYNOPSIS π¦
int bond_set_dev_addr (struct net_device *bond_dev , struct net_device *slave_dev );
Two pointers, one int coming back at you. Simple. Elegant. Iconic.
πΈ ARGUMENTS πΈ
bond_devβ the bond net device. This is the main character π the one getting the address.slave_devβ the slave net device. This is where the address is coming from, iykyk π«Ά
π₯ DESCRIPTION π₯
So here's the one thing you actually cannot forget:
Should be called with RTNL held. Periodt. π
Like, not "maybe", not "if you feel like it" β RTNL needs to be held when you call this. That's the vibe check and you better pass it.
π SEE ALSO π
Kernel file ./drivers/net/bonding/bond_main.c β the mothership π§ and honestly go look at these too, they're all in the same friend group:
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_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_get_slave_by_id(9)bond_rr_gen_slave_id(9)bond_sk_hash_l34(9)
Okay that's the whole page, you ate that π This little gem lives over in ./drivers/net/bonding, tagged October 2026, and it's bond_set_dev_addr(9) β slay, go hold your RTNL and be free π¦β¨π
π¦ 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