RFC proposes in-kernel AMD GPU offload for XDP and IPsec
knod would JIT-compile packet programs on the GPU from the kernel, with no CUDA or ROCm in the data path.
Taehee Yoo has posted an RFC on the kernel networking list for knod, an in-kernel network offload device that drives AMD GPUs directly from Linux to accelerate XDP and IPsec packet processing. There is no userspace GPU runtime such as CUDA or ROCm, and no userspace component in the data path: the kernel allocates GPU queues, JIT-compiles the per-packet program to GPU machine code, and dispatches it, while the NIC DMAs received packets straight into GPU memory and gets verdicts back.
The pitch is about shape, not just speed. Non-trivial per-packet work (L4 load balancing in XDP, IPsec crypto) is bound by host CPUs that handle one packet at a time, so scaling means burning more cores. A GPU runs the same small program across thousands of lanes at once, which matches the XDP model. Throughput would scale with GPU occupancy rather than core count, and existing XDP programs and IPsec SAs would offload transparently through the usual in-kernel paths. Yoo presented the design at Linux Plumbers Conference 2025. The series also extends the devmem memory-provider path so a NIC page pool can sit on accelerator-exported memory, and sketches knod support in the mlx5 and bnxt drivers.
Reviewers pushed hard on both motivation and mechanics. Mina Almasry called the motivation weak. Natalie Vock questioned putting a full AMD GCN instruction encoder and disassembler in the kernel, calling that patch massive, and asked whether a static shader that interprets BPF at runtime, or userspace compilation, would be enough. Andrew Lunn argued the opposite on the compiler placement: the long P4 offload fight showed that compiling in userspace made it hard to prove the software and hardware paths were the same and opened a route to closed-source blobs that were really kernel bypass. An in-kernel compiler, he wrote, is probably the correct open-source-friendly approach; alternatively the GPU itself might compile BPF bytecode to native code.
Automated review of the RFC also reported a long list of serious defects, including use-after-free and lifetime bugs in the core and NIC hooks, a broken IPsec anti-replay window, and reliance on a userspace helper for process context.