__hw_addr_list_snapshot(9)
π
__hw_addr_list_snapshot (9) β from the Kernel API Manual, bestie π
okay so picture this: you're deep in kernel land, you open the Kernel API Manual, and this little cutie is right there. Her whole job? Making a copy of an address list. That's it. That's the gig. And honestly? She ate. β¨
πΈ NAME πΈ
__hw_addr_list_snapshot β create a snapshot copy of an address list π«Ά
β¨ SYNOPSIS β¨
int __hw_addr_list_snapshot (struct netdev_hw_addr_list *snap , const
struct netdev_hw_addr_list *list , int addr_len , struct
netdev_hw_addr_list *cache );
π¦ ARGUMENTS π¦
snapβ the destination snapshot list, i.e. where the copy lands. Heads up: this one needs to be__hw_addr_init-initialized first, no skipping that step bestie πlistβ the source address list you're snapshotting. The original. The main character πaddr_lenβ length of addresses πcacheβ the entry cache you can reuse entries from; if that doesn't work out it falls back toGFP_ATOMICπ₯
π DESCRIPTION π
Creates a copy of list, reusing entries from cache when available. Literally so efficient of her.
β οΈ Must be called under a spinlock. Not optional, not a suggestion, not a vibe. Spinlock. Periodt. π
π RETURN π
0on success π-errnoon failure π
π§ SEE ALSO π§
Kernel file ./net/core/dev_addr_lists.c, plus 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_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) π
and that's the whole page, bestie!! π this one lives in ./net/core, dated October 2026, and it's filed under __hw_addr_list_snapshot(9) β go forth and snapshot responsibly, mwah ππ
π¦ 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