[RESEND,v4,4/8] net/tap: set BPF syscall ID for RISC-V

Message ID 20220607104617.153892-5-kda@semihalf.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series Introduce support for RISC-V architecture |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Stanislaw Kardach June 7, 2022, 10:46 a.m. UTC
  Define the missing __NR_bpf syscall id to enable the tap PMD.

Sponsored-by: Frank Zhao <Frank.Zhao@starfivetech.com>
Sponsored-by: Sam Grove <sam.grove@sifive.com>
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