dev_uc_sync(9)
π dev_uc_sync β the kernel API manual, bestie edition π
Okay so real talk, this page lives in the Kernel API Manual (section 9, kernel girlies rise π§), and it's all about one little function that keeps a device's unicast list in sync with another device. Let's get into it β¨
β¨ NAME β¨
dev_uc_sync β sync up a device's unicast list to another device. Literally copy-the-vibes-but-for-addresses π
πΈ SYNOPSIS πΈ
int dev_uc_sync (struct net_device *to , struct net_device *from );
Yes bestie, it takes two devices and returns an int. That's the whole mood π
π¦ ARGUMENTS π¦
toβ the destination device, aka where the addresses are going πfromβ the source device, aka where the addresses are coming from π
π DESCRIPTION π
So here's the tea β: this function adds the newly added addresses over to the destination device, and it releases the addresses that have no users left. Cleanup era fr fr π§Ήβ¨
β οΈ Okay important: the source device must be locked by netif_addr_lock_bh. Not optional, not "eh maybe", it's a must. Don't skip the lock bestie ππ
This function is intended to be called from the dev->set_rx_mode function of layered software devices. That's its whole main character moment π
And it also assumes that addresses will only ever be synced to the to devices and no other. No side-quests, no sneaky extra devices β just to. Periodt π
π₯ SEE ALSO π₯
Kernel file ./net/core/dev_addr_lists.c β and the whole friend group π«Ά:
__hw_addr_sync_dev(9)__hw_addr_ref_sync_dev(9)__hw_addr_ref_unsync_dev(9)__hw_addr_unsync_dev(9)__hw_addr_list_snapshot(9)__hw_addr_list_reconcile(9)dev_addr_flush(9)dev_addr_init(9)dev_addr_add(9)dev_addr_del(9)dev_uc_add_excl(9)dev_uc_add(9)dev_uc_del(9)dev_uc_sync_multiple(9)dev_uc_unsync(9)dev_uc_flush(9)dev_uc_init(9)dev_mc_add_excl(9)dev_mc_add(9)dev_mc_add_global(9)dev_mc_del(9)dev_mc_del_global(9)dev_mc_sync(9)dev_mc_sync_multiple(9)dev_mc_unsync(9)dev_mc_flush(9)dev_mc_init(9)netif_uc_promisc_update(9)__dev_set_rx_mode(9)netif_rx_mode_sync(9)
And that's the whole page! Sourced from ./net/core, dated October 2026 β screenshot it, cite it, cite me, whatever π
πΈ mwah, go sync those unicast lists responsibly ππ
π¦ 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