xdp-features is a Linux command-line tool for inspecting and checking
XDP/AF_XDP readiness on network interfaces.
It has two subcommands:
infoprints a human-readable report.checkis quiet and intended for scripts.
xdp-features <COMMAND>
demo3.mp4
Inspect every interface:
target/debug/xdp-features infoInspect one interface:
target/debug/xdp-features info --interface eth0
target/debug/xdp-features info -i eth0 --verboseWithout --interface, info prints a compact summary for every interface,
grouped as physical interfaces and virtual/logical interfaces. With
--interface, it prints a detailed report for that interface.
Default output shows NIC identity when available and status lines for XDP, zero-copy, and TX ring size. Verbose mode also prints raw kernel netlink values, all known feature flags, PCI details, and RX ring size as informational output.
Example summary:
Physical interfaces:
enp5s0f0: ✅ XDP, ✅ zero-copy, ✅ TX ring 512, Intel Corporation Ethernet Controller X710 for 10GBASE-T [8086:15ff]
Virtual/logical interfaces:
lo: ❌ error: netlink response did not include NETDEV_A_DEV_XDP_FEATURES
Example detailed report:
Interface: enp5s0f0
NIC: Intel Corporation Ethernet Controller X710 for 10GBASE-T [8086:15ff]
Driver: i40e
PCI slot: 0000:05:00.0
✅ XDP: supported
✅ Zero-copy: supported
✅ TX ring: 512, ok
NIC identity is best-effort. The tool reads PCI information from sysfs and uses
lspci when available to resolve a human-readable model. If the model cannot be
resolved, it falls back to PCI vendor/device IDs.
Check that an interface supports XDP and has a valid TX ring size. check
always requires -i or --interface:
target/debug/xdp-features check --interface eth0Also require AF_XDP zero-copy support:
target/debug/xdp-features check -i eth0 --zero-copycheck prints nothing on success. On failure it writes only the failed
requirement or runtime error to stderr and exits nonzero. Possible failure
messages include:
XDP not supported
zero-copy not supported
TX ring size is invalid: 511 (try: sudo ethtool -G eth0 tx 512)
unable to query ring sizes: <error>
error: <netlink or interface error>
info:
0 inspected interface reports are ready
1 inspected interface reports were queried but are not ready
2 runtime/query error
check:
0 all requested checks passed
1 one or more checks failed, including runtime/query errors
For check, the default checks are XDP support and valid TX ring size.
--zero-copy additionally requires zero-copy support. A TX ring size of zero or
a non-power-of-two TX ring size fails the check. Failure to query ring sizes also
fails the check.
Special thanks to Darius from Cherry Servers for providing access to NICs used for testing and debugging.