Utilities and example programs for use with XDP
  • C 79.4%
  • Roff 11.2%
  • Shell 6.1%
  • Makefile 1.9%
  • Python 1.1%
  • Other 0.2%
Find a file
Muyang Tian f27ea2a83f libxdp: Document xsk_socket__create_opts()
xsk_socket__create_opts() is a public API - it is declared in
xdp/xsk.h and exported since LIBXDP_1.5.0 - but it is missing from
both the README and the man page, so the only hint that it exists is
the header. Its umem counterpart, xsk_umem__create_opts(), is already
documented as the recommended interface. The omission dates back to
abff006 ("libxdp: Use opts to create XDP socket"), which added the API
without any documentation.

Add the prototype to the control path listing in both files, describe
when to use it, and point the non-privileged socket setup paragraph at
it as well.

Meanwhile, stop presenting xsk_socket__create() and
xsk_socket__create_shared() as two independent ways of creating a
socket. Both are wrappers around xsk_socket__create_opts(), which
behaves like xsk_socket__create() when neither fill nor comp is set,
and like xsk_socket__create_shared() when both are set.

Signed-off-by: Muyang Tian <tianmuyang@htsc.com>
2026-09-14 15:03:17 +02:00
.github .github/workflows: Remove Coverity scan workflow 2026-08-31 10:10:23 +02:00
headers xdp-trafficgen: Reduce accounting cost 2026-07-13 11:57:57 +02:00
lib libxdp: Document xsk_socket__create_opts() 2026-09-14 15:03:17 +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 lib/export-man.el: Add lexical-binding marker 2026-08-27 13:04:03 +02:00
xdp-dump lib/export-man.el: Add lexical-binding marker 2026-08-27 13:04:03 +02:00
xdp-filter lib/export-man.el: Add lexical-binding marker 2026-08-27 13:04:03 +02:00
xdp-forward lib/export-man.el: Add lexical-binding marker 2026-08-27 13:04:03 +02:00
xdp-loader lib/export-man.el: Add lexical-binding marker 2026-08-27 13:04:03 +02:00
xdp-monitor lib/export-man.el: Add lexical-binding marker 2026-08-27 13:04:03 +02:00
xdp-trafficgen lib/export-man.el: Add lexical-binding marker 2026-08-27 13:04:03 +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 build: add uninstall target 2026-09-10 18:50:04 +02: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.