__hw_addr_list_reconcile(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ __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:


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