XDP: Difference between revisions

Tags: Mobile edit Mobile web edit
Tags: Mobile edit Mobile web edit
Line 9: Line 9:
An XDP program is an eBPF program invoked for each received packet which runs either:
An XDP program is an eBPF program invoked for each received packet which runs either:
* early in the kernel receive path, with no driver support (Generic Mode)
* early in the kernel receive path, with no driver support (Generic Mode)
* from the driver context, without any kernel networking stack touches (requires driver support) (Native mode)
* from the driver context following DMA sync, without any kernel networking stack touches (requires driver support) (Native mode)
* on the NIC itself, without touching the CPU (requires hardware+driver support) (Offloaded mode)
* on the NIC itself, without touching the CPU (requires hardware+driver support) (Offloaded mode)
Offloaded mode can theoretically beat native mode, which will usually beat generic mode.
Offloaded mode can theoretically beat native mode, which will usually beat generic mode.