dev_mc_sync_multiple(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dev_mc_sync_multiple β€” the kernel API manual moment

ok so real talk, bestie, this page lives in the Kernel API Manual (section 9, the kernel-internals one, iykyk) and it's about dev_mc_sync_multiple β€” synchronizing a device's multicast list over to another device, except it lets you do the multiple-device thing. no cap, that's the whole vibe.


✨ NAME ✨

dev_mc_sync_multiple β€” synchronize a device's multicast list to another device, but allow for multiple calls to sync to multiple devices πŸ¦‹


🌸 SYNOPSIS 🌸

int dev_mc_sync_multiple (struct net_device *to , struct net_device *from );

like, that's it. two pointers, one int. iconic.


πŸŽ€ ARGUMENTS πŸŽ€

  • to β€” the destination device. the one getting the addresses, the main character receiving the glow-up πŸ’…
  • from β€” the source device. the one handing its addresses over, generous queen 🫢

πŸ’– DESCRIPTION πŸ’–

okay so here's what actually happens: it adds the newly added addresses to the destination device, and releases addresses that have no users left. cleanup AND handoff, we love a multitasker ✨

⚠️ important, bestie: the source device must be locked by netif_addr_lock_bh. do not skip this. we are not doing unlocked chaos today 😭

this function is intended to be called from the ndo_set_rx_mode function of layered software devices. and the whole point β€” the reason it's the _multiple one and not just regular dev_mc_sync β€” is that it allows a single source device to be synced to multiple destination devices. one source, many destinations. sharing is caring, fr fr 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

everything in the kernel file ./net/core/dev_addr_lists.c, plus the whole friend group:


and that's the page!! πŸŽ‰ this little gem comes from ./net/core and it's dated October 2026 β€” so yeah, it's giving future-kernel energy πŸ’€βœ¨ mwah, go lock your source device, bestie πŸ’œ

πŸ“¦ where this page comes from