emac_poll(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 the napi_struct that 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:


πŸ’– 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