diff mbox series

[ovs-dev,v3,6/8] Documentation/afxdp: Use packaged libbpf/libxdp for the build.

Message ID 20221221152459.133366-7-i.maximets@ovn.org
State Superseded
Headers show
Series AF_XDP build fixes and enhancements. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation fail test: fail

Commit Message

Ilya Maximets Dec. 21, 2022, 3:24 p.m. UTC
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>
---
 Documentation/intro/install/afxdp.rst | 39 ++++++---------------------
 1 file changed, 8 insertions(+), 31 deletions(-)
diff mbox series

Patch

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