Utilities and example programs for use with XDP
  • C 79.6%
  • Roff 11.1%
  • Shell 6.1%
  • Makefile 1.8%
  • Python 1.1%
  • Other 0.2%
Find a file
Kumar Kartikeya Dwivedi fb6212bdf4 xdp-trafficgen: Reduce accounting cost
When the tracepoint is active for xdp_devmap_xmit, we will constantly
hammer bucket spin lock even when the entry already exists. This scales
poorly with multiple threads generating traffic. Defer update to create
the entry to first lookup failure, so that contention can be avoided.

Before this change, up to 30% of time on CPUs would be spent in the slow
path, and after this the contention drops to 0. In a test scenario
xmit/s went from 15 million to 20 million with 16 threads.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-13 11:57:57 +02:00
.github .github/workflows: Add kernel 7.0 to CI 2026-05-20 17:00:26 +02:00
headers xdp-trafficgen: Reduce accounting cost 2026-07-13 11:57:57 +02:00
lib libxdp: bound dispatcher map size and program count on read-back 2026-06-09 15:15:55 +02:00
LICENSES Include text of all licenses 2021-05-04 17:33:49 +02:00
packaging Bump to version 1.6.3 2026-03-25 12:44:04 +01:00
xdp-bench xdp-bench: fix get_port_ipv6_tcp testing nexthdr against IPPROTO_UDP 2026-06-08 17:59:39 +02:00
xdp-dump build: use gnu2x to avoid stdbool.h dependency 2026-05-20 10:51:22 +02:00
xdp-filter xdp-filter: note --keep-maps does not preserve the policy 2026-06-09 21:43:14 +02:00
xdp-forward xdp-forward: Use parsing helpers for FIB forwarding program 2026-06-01 17:00:20 +02:00
xdp-loader build: use gnu2x to avoid stdbool.h dependency 2026-05-20 10:51:22 +02:00
xdp-monitor build: use gnu2x to avoid stdbool.h dependency 2026-05-20 10:51:22 +02:00
xdp-trafficgen build: use gnu2x to avoid stdbool.h dependency 2026-05-20 10:51:22 +02:00
.clang-format Apply clang-format (selectively) to rest of codebase 2020-08-13 23:49:04 +02:00
.dockerignore Add Dockerfile 2025-09-11 11:58:39 +02:00
.gitignore libxdp: add device binding support 2025-12-16 23:15:38 +01:00
.gitmodules libbpf: Update to v1.0.0 2022-09-16 11:35:44 +01:00
.lgtm.yml lgtm: set RELAXED_LLVM_VERSION 2021-04-14 21:59:30 +02:00
configure configure: fix syntax error in bpftool detection 2026-05-08 11:31:23 +02:00
LICENSE Include text of all licenses 2021-05-04 17:33:49 +02:00
Makefile Makefile: remove all built artifacts on make clean 2026-02-19 12:41:18 +01:00
mkarchive.sh mkarchive.sh: Default to current version 2023-10-21 00:43:18 +02:00
README.org README: Add link to xdp-forward subdirectory 2024-10-11 17:56:30 +02:00
version.mk Bump to version 1.6.3 2026-03-25 12:44:04 +01:00

xdp-tools - Library and utilities for use with XDP

This repository contains the libxdp library for working with the eXpress Data Path facility of the Linux kernel, and a collection of utilities and example code that uses the library.

The repository contains the following:

  • lib/libxdp/ - the libxdp library itself - can be built standalone using make libxdp
  • xdp-bench/ - an XDP benchmarking tool
  • xdp-dump/ - a tcpdump-like tool for capturing packets at the XDP layer
  • xdp-filter/ - a simple packet filtering utility powered by XDP
  • xdp-forward/ - an XDP forwarding plane
  • xdp-loader/ - a command-line utility for loading XDP programs using libxdp
  • xdp-monitor/ - a simple XDP tracepoint monitoring tool
  • xdp-trafficgen/ - an XDP-based packet generator
  • headers/xdp/ - reusable eBPF code snippets for XDP (installed in /usr/include/xdp by make install).
  • lib/util/ - common code shared between the different utilities
  • packaging/ - files used for distro packaging
  • lib/libbpf/ - a git submodule with libbpf, used if the system version is not recent enough

To compile, first run ./configure, then simply type make. Make sure you either have a sufficiently recent libbpf installed on your system, or that you pulled down the libbpf git submodule (git submodule init && git submodule update).

For a general introduction to XDP, please see the XDP tutorial, and for more BPF and XDP examples, see the bpf-examples repository.