__hw_addr_list_snapshot(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __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 to GFP_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 🌈

  • 0 on success πŸŽ‰
  • -errno on 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