diff mbox series

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

Message ID 1579798991-41829-1-git-send-email-u9012063@gmail.com
State Accepted
Commit 20dac08fdcce4b7fda1d07add3b346aa9751cfbc
Headers show
Series [ovs-dev,PATCHv2] docs: Add header install command for afxdp. | expand

Commit Message

William Tu Jan. 23, 2020, 5:03 p.m. UTC
The 'XDP_RING_NEED_WAKEUP' and related flags are defined if_xdp.h, so if
users are building their own 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@gmail.com>
Reported-at: https://osinstom.github.io/en/tutorial/ovs-afxdp-installation/
Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Ben Pfaff <blp@ovn.org>
---
 Documentation/intro/install/afxdp.rst | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

William Tu Jan. 29, 2020, 6:55 p.m. UTC | #1
On Thu, Jan 23, 2020 at 09:03:11AM -0800, William Tu wrote:
> The 'XDP_RING_NEED_WAKEUP' and related flags are defined if_xdp.h, so if
> users are building their own 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@gmail.com>
> Reported-at: https://osinstom.github.io/en/tutorial/ovs-afxdp-installation/
> Signed-off-by: William Tu <u9012063@gmail.com>
> Acked-by: Ben Pfaff <blp@ovn.org>
> ---
>  Documentation/intro/install/afxdp.rst | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/intro/install/afxdp.rst b/Documentation/intro/install/afxdp.rst
> index c4685fa7ebac..99003e4dbdb2 100644
> --- a/Documentation/intro/install/afxdp.rst
> +++ b/Documentation/intro/install/afxdp.rst
> @@ -108,6 +108,14 @@ vSwitch with AF_XDP will require the following:
>  
>    * CONFIG_XDP_SOCKETS_DIAG=y (Debugging)
>  
> +- If you're building your own kernel, be sure that you're installing kernel
> +  headers too.  For example, with the following command::
> +
> +    make headers_install INSTALL_HDR_PATH=/usr
> +
> +- If you're using kernel from the distribution, be sure that corresponding
> +  kernel headers package installed.
> +
>  - Once your AF_XDP-enabled kernel is ready, if possible, run
>    **./xdpsock -r -N -z -i <your device>** under linux/samples/bpf.
>    This is an OVS independent benchmark tools for AF_XDP.
> -- 
> 2.7.4
> 

I applied to master, thanks
diff mbox series

Patch

diff --git a/Documentation/intro/install/afxdp.rst b/Documentation/intro/install/afxdp.rst
index c4685fa7ebac..99003e4dbdb2 100644
--- a/Documentation/intro/install/afxdp.rst
+++ b/Documentation/intro/install/afxdp.rst
@@ -108,6 +108,14 @@  vSwitch with AF_XDP will require the following:
 
   * CONFIG_XDP_SOCKETS_DIAG=y (Debugging)
 
+- If you're building your own kernel, be sure that you're installing kernel
+  headers too.  For example, with the following command::
+
+    make headers_install INSTALL_HDR_PATH=/usr
+
+- If you're using kernel from the distribution, be sure that corresponding
+  kernel headers package installed.
+
 - Once your AF_XDP-enabled kernel is ready, if possible, run
   **./xdpsock -r -N -z -i <your device>** under linux/samples/bpf.
   This is an OVS independent benchmark tools for AF_XDP.