ArticleslgStudy

computer science

Express Data Path

Express Data Path is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Express Data Path rather than just read about it. In short: XDP (eXpress Data Path) is an eBPF-based high-performance network data path used to send and receive network packets at high rates by bypassing most of the operating system networking stack. It is merged in the Linux kernel since version 4.8.

Express Data Path — main illustration
Express Data Path — illustration

Key takeaways

  • Express Data Path belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Express Data Path to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Express Data Path from memory before moving on to harder problems.

Reference excerpt

XDP (eXpress Data Path) is an eBPF-based high-performance network data path used to send and receive network packets at high rates by bypassing most of the operating system networking stack. It is merged in the Linux kernel since version 4.8. This implementation is licensed under GPL. Large technology firms including Amazon, Google and Intel support its development. Microsoft released their free and open source implementation XDP for Windows in May 2022. It is licensed under MIT License.

Data path

The idea behind XDP is to add an early hook in the RX path of the kernel, and let a user supplied eBPF program decide the fate of the packet. The hook is placed in the network interface controller (NIC) driver just after the interrupt processing, and before any memory allocation needed by the network stack itself, because memory allocation can be an expensive operation. Due to this design, XDP can drop 26 million packets per second per core with commodity hardware. The eBPF program must pass a preverifier test before being loaded, to avoid executing malicious code in kernel space. The preverifier checks that the program contains no out-of-bounds accesses, loops or global variables. The program is allowed to edit the packet data and, after the eBPF program returns, an action code determines what to do with the packet:

XDP_PASS: let the packet continue through the network stack XDP_DROP: silently drop the packet XDP_ABORTED: drop the packet with trace point exception XDP_TX: bounce the packet back to the same NIC it arrived on XDP_REDIRECT: redirect the packet to another NIC or user space socket via the AF_XDP address family XDP requires support in the NIC driver but, as not all drivers support it, it can fallback to a generic implementation, which performs the eBPF processing in the network stack, though with slower performance. XDP has infrastructure to offload the eBPF program to a network interface controller which supports it, reducing the CPU load. In 2023, only Netronome cards support it. Microsoft is partnering with other companies and adding support for XDP in its MsQuic implementation of the QUIC protocol.

AF_XDP Along with XDP, a new address family entered in the Linux kernel starting 4.18. AF_XDP, formerly known as AF_PACKETv4 (which was never included in the mainline kernel), is a raw socket optimized for high performance packet processing and allows zero-copy between kernel and applications. As the socket can be used for both receiving and transmitting, it supports high performance network applications purely in user space.

See also

Application layer Network layer Data link layer

References

External links XDP documentation on Read the Docs AF_XDP documentation on kernel.org xdp-for-windows on GitHub XDP walkthrough at FOSDEM 2017 by Daniel Borkmann, Cilium AF_XDP at FOSDEM 2018 by Magnus Karlsson, Intel eBPF.io - Introduction, Tutorials & Community Resources L4Drop: XDP DDoS Mitigations, Cloudflare Unimog: Cloudflare's edge load balancer, Cloudflare Open-sourcing Katran, a scalable network load balancer, Facebook Cilium's L4LB: standalone XDP load balancer, Cilium Kube-proxy replacement at the XDP layer, Cilium eCHO Podcast on XDP and load balancing

Worked examples

Example 1 — a first encounter with Express Data Path

Start with the simplest possible case. Write down what Express Data Path claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Express Data Path before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Express Data Path ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Express Data Path

In research
Express Data Path appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Express Data Path in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Express Data Path is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2016 software, Firewall software, Free software programmed in C, so understanding it makes those chapters shorter.
In everyday life
Look for Express Data Path outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Express Data Path” →

How to study Express Data Path in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Express Data Path means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Express Data Path out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Express Data Path in simple terms?

XDP (eXpress Data Path) is an eBPF-based high-performance network data path used to send and receive network packets at high rates by bypassing most of the operating system networking stack. It is merged in the Linux kernel since version 4.8.

Why does Express Data Path matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Express Data Path?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Express Data Path.

Tags

  • 2016 software
  • Firewall software
  • Free software programmed in C
  • Linux kernel features
  • Linux security software
  • Microsoft free software
  • Software using the GNU General Public License
  • Software using the MIT license

Keep exploring