emac_poll(9)
β¨ emac_poll β the Kernel API Manual glow-up β¨
Okay bestie, so this one's from the Kernel API Manual section nine, and it's literally all about emac_poll π
πΈ NAME πΈ
emac_poll β the EMAC NAPI Poll function, and yes that's the whole name, she's concise π
π¦ SYNOPSIS π¦
int emac_poll (struct napi_struct *napi , int budget );
π ARGUMENTS π
napiβ a pointer to thenapi_structthat contains The DaVinci EMAC network adapter. Yes, "The" is capitalized, it's giving main character energy π«Άbudgetβ the number of receive packets to process, as told by the NAPI layer. You don't get to pick this, NAPI hands it to you, respect the assignment π
π₯ DESCRIPTION π₯
So this is a NAPI Poll function, and it's implemented to process packets as per budget β like, the budget is sacred, no cap.
The way it works: we check the type of interrupt on the device π and accordingly call the TX or RX packet processing functions. We follow the budget for RX processing, and we also put a cap on the number of TX pkts processed through a config param. Iconic multitasking honestly.
The NAPI schedule function is called if more packets are pending β because she never leaves packets hanging, periodt β¨
And what does it return? The number of packets received (in most cases; else TX pkts β rarely). "Rarely" is doing a lot of work in that sentence but ok we love a mysterious queen π
π SEE ALSO π
Kernel file ./drivers/net/ethernet/ti/davinci_emac.c β start there, bestie, that's the source of truth π
Then we got the whole friend group, no one gets left behind:
emac_get_drvinfo(9)emac_get_coalesce(9)emac_set_coalesce(9)emac_update_phystatus(9)hash_get(9)emac_hash_add(9)emac_hash_del(9)emac_add_mcast(9)emac_dev_mcast_set(9)emac_int_disable(9)emac_int_enable(9)emac_irq(9)emac_dev_xmit(9)emac_dev_tx_timeout(9)emac_set_type0addr(9)emac_set_type1addr(9)emac_set_type2addr(9)emac_setmac(9)emac_dev_setmac_addr(9)emac_hw_enable(9)emac_poll_controller(9)emac_devioctl(9)emac_dev_open(9)emac_dev_stop(9)emac_dev_getnetstats(9)davinci_emac_probe(9)davinci_emac_remove(9)davinci_emac_init(9)davinci_emac_exit(9)
π that's the whole page, go read the kernel source and slay π
This little beauty lives in ./drivers/net/ethernet/ti and the version footprint says October 2026 β so yeah, from the future, obviously πβ stay hydrated and happy polling, bestie π§ββοΈπ
π¦ 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