Check out my first novel, midnight's simulacra!

NAPI

From dankwiki
Revision as of 19:37, 6 February 2023 by Dank (talk | contribs) (Created page with "The "New API" for Linux NIC drivers introduced around 2001, NAPI is initiated by a NIC's hardware interrupt, but then disables interrupts and polls the card for a period. This can significantly reduce the CPU load compared to a pure interrupt-driven solution. NAPI largely obsoletes the "interrupt coalescing" features of some NICs. It is strictly receive-side. ==The NAPI path== A NIC has some number of hardware RX queues, each of which is mapped to an interrupt number an...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The "New API" for Linux NIC drivers introduced around 2001, NAPI is initiated by a NIC's hardware interrupt, but then disables interrupts and polls the card for a period. This can significantly reduce the CPU load compared to a pure interrupt-driven solution. NAPI largely obsoletes the "interrupt coalescing" features of some NICs. It is strictly receive-side.

The NAPI path

A NIC has some number of hardware RX queues, each of which is mapped to an interrupt number and a queue (a ringbuffer in system memory into which the NIC can DMA); these two combine to form a "channel" in Linuxspeak. The interrupt number usually maps to some MSI-X which is arbitrated by a LAPIC.