summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2022-12-22 01:06:23 +0100
committerIlya Maximets <i.maximets@ovn.org>2023-01-03 16:06:30 +0100
commit771a55825f4a1d84c18439ae5a7485807169b0f9 (patch)
tree3e4a34983792e0e54bfa3d907119462873fae383 /Documentation
parent649dbc19ffc0acd050ad729b9052aba8c7fce090 (diff)
downloadopenvswitch-771a55825f4a1d84c18439ae5a7485807169b0f9.tar.gz
Documentation/afxdp: Use packaged libbpf/libxdp for the build.
Necessary bits was removed from the kernel's libbpf in 6.0 release, so the instructions on how to build libbpf from kernel sources are now incorrect. Suggest to use libbpf and libxdp packaged by distributions instead. Acked-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/intro/install/afxdp.rst39
1 files changed, 8 insertions, 31 deletions
diff --git a/Documentation/intro/install/afxdp.rst b/Documentation/intro/install/afxdp.rst
index bfef49860..a4f0b87fe 100644
--- a/Documentation/intro/install/afxdp.rst
+++ b/Documentation/intro/install/afxdp.rst
@@ -88,7 +88,7 @@ Build requirements
In addition to the requirements described in :doc:`general`, building Open
vSwitch with AF_XDP will require the following:
-- libbpf from kernel source tree (kernel 5.0.0 or later)
+- ``libbpf`` and ``libxdp`` (if version of ``libbpf`` if higher than ``0.6``).
- Linux kernel XDP support, with the following options (required)
@@ -125,41 +125,18 @@ vSwitch with AF_XDP will require the following:
Installing
----------
For OVS to use AF_XDP netdev, it has to be configured with LIBBPF support.
-First, clone a recent version of Linux bpf-next tree::
- git clone git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
+First, install ``libbpf`` and ``libxdp``. For example, on Fedora these
+libraries along with development headers can be obtained by installing
+``libbpf-devel`` and ``libxdp-devel`` packages. For Ubuntu that will be
+``libbpf-dev`` package with additional ``libxdp-dev`` on Ubuntu 22.10
+or later.
-Second, go into the Linux source directory and build libbpf in the tools
-directory::
-
- cd bpf-next/
- cd tools/lib/bpf/
- make && make install
- make install_headers
-
-.. note::
- Make sure xsk.h and bpf.h are installed in system's library path,
- e.g. /usr/local/include/bpf/ or /usr/include/bpf/
-
-Make sure the libbpf.so is installed correctly::
-
- ldconfig
- ldconfig -p | grep libbpf
-
-.. note::
- Check /etc/ld.so.conf if libbpf is installed but can not be found by
- ldconfig.
-
-Third, ensure the standard OVS requirements are installed and
+Next, ensure the standard OVS requirements are installed and
bootstrap/configure the package::
./boot.sh && ./configure --enable-afxdp
-.. note::
- If you encounter "WARNING: bpf/libbpf.h: present but cannot be compiled",
- check the Linux headers are in line with libbpf. For example, in Ubuntu,
- check the installed linux-headers* and linux-libc-dev* dpkg.
-
Finally, build and install OVS::
make && make install
@@ -182,7 +159,7 @@ If a test case fails, check the log at::
Setup AF_XDP netdev
-------------------
-Before running OVS with AF_XDP, make sure the libbpf, libelf, and libnuma are
+Before running OVS with AF_XDP, make sure the libbpf and libnuma are
set-up right::
ldd vswitchd/ovs-vswitchd