netdev_from_priv(9)
π netdev_from_priv β kernel API manual, but make it make sense
okay so bestie, welcome to the netdev_from_priv(9) page π this is one of those tiny little kernel helpers that's literally doing the "you dropped this π" move β you hand it some private data, it hands you back the network device that data belongs to. that's it. that's the whole vibe. no cap.
β¨ NAME β¨
netdev_from_priv β get network device from priv πΈ
like, the name is the plot. it's giving "reverse lookup but make it networking."
π¦ SYNOPSIS π¦
struct net_device * netdev_from_priv (const void *priv );
one function, one argument, returns a pointer to a struct net_device. clean, minimal, iconic. β¨
π ARGUMENTS π
privβ network device private data π so like, the little blob of per-device stuff that lives behind the scenes. you pass it in, the function knows what to do with it.
π₯ RETURN π₯
the net_device to which priv belongs π«Ά
yep β it gives you back the device that the private data is attached to. no extra lore, no caveats listed here, just the return value doing its one job. periodt.
ngl bestie this page is short, but that's a flex not a flaw β the small ones are always the most useful π
π SEE ALSO π
okay this is the part where the manpage absolutely pops off β the SEE ALSO list is massive, and honestly? main character energy π. here's every single one, and yes we're listing all of them, i would never do you like that:
The kernel file ./include/linux/netdevice.h, plus:
struct gro_node(9)napi_is_scheduled(9)napi_schedule(9)napi_schedule_irqoff(9)napi_complete_done(9)napi_synchronize(9)napi_if_scheduled_mark_missed(9)enum netdev_priv_flags(9)struct net_device(9)netdev_priv(9)netif_napi_add(9)netif_napi_add_config(9)netif_napi_add_tx(9)__netif_napi_del(9)netif_napi_del(9)netif_start_queue(9)netif_wake_queue(9)netif_stop_queue(9)netif_queue_stopped(9)netdev_queue_set_dql_min_limit(9)netdev_txq_bql_enqueue_prefetchw(9)netdev_txq_bql_complete_prefetchw(9)netdev_tx_sent_queue(9)netdev_sent_queue(9)netdev_tx_completed_queue(9)netdev_completed_queue(9)netdev_tx_reset_subqueue(9)netdev_reset_queue(9)netdev_cap_txqueue(9)netif_running(9)netif_start_subqueue(9)netif_stop_subqueue(9)__netif_subqueue_stopped(9)netif_subqueue_stopped(9)netif_wake_subqueue(9)netif_attr_test_mask(9)netif_attr_test_online(9)netif_attrmask_next(9)netif_attrmask_next_and(9)netif_is_multiqueue(9)dev_hold(9)dev_put(9)linkwatch_sync_dev(9)netif_carrier_ok(9)netif_dormant_on(9)netif_dormant_off(9)netif_dormant(9)netif_testing_on(9)netif_testing_off(9)netif_testing(9)netif_oper_up(9)netif_device_present(9)netif_tx_lock(9)__dev_uc_sync(9)__dev_uc_unsync(9)__dev_mc_sync(9)__dev_mc_unsync(9)
likeβ¦ that's a whole friend group right there π go read a few, iykyk.
and that's the page, bestie!! π this one came from the ./include/linux corner of the kernel, dated October 2026, and it's netdev_from_priv(9) all the way down. 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