[dpdk-dev,v1] net/tap: add eBPF ARM and POWERPC architectures support

Message ID 1517406286-4306-1-git-send-email-ophirmu@mellanox.com (mailing list archive)
State Superseded, 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, 1:44 p.m. UTC
  This commit adds eBPF system call definitions for ARM and POWERPC
architectures.
Old Linux header files may not define eBPF system call numbers.
In order to enable a successful eBPF compilation on all Linux
platforms - the missing system call definitions are explicitly added.

#elif defined(__powerpc__)
# define __NR_bpf 361
#elif defined(__arm__)
# define __NR_bpf 386

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

Comments

Thomas Monjalon Jan. 31, 2018, 2:28 p.m. UTC | #1
31/01/2018 14:44, Ophir Munk:
> This commit adds eBPF system call definitions for ARM and POWERPC
> architectures.
> Old Linux header files may not define eBPF system call numbers.
> In order to enable a successful eBPF compilation on all Linux
> platforms - the missing system call definitions are explicitly added.
> 
> #elif defined(__powerpc__)
> # define __NR_bpf 361
> #elif defined(__arm__)
> # define __NR_bpf 386

PowerPC is already added on master branch.
  

Patch

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