netif_rx_mode_sync(9)
π netif_rx_mode_sync(9)
okay so bestie, welcome to the Kernel API Manual, section 9 β this is the page for netif_rx_mode_sync, and honestly? it's giving "small function, big main character energy" β¨
π NAME π
netif_rx_mode_sync β sync that rx mode inline, no waiting around, periodt π
β¨ SYNOPSIS β¨
void netif_rx_mode_sync (struct net_device *dev );
π¦ ARGUMENTS π¦
devβ the network device. that's it, that's the whole argument list, she's low maintenance π«Ά
π DESCRIPTION π
okay so picture this: you're a driver and you implement ndo_set_rx_mode_async. that means your rx mode callback gets executed from a workqueue. sounds cute, right? and it is β it lets the callback sleep π΄ which is genuinely useful.
BUT (and this is the plot twist π) it also means the hardware update is deferred, so it may not be visible to userspace by the time the initiating syscall returns. not us finding out the vibes were off the whole time π
so what does netif_rx_mode_sync do? she steals the workqueue update and executes it inline. literally just takes it and runs it right there, no queue, no waiting. and the reason is honestly iconic: it preserves the atomicity of operations to the userspace. that's the whole point. she ate and left no crumbs π
π SEE ALSO π
this list is long bestie, buckle up π§ the kernel file is ./net/core/dev_addr_lists.c, and:
__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)__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)
π«Ά quick vibe check before you go: the hardware update being deferred is the actual consequence of the workqueue path β that's not a bug, that's just how it works. this function is the "do it right now instead" button.
and that's the page! tysm for reading, this was ./net/core, dated October 2026, and the girl herself is netif_rx_mode_sync(9) β 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