[v6,4/7] net/tap: set BPF syscall ID for LoongArch

Message ID 20220827085908.52080-5-zhoumin@loongson.cn (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series Introduce support for LoongArch architecture |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

zhoumin Aug. 27, 2022, 8:59 a.m. UTC
  Define the missing __NR_bpf syscall id to enable the tap PMD on
LoongArch.

Signed-off-by: Min Zhou <zhoumin@loongson.cn>
---
 drivers/net/tap/meson.build | 6 ------
 drivers/net/tap/tap_bpf.h   | 2 ++
 2 files changed, 2 insertions(+), 6 deletions(-)
  

Patch

diff --git a/drivers/net/tap/meson.build b/drivers/net/tap/meson.build
index f0d03069cd..c09713a67b 100644
--- a/drivers/net/tap/meson.build
+++ b/drivers/net/tap/meson.build
@@ -1,12 +1,6 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2018 Luca Boccassi <bluca@debian.org>
 
-if arch_subdir == 'loongarch'
-    build = false
-    reason = 'not supported on LoongArch'
-    subdir_done()
-endif
-
 if not is_linux
     build = false
     reason = 'only supported on Linux'
diff --git a/drivers/net/tap/tap_bpf.h b/drivers/net/tap/tap_bpf.h
index 639bdf3a79..0d38bc111f 100644
--- a/drivers/net/tap/tap_bpf.h
+++ b/drivers/net/tap/tap_bpf.h
@@ -103,6 +103,8 @@  union bpf_attr {
 #  define __NR_bpf 361
 # elif defined(__riscv)
 #  define __NR_bpf 280
+# elif defined(__loongarch__)
+#  define __NR_bpf 280
 # else
 #  error __NR_bpf not defined
 # endif