DPDK patches and discussions
 help / color / mirror / Atom feed
From: Min Zhou <zhoumin@loongson.cn>
To: thomas@monjalon.net, david.marchand@redhat.com,
	bruce.richardson@intel.com, anatoly.burakov@intel.com,
	qiming.yang@intel.com, Yuying.Zhang@intel.com,
	jgrajcia@cisco.com, konstantin.v.ananyev@yandex.ru,
	zhoumin@loongson.cn
Cc: dev@dpdk.org, maobibo@loongson.cn
Subject: [PATCH v5 5/7] examples/l3fwd: enable LoongArch operation
Date: Wed, 24 Aug 2022 16:31:21 +0800	[thread overview]
Message-ID: <20220824083123.583704-6-zhoumin@loongson.cn> (raw)
In-Reply-To: <20220824083123.583704-1-zhoumin@loongson.cn>

Add missing em_mask_key() implementation to enable the l3fwd to be
run on LoongArch.

Signed-off-by: Min Zhou <zhoumin@loongson.cn>
---
 examples/l3fwd/l3fwd_em.c  | 8 ++++++++
 examples/l3fwd/meson.build | 6 ------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index 10be24c61d..ad7d82e916 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -247,6 +247,14 @@ em_mask_key(void *key, xmm_t mask)
 
 	return vect_and(data, mask);
 }
+#elif defined(RTE_ARCH_LOONGARCH)
+static inline xmm_t
+em_mask_key(void *key, xmm_t mask)
+{
+	xmm_t data = vect_load_128(key);
+
+	return vect_and(data, mask);
+}
 #else
 #error No vector engine (SSE, NEON, ALTIVEC) available, check your toolchain
 #endif
diff --git a/examples/l3fwd/meson.build b/examples/l3fwd/meson.build
index afeb9b8c84..b40244a941 100644
--- a/examples/l3fwd/meson.build
+++ b/examples/l3fwd/meson.build
@@ -6,12 +6,6 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
-if arch_subdir == 'loongarch'
-	build = false
-	reason = 'not supported on LoongArch'
-	subdir_done()
-endif
-
 allow_experimental_apis = true
 deps += ['acl', 'hash', 'lpm', 'fib', 'eventdev']
 sources = files(
-- 
2.31.1


  parent reply	other threads:[~2022-08-24  8:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  8:31 [PATCH v5 0/7] Introduce support for LoongArch architecture Min Zhou
2022-08-24  8:31 ` [PATCH v5 1/7] eal/loongarch: support " Min Zhou
2022-08-25 13:56   ` David Marchand
2022-08-25 14:04     ` David Marchand
2022-08-26  8:48       ` zhoumin
2022-08-26  8:34     ` zhoumin
2022-08-24  8:31 ` [PATCH v5 2/7] net/ixgbe: add vector stubs for LoongArch Min Zhou
2022-08-24  8:31 ` [PATCH v5 3/7] net/memif: set memfd syscall ID on LoongArch Min Zhou
2022-08-24  8:31 ` [PATCH v5 4/7] net/tap: set BPF syscall ID for LoongArch Min Zhou
2022-08-24  8:31 ` Min Zhou [this message]
2022-08-24  8:31 ` [PATCH v5 6/7] test/cpuflags: add test for LoongArch cpu flag Min Zhou
2022-08-24  8:31 ` [PATCH v5 7/7] ci: add LOONGARCH64 cross compilation job Min Zhou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220824083123.583704-6-zhoumin@loongson.cn \
    --to=zhoumin@loongson.cn \
    --cc=Yuying.Zhang@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jgrajcia@cisco.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=maobibo@loongson.cn \
    --cc=qiming.yang@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).