__hw_addr_list_reconcile(9)
π¦ __hw_addr_list_reconcile β Kernel API Manual π¦
okay bestie, so this page is all about __hw_addr_list_reconcile(9), and it lives in the Kernel API Manual, which is honestly giving very "the docs the docs don't want you to read" energy. sit down, hydrate, let's get into it π
β¨ NAME β¨
__hw_addr_list_reconcile β literally the function that syncs your snapshot changes back and frees the snapshots afterwards. no cap, that's the whole job π«Ά
π SYNOPSIS π
void __hw_addr_list_reconcile (struct netdev_hw_addr_list *real_list ,
struct netdev_hw_addr_list *work , struct netdev_hw_addr_list *ref , int
addr_len , struct netdev_hw_addr_list *cache );
five args, one void return, zero drama (well, okay, the lock drama is real β more on that below π). β¨
πΈ ARGUMENTS πΈ
real_listβ the actual, real-deal address list that's getting updated. this is the main character of the whole operation πworkβ the working snapshot β¨. heads up: your driver modifies this one via__hw_addr_sync_dev, so it's the "we've been busy" copy π«Άrefβ the reference snapshot, aka the untouched copy of the original state. it's the "before" photo, it does not get edited, it's just here for comparison πaddr_lenβ the length of the addresses. that's it, that's the arg πcacheβ the entry cache where snapshot entries go back to get reused, because we recycle in this house β»οΈπ
π₯ DESCRIPTION π₯
so what does it actually do, bestie? it walks the reference snapshot (ref) and compares every single entry against the work snapshot (work) to compute the sync_cnt deltas. the way it just... does the math. obsessed π§ β¨
then it applies those deltas to real_list, because that's the list that's actually real (name checks out, fr fr).
after all that, it returns the snapshot entries to cache for reuse, and frees both snapshots β work and ref are gone, done, no takebacksies π. if you were planning on using them afterwards, don't π.
β οΈ real talk though: the caller must hold netif_addr_lock_bh. like, this is not a suggestion, this is not a "eh, probably fine" β hold the lock, bestie. do not test me on this ππ€
π SEE ALSO π
kernel file ./net/core/dev_addr_lists.c (go read it, iykyk π) plus this 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)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 tea ββ¨ this lil page came from ./net/core, dated October 2026, and it's part of the Kernel API Manual β __hw_addr_list_reconcile(9), the one and only. stay locked, stay synced, ily, bye πππ¦
π¦ 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