Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Express Data Path

From Wikipedia, the free encyclopedia
(Redirected fromXDP for Windows)
High performance packet data path in the OS kernel
XDP
Original authorsBrenden Blanco,
Tom Herbert
DevelopersOpen source community,Google,Amazon,Intel,Microsoft[1]
Initial release2016; 9 years ago (2016)
Written inC
Operating systemLinux,Windows
TypePacket filtering
LicenseLinux:GPL
Windows:MIT License

XDP (eXpress Data Path) is aneBPF-based high-performance network data path used to send and receivenetwork packets at high rates by bypassing most of theoperating systemnetworking stack. It is merged in theLinux kernel since version 4.8.[2] This implementation is licensed underGPL. Large technology firms including Amazon, Google and Intel support its development. Microsoft released theirfree and open source implementationXDP for Windows in May 2022.[1] It is licensed underMIT License.[3]

Data path

[edit]
Packet flow paths in theLinux kernel. XDP bypasses thenetworking stack andmemory allocation for packetmetadata.

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 thenetwork interface controller (NIC) driver just after theinterrupt processing, and before any memory allocation needed by thenetwork stack itself, because memory allocation can be an expensive operation. Due to this design, XDP can drop 26 million packets per second per core withcommodity hardware.[4]

The eBPF program must pass a preverifier test[5] 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 oruser space socket via theAF_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.[6]

XDP has infrastructure to offload the eBPF program to a network interface controller which supports it, reducing the CPU load. In 2023, only Netronome[7] cards support it.

Microsoft is partnering with other companies and adding support for XDP in itsMsQuic implementation of theQUIC protocol.[1]

AF_XDP

[edit]

Along with XDP, a newaddress family entered in the Linux kernel starting 4.18.[8] AF_XDP, formerly known as AF_PACKETv4 (which was never included in the mainline kernel),[9] is araw socket optimized for high performance packet processing and allowszero-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.[10]

See also

[edit]

References

[edit]
  1. ^abcJawad, Usama (25 May 2022)."Microsoft brings Linux XDP project to Windows".Neowin. Retrieved26 May 2022.
  2. ^"[GIT] Networking - David Miller".lore.kernel.org. Retrieved2019-05-14.
  3. ^Yasar, Erdem (25 May 2022)."Microsoft introduced open-source XDP for Windows".cloud7. Archived fromthe original on 25 May 2022. Retrieved26 May 2022.
  4. ^Høiland-Jørgensen, Toke (2019-05-03),Source text and experimental data for our paper describing XDP: tohojo/xdp-paper, retrieved2019-05-21
  5. ^"A thorough introduction to eBPF [LWN.net]".lwn.net. Retrieved2019-05-14.
  6. ^"net: Generic XDP".www.mail-archive.com. Retrieved2019-05-14.
  7. ^"BPF, eBPF, XDP and Bpfilter… What are these things and what do they mean for the enterprise? - Netronome".www.netronome.com. Archived fromthe original on 2020-09-24. Retrieved2019-05-14.
  8. ^"kernel/git/torvalds/linux.git - Linux kernel source tree".git.kernel.org. Retrieved2019-05-16.
  9. ^"Questions about AF_PACKET V4 and AF_XDP".Kernel.org.
  10. ^Corbet, Jonathan (9 April 2018)."Accelerating networking with AF_XDP [LWN.net]".lwn.net. Retrieved2019-05-16.

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Express_Data_Path&oldid=1320944143"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp