__hw_addr_ref_sync_dev(9)
β¨ __hw_addr_ref_sync_dev β NAME β¨
okay so bestie, this is __hw_addr_ref_sync_dev π
and what it does is Synchronize device's multicast address list taking into account references. that's the whole vibe β it's the ref-aware version of the sync game, no cap π
it lives in the Kernel API Manual (9 = kernel section, iykyk), and today we're gonna read it together like it's the group chat π«Ά
πΈ SYNOPSIS πΈ
int __hw_addr_ref_sync_dev (struct netdev_hw_addr_list *list , struct
net_device *dev , int (*sync)(struct net_device *, const unsigned char
*, int) , int (*unsync)(struct net_device *, const unsigned char *, int)
);
literally that's the signature, copy it exact, don't be cute with it π
π¦ ARGUMENTS π¦
listβ the address list you're about to synchronize. this is the main character of the operation πdevβ the device to sync. yes that device. the one you're syncing. πsyncβ function to call if address or reference on it should be added. like, "hey bestie, add this one" πunsyncβ function to call if address or some reference on it should be removed. the breakup text function π
π DESCRIPTION π
so here's the tea β β this function is intended to be called from the ndo_set_rx_mode function of devices that require explicit address or references on it add/remove notifications. like, those devices that need to be told directly, no passive-aggressive hints, fr fr π£
and here's the important bit: the unsync function may be NULL π in which case the addresses or references on it requiring removal will simply be removed β¨ without any notification to the device. poof, gone, no text back π
and that's on responsibility of the driver to identify and distribute address or references on it between internal address tables. so like, the driver has to figure it out and hand them out itself. that's the driver's job, not this function's π«‘
ngl this is one of those "read the whole thing before you call it" situations, bestie.NULLunsyncis valid but it means silent removal β make sure that's actually what you want π
π SEE ALSO π
so many friends in the extended universe, obsessed π§β¨
Kernel file ./net/core/dev_addr_lists.c π and then:
__hw_addr_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(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)
all of them. every single one. go read them too, you'll be so smart ππ
and that's the whole page, bestie!! π₯³ this came from ./net/core, dated October 2026, and it's __hw_addr_ref_sync_dev(9) β slay, periodt, go sync those addresses π
β¨π
π¦ 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