[06/11] net/tap: set BPF syscall ID for RISC-V

Message ID 20220505173003.3242618-7-kda@semihalf.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Introduce support for RISC-V architecture |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stanislaw Kardach May 5, 2022, 5:29 p.m. UTC
  Define the missing __NR_bpf syscall id to enable the tap PMD.

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
---
 drivers/net/tap/meson.build | 5 -----
 drivers/net/tap/tap_bpf.h   | 2 ++
 2 files changed, 2 insertions(+), 5 deletions(-)
  

Patch

diff --git a/drivers/net/tap/meson.build b/drivers/net/tap/meson.build
index 3efac9ac07..c09713a67b 100644
--- a/drivers/net/tap/meson.build
+++ b/drivers/net/tap/meson.build
@@ -5,11 +5,6 @@  if not is_linux
     build = false
     reason = 'only supported on Linux'
 endif
-if arch_subdir == 'riscv'
-		build = false
-		reason = 'riscv arch not supported'
-		subdir_done()
-endif
 sources = files(
         'rte_eth_tap.c',
         'tap_bpf_api.c',
diff --git a/drivers/net/tap/tap_bpf.h b/drivers/net/tap/tap_bpf.h
index f0b9fc7a2c..639bdf3a79 100644
--- a/drivers/net/tap/tap_bpf.h
+++ b/drivers/net/tap/tap_bpf.h
@@ -101,6 +101,8 @@  union bpf_attr {
 #  define __NR_bpf 351
 # elif defined(__powerpc__)
 #  define __NR_bpf 361
+# elif defined(__riscv)
+#  define __NR_bpf 280
 # else
 #  error __NR_bpf not defined
 # endif