Linux Kernel Journey
Linux Kernel Journey
Sep 30, 2024 · Cloud Native

How to Eliminate the Per‑CPU Map in XDP TCP‑Option Parsing

This article walks through removing the per‑CPU map used to pass the TCP‑option offset in an XDP program, shows the required code changes, explains the verifier errors that arise, and presents the final fix using an int offset with a bitwise mask.

BPF verifierLinux kernelTCP options
0 likes · 8 min read
How to Eliminate the Per‑CPU Map in XDP TCP‑Option Parsing