1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2019 Intel Corporation.
4 AF_XDP Poll Mode Driver
5 ==========================
7 AF_XDP is an address family that is optimized for high performance
8 packet processing. AF_XDP sockets enable the possibility for XDP program to
9 redirect packets to a memory buffer in userspace.
11 For the full details behind AF_XDP socket, you can refer to
12 `AF_XDP documentation in the Kernel
13 <https://www.kernel.org/doc/Documentation/networking/af_xdp.rst>`_.
15 This Linux-specific PMD driver creates the AF_XDP socket and binds it to a
16 specific netdev queue, it allows a DPDK application to send and receive raw
17 packets through the socket which would bypass the kernel network stack.
18 Current implementation only supports single queue, multi-queues feature will
21 Note that MTU of AF_XDP PMD is limited due to XDP lacks support for
27 The following options can be provided to set up an af_xdp port in DPDK.
29 * ``iface`` - name of the Kernel interface to attach to (required);
30 * ``queue`` - netdev queue id (optional, default 0);
35 This is a Linux-specific PMD, thus the following prerequisites apply:
37 * A Linux Kernel (version > v4.18) with XDP sockets configuration enabled;
38 * libbpf (within kernel version > v5.1-rc4) with latest af_xdp support installed,
39 User can install libbpf via `make install_lib` && `make install_headers` in
40 <kernel src tree>/tools/lib/bpf;
41 * A Kernel bound interface to attach to;
43 Set up an af_xdp interface
44 -----------------------------
46 The following example will set up an af_xdp interface in DPDK:
48 .. code-block:: console
50 --vdev net_af_xdp,iface=ens786f1,queue=0