xdp-bench(8) A simple XDP benchmarking tool xdp-bench(8) (NAME) xdp-bench - XDP (SYNOPSIS) XDP-bench (benchmarking) XDP . (dropping) (hairpin forwarding XDP_TX) . drop TX ( ) . (redirection) ifindex bpf_redirect bpf_redirect_map cpumap bpf_redirect_map devmap (broadcast) devmap . () (extended) . xdp-bench xdp-bench : Usage: xdp-bench COMMAND [options] COMMAND can be one of: drop - Drop all packets on an interface pass - Pass all packets to the network stack tx - Transmit packets back out on an interface (hairpin forwarding) redirect - XDP redirect using the bpf_redirect() helper redirect-cpu - XDP CPU redirect using BPF_MAP_TYPE_CPUMAP redirect-map - XDP redirect using BPF_MAP_TYPE_DEVMAP redirect-multi - XDP multi-redirect using BPF_MAP_TYPE_DEVMAP and the BPF_F_BROADCAST flag xsk-drop - AF_XDP socket-based drop xsk-tx - AF_XDP socket-based hairpin forwarding . xdp-bench COMMAND --help . DROP xdp-bench XDP . ( ) . ( ) XDP . drop : xdp-bench drop [options] XDP . : -p, --packet-operation . : no-touch - Drop the packet without touching the packet data read-data - Read a field in the packet header before dropping parse-ip - Parse the IP header field before dropping swap-macs - Swap the source and destination MAC addresses before dropping (cache) ( ) . no-touch . -l, --load-mode xdp-bench ( ) . : dpa - Use traditional Direct Packet Access from the XDP program load-bytes - Use the xdp_load_bytes() and xdp_store_bytes() helper functions . dpa . -r, --rxq-stats XDP (receive queue index) . ( ) . -i, --interval (polling interval) . . -e, --extended xdp-bench <<>> (extended). xdp-bench <<>> (terse) . C-\ . . -m, --mode XDP (native skb). native XDP skb . XDP . -v, --verbose . libxdp libbpf . --version . -h, --help . PASS xdp-bench XDP ( XDP_PASS). ( ) . XDP . pass : xdp-bench pass [options] XDP . : -p, --packet-operation . : no-touch - Pass the packet without touching the packet data read-data - Read a field in the packet header before passing parse-ip - Parse the IP header field before passing swap-macs - Swap the source and destination MAC addresses before passing no-touch . -l, --load-mode xdp-bench ( ) . : dpa - Use traditional Direct Packet Access from the XDP program load-bytes - Use the xdp_load_bytes() and xdp_store_bytes() helper functions . dpa . -r, --rxq-stats XDP . ( ) . -i, --interval . . -e, --extended xdp-bench <<>> (extended). xdp-bench <<>> (terse) . C-\ . . -m, --mode XDP (native skb). native XDP skb . XDP . -v, --verbose . libxdp libbpf . --version . -h, --help . TX xdp-bench XDP << >> (hairpin forwarding) ( XDP_TX). ( ) . tx : xdp-bench tx [options] XDP . : -p, --packet-operation . : no-touch - Transmit the packet without touching the packet data read-data - Read a field in the packet header before transmitting parse-ip - Parse the IP header field before transmitting swap-macs - Swap the source and destination MAC addresses before transmitting MAC (swap) MAC . . swap-macs . -l, --load-mode xdp-bench ( ) . : dpa - Use traditional Direct Packet Access from the XDP program load-bytes - Use the xdp_load_bytes() and xdp_store_bytes() helper functions . dpa . -r, --rxq-stats XDP . ( ) . -i, --interval . . -e, --extended xdp-bench <<>> (extended). xdp-bench <<>> (terse) . C-\ . . -m, --mode XDP (native skb). native XDP skb . XDP . -v, --verbose . libxdp libbpf . --version . -h, --help . REDIRECT xdp-bench BPF bpf_redirect (ingress) . redirect : xdp-bench redirect [options] . : -l, --load-mode xdp-bench ( ) . : dpa - Use traditional Direct Packet Access from the XDP program load-bytes - Use the xdp_load_bytes() and xdp_store_bytes() helper functions . dpa . -i, --interval . . -s, --stats . . -e, --extended xdp-bench <<>> (extended). xdp-bench <<>> (terse) . C-\ . . -m, --mode XDP (native skb). native XDP skb . XDP . -v, --verbose . libxdp libbpf . --version . -h, --help . REDIRECT-CPU xdp-bench BPF bpf_redirect_map cpumap . (CPU) . . redirect-cpu : xdp-bench redirect-cpu [options] -c 0 ... -c N -c . : -c, --cpu . . --program-mode . -p, --program-mode . : no-touch - Redirect without touching packet data touch - Read packet data before redirecting round-robin - Cycle between target CPUs in a round-robin fashion (for each packet) l4-proto - Choose the target CPU based on the layer-4 protocol of packet l4-filter - Like l4-proto, but drop UDP packets with destination port 9 (used by pktgen) l4-hash - Use source and destination IP hashing to pick target CPU l4-sport - Use modulo of source port to pick target CPU l4-dport - Use modulo of destination port to pick target CPU no-touch touch ( --cpu) . round-robin l4-hash --cpu l4-proto l4-filter TCP 0 UDP 1 ICMP 2 ( ). l4-hash . -r --remote-action cpumap . drop pass . redirect . redirect --redirect-device . disabled () . -r, --redirect-device . --remote-action redirect . -q, --qsize cpumap . 2048 . -x, --stress-mode (stress) cpumap cpumap . -i, --interval . . -s, --stats . . -e, --extended xdp-bench <<>> (extended). xdp-bench <<>> (terse) . C-\ . . -m, --mode XDP (native skb). native XDP skb . XDP . -v, --verbose . libxdp libbpf . --version . -h, --help . REDIRECT-MAP xdp-bench BPF bpf_redirect_map() devmap . redirect-map : xdp-bench redirect-map [options] . : -X, --load-egress devmap . egress-mode . -A, --egress-mode (egress) : forward - Update the packet data so its source MAC address matches the one of the destination interface. drop - Drop packet. forward . -i, --interval . . -s, --stats . . -e, --extended xdp-bench <<>> (extended). xdp-bench <<>> (terse) . C-\ . . -m, --mode XDP (native skb). native XDP skb . XDP . -v, --verbose . libxdp libbpf . --version . -h, --help . REDIRECT-MULTI xdp-bench BPF bpf_redirect_map devmap . devmap (broadcast) . redirect-multi : xdp-bench redirect-multi [options] ... . : -X, --load-egress devmap . egress-mode . -A, --egress-mode : forward - Update the packet data so its source MAC address matches the one of the destination interface. drop - Drop packet. forward . -i, --interval . . -s, --stats . . -e, --extended xdp-bench <<>> (extended). xdp-bench <<>> (terse) . C-\ . . -m, --mode XDP (native skb). native XDP skb . XDP . -v, --verbose . libxdp libbpf . --version . -h, --help . XSK-DROP XSK-TX xdp-bench ( drop tx) AF_XDP XDP (userspace) . AF_XDP . - . xdpsock bpf-examples . xsk-drop --rxdrop xdpsock xsk-tx --l2fwd xdpsock . : xdp-bench xsk-drop [options] xdp-bench xsk-tx [options] : -q, --queue . AF_XDP (bind) xdp-bench . 0 . -i, --interval . 2 . -f, --frame-size . . --unaligned . 4096 ( ). -d, --duration . 0 ( ). -b, --batch-size (batch size) . . 64 . -I, --irq-string irq-string /proc/interrupts. IRQ . ( IRQ ). -p, --poll poll() . -m, --no-need-wakeup XDP_USE_NEED_WAKEUP AF_XDP. . -u, --unaligned (unaligned) . xdp-bench (huge pages) . ( --frame-size ). -M, --shared-umem AF_XDP. xdp-bench (round-robin) . -x, --extra-stats . -Q, --quiet . -a, --app-stats . -B, --busy-poll SO_PREFER_BUSY_POLL (IRQs) (busy-poll) . sysctl napi_defer_hard_irqs gro_flush_timeout . https://docs.kernel.org/networking/napi.html#software-irq- coalescing . -F, --frags XDP (fragments). . -C, --copy-mode . auto copy zero-copy . auto . zero-copy XDP native (--attach-mode ). -w, --clock . MONOTONIC REALTIME TAI BOOTTIME MONOTONIC . -W, --policy (scheduler policy) . SCHED_OTHER SCHED_FIFO SCHED_OTHER . -U, --schpri SCHED_FIFO. 0 . -A, --attach-mode XDP (native skb). native . zero- copy native . -v, --verbose . libxdp libbpf . --version . -h, --help . (OUTPUT FORMAT DESCRIPTION) --stats . (terse) (extended) --extended . SIGQUIT ( Ctrl + \) . : rx/s redir/s err,drop/s ( drop) xmit/s : FIELD DESCRIPTION receive . pkt/s - drop/s - error/s - redirect - redirect_err s- redir/s - redirect_err (errno) : EINVAL: ENETDOWN: EMSGSIZE: EOPNOTSUPP: ENOSPC: ptr_ring cpumap error/s - enqueue to cpu N N cpu:FROM->N . pkt/s - N drop/s - N bulk-avg - kthread CPUMAP ptr_ring xdp_stats ( bpf CPUMAP) . pkt/s - ptr_ring drop/s - sched - ()schedule xdp_stats ( ) pass/s - XDP_PASS CPUMAP drop/s - XDP_DROP CPUMAP redir/s - XDP_REDIRECT CPUMAP xdp_exception xdp_exception XDP XDP_ABORTED hit/s - devmap_xmit devmap_xmit XDP SKB xmit/s - drop/s - drv_err/s - bulk-avg - (BUGS) : https://github.com/xdp-project/xdp-tools/issues (AUTHOR) xdp-redirect Jesper Dangaard Brouer John Fastabend . Kumar Kartikeya Dwivedi Toke Hoiland-Jorgensen xdp-tools . Kumar Kartikeya Dwivedi Toke Hoiland-Jorgensen . V1.6.3 February 19, 2026 xdp-bench(8)