[dpdk-dev,v1] net/tap: fix build on ARM

Message ID 1517414638-29180-1-git-send-email-ophirmu@mellanox.com (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ophir Munk Jan. 31, 2018, 4:03 p.m. UTC
  This commit adds eBPF system call definitions for ARM architecture.
Old Linux header files may not define eBPF system call numbers.
In order to successful compile eBPF on all Linux platforms - the
missing ARM system call definition is explicitly added.

Fixes: b02d85e1 ("net/tap: add eBPF API")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
 drivers/net/tap/tap_bpf.h | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Thomas Monjalon Jan. 31, 2018, 6:10 p.m. UTC | #1
31/01/2018 17:03, Ophir Munk:
> This commit adds eBPF system call definitions for ARM architecture.
> Old Linux header files may not define eBPF system call numbers.
> In order to successful compile eBPF on all Linux platforms - the
> missing ARM system call definition is explicitly added.
> 
> Fixes: b02d85e1 ("net/tap: add eBPF API")
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>

Note: it is only for ARM32.

Applied, thanks
  

Patch

diff --git a/drivers/net/tap/tap_bpf.h b/drivers/net/tap/tap_bpf.h
index 8d6f9a2..0fa52a6 100644
--- a/drivers/net/tap/tap_bpf.h
+++ b/drivers/net/tap/tap_bpf.h
@@ -97,6 +97,8 @@  union bpf_attr {
 #  define __NR_bpf 349
 # elif defined(__s390__)
 #  define __NR_bpf 351
+# elif defined(__arm__)
+#  define __NR_bpf 386
 # else
 #  error __NR_bpf not defined
 # endif