Skip to content

Commit 96631f2

Browse files
authored
Update setup_dependencies.org
I am doing some XDP experiments with 2 Raspberry Pi 3 running Debian Buster. I had some minor setup issues and would be glad to share the lessons learned with you.
1 parent d419031 commit 96631f2

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

setup_dependencies.org

+36
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,46 @@ is provided by Netronome
185185
[[https://help.netronome.com/support/solutions/articles/36000050009-agilio-ebpf-2-0-6-extended-berkeley-packet-filter][on their support website]].
186186
The binary is statically linked, and should work on any x86-64 Linux machine.
187187

188+
If you are using Debian Buster, you may acitvate buster-backports in /etc/apt/sources.list to get access to bpftool.
189+
190+
#+begin_example
191+
$ cat /etc/apt/sources.list
192+
deb http://deb.debian.org/debian buster main contrib non-free
193+
deb http://deb.debian.org/debian-security buster/updates main contrib non-free
194+
# Backports are _not_ enabled by default.
195+
# Enable them by uncommenting the following line:
196+
deb http://deb.debian.org/debian buster-backports main contrib non-free
197+
198+
$ apt update
199+
$ apt install bpftool
200+
#+end_example
201+
202+
If you are doing your experiments on a Raspberry Pi (or maybe other ARM based architectures) you might run into some dependency errors:
203+
204+
#+begin_example
205+
In file included from xdp_pass_kern.c:2:
206+
In file included from ../headers/linux/bpf.h:11:
207+
/usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not found
208+
#include <asm/types.h>
209+
^~~~~~~~~~~~~
210+
#+end_example
211+
212+
Add additional BPF_CFLAGS in common/common.mk will fix that:
213+
214+
#+begin_example
215+
$ git diff common/common.mk
216+
...
217+
BPF_CFLAGS ?= -I$(LIBBPF_DIR)/build/usr/include/ -I../headers/
218+
+BPF_CFLAGS += -I/usr/include/aarch64-linux-gnu
219+
#+end_example
220+
221+
188222
** Packages on openSUSE
189223

190224
On a machine running the openSUSE Tumbleweed distribution, install package:
191225

192226
#+begin_example
193227
$ sudo zypper install bpftool
194228
#+end_example
229+
230+
**

0 commit comments

Comments
 (0)