From patchwork Wed Aug 24 08:31:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhoumin X-Patchwork-Id: 115372 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D2235A00C2; Wed, 24 Aug 2022 10:32:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE95C4282F; Wed, 24 Aug 2022 10:31:42 +0200 (CEST) Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by mails.dpdk.org (Postfix) with ESMTP id EC9F241144 for ; Wed, 24 Aug 2022 10:31:37 +0200 (CEST) Received: from localhost.localdomain (unknown [10.2.5.185]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxFeLd4QVjtJQIAA--.38872S7; Wed, 24 Aug 2022 16:31:36 +0800 (CST) From: Min Zhou 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 Message-Id: <20220824083123.583704-6-zhoumin@loongson.cn> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220824083123.583704-1-zhoumin@loongson.cn> References: <20220824083123.583704-1-zhoumin@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8AxFeLd4QVjtJQIAA--.38872S7 X-Coremail-Antispam: 1UD129KBjvJXoW7ZFyxJFyxJryUWFy8ZryxZrb_yoW8Grykpr srKwsFgr1fZF1rJr13Cw1fWrZaqwn7CryDJw4rGw12y3sxZr1kJr4rtF1YgFW2yFZYyF4f XryrGFy5Way8JFUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_UUUUUUUUU== X-CM-SenderInfo: 52kr3ztlq6z05rqj20fqof0/ X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add missing em_mask_key() implementation to enable the l3fwd to be run on LoongArch. Signed-off-by: Min Zhou --- 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(