[ovs-dev] [PATCH] docs: Add header install command for afxdp.

William Tu u9012063 at gmail.com
Tue Jan 21 17:48:28 UTC 2020

The 'XDP_RING_NEED_WAKEUP' and related flags are defined if_xdp.h, so after
installing newer kernel, users have to update the kernel's header files,
by doing:
  $ make headers_install INSTALL_HDR_PATH=/usr

Otherwise the following error shows:
/usr/local/include/bpf/xsk.h: In function 'xsk_ring_prod__needs_wakeup':
/usr/local/include/bpf/xsk.h:82:21: error: 'XDP_RING_NEED_WAKEUP' undeclared \
  (first use in this function)
  return *r->flags & XDP_RING_NEED_WAKEUP;

Reported-by: Tomek Osinski <osinstom at gmail.com>
Reported-at: https://osinstom.github.io/en/tutorial/ovs-afxdp-installation/
Signed-off-by: William Tu <u9012063 at gmail.com>
 Documentation/intro/install/afxdp.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/intro/install/afxdp.rst b/Documentation/intro/install/afxdp.rst
index c4685fa7ebac..2683d8301bb7 100644
--- a/Documentation/intro/install/afxdp.rst
+++ b/Documentation/intro/install/afxdp.rst
@@ -125,6 +125,7 @@ Second, go into the Linux source directory and build libbpf in the tools
   cd bpf-next/
+  make headers_install INSTALL_HDR_PATH=/usr
   cd tools/lib/bpf/
   make && make install
   make install_headers

More information about the dev mailing list