[v8,3/6] net/memif: set memfd syscall ID on LoongArch

Message ID 20221004154047.35276-4-zhoumin@loongson.cn (mailing list archive)
State Accepted, 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 Oct. 4, 2022, 3:40 p.m. UTC
  Define the missing __NR_memfd_create syscall id to enable the memif
PMD on LoongArch.

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

Patch

diff --git a/drivers/net/memif/meson.build b/drivers/net/memif/meson.build
index 30c0fbc798..680bc8631c 100644
--- a/drivers/net/memif/meson.build
+++ b/drivers/net/memif/meson.build
@@ -1,12 +1,6 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2018-2019 Cisco Systems, Inc.  All rights reserved.
 
-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/memif/rte_eth_memif.h b/drivers/net/memif/rte_eth_memif.h
index 81e7dceae0..eb692aee68 100644
--- a/drivers/net/memif/rte_eth_memif.h
+++ b/drivers/net/memif/rte_eth_memif.h
@@ -182,6 +182,8 @@  const char *memif_version(void);
 #define __NR_memfd_create 356
 #elif defined __riscv
 #define __NR_memfd_create 279
+#elif defined __loongarch__
+#define __NR_memfd_create 279
 #else
 #error "__NR_memfd_create unknown for this architecture"
 #endif