From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A301DA0093; Tue, 10 May 2022 17:49:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE0134283F; Tue, 10 May 2022 17:49:08 +0200 (CEST) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by mails.dpdk.org (Postfix) with ESMTP id 1029A42834 for ; Tue, 10 May 2022 17:49:06 +0200 (CEST) Received: by mail-lf1-f43.google.com with SMTP id w19so30077753lfu.11 for ; Tue, 10 May 2022 08:49:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rVwFqafdrFeqkn0qlVB2rdjxd9bB3tbwLezd5oZO3Y8=; b=Hnbt67E80ed3zvu/grEQfXX6aw5s+1VPly4BG606P9z07wiQ7zFPKJ65yBNITZT/QG /aKZ6lzvtvbzwxj4Qe6adddNoexvC4/PUjbkJ1lkgeaiiKiJfJj950KWWRxZafXCSd6m GHxcpFwfmyjIoqupsjjZXTtVnBPYcHfX3eO/9tx9tcC5p/LEN8w39OtvodIUYDlEgvS2 7o7vyI4sfEiguFvgQpJfgzPc0OobT2X/cN/JaewW7RF70W7e9uIYk8bDPvu2cJCUAFCJ pWe5eDqb7gZulN16TGG5tdB0EQ91oLReh+9tsNMT7UEzck+PIX7dQTEqi6lrbJAerjHK LvMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rVwFqafdrFeqkn0qlVB2rdjxd9bB3tbwLezd5oZO3Y8=; b=B8ycLkRIsIp7XO/HiQ8GjSZqlE0w/tR3ClEuTOZbTTs0Tcf1KBxr+Zc7Knwq71tH3Z JmNzUpb77gPfXm4jUypazK1YjHOjh8RrHzXQjnfIfgC+DM2O3FzvIawbHffMKDItrb8I dIucM9sUOoO8tSUKQ3QwbbCi+33UjC88PiFcn3zTb62bcLnggc5hYzBcCO+TSyYy4r2B NLiYa8DFruynqyFyYrwIkypxKlJ3p4iroR+IE4yH/L4A1Zjhg0ZygGG6bcvsUzE0PLeM mETUEB/UAwa6B6bQmKIc5e4SjGCZ6c+w4Scndn4Ryz70mevViRQGmkr/2AQbIMJXKTcg q0Tw== X-Gm-Message-State: AOAM532DgxkSDWd9YwkADQfunJRizTg8X5TS2bCIwQsIak1tes+ZvoVh bl42vvSP/bxqZbqunVIO5fNOOBa0UCHngA== X-Google-Smtp-Source: ABdhPJxAzUyBjbiv8U7CUj9QYta+HaM7H1laVLT8ssr+SwB2B7aHfm4zG/QflXHRP6pg2dX/hIE9MA== X-Received: by 2002:a05:6512:33a7:b0:472:481b:9d6c with SMTP id i7-20020a05651233a700b00472481b9d6cmr17177873lfg.451.1652197745666; Tue, 10 May 2022 08:49:05 -0700 (PDT) Received: from toster.office.semihalf.net ([83.142.187.84]) by smtp.gmail.com with ESMTPSA id i13-20020a2e540d000000b0024f3d1daeedsm2175051ljb.117.2022.05.10.08.49.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 08:49:05 -0700 (PDT) From: Stanislaw Kardach To: dev@dpdk.org Cc: Stanislaw Kardach , Frank Zhao , Sam Grove , mw@semihalf.com, upstream@semihalf.com Subject: [PATCH v3 5/8] examples/l3fwd: enable RISC-V operation Date: Tue, 10 May 2022 17:48:46 +0200 Message-Id: <20220510154849.530872-6-kda@semihalf.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220510154849.530872-1-kda@semihalf.com> References: <20220510150759.525434-1-kda@semihalf.com> <20220510154849.530872-1-kda@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 and fix l3fwd_common.h inclusion in FIB lookup functions to enable the l3fwd to be run on RISC-V. Sponsored-by: Frank Zhao Sponsored-by: Sam Grove Signed-off-by: Stanislaw Kardach --- examples/l3fwd/l3fwd_em.c | 8 ++++++++ examples/l3fwd/l3fwd_fib.c | 2 ++ examples/l3fwd/meson.build | 6 ------ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c index 24d0910fe0..bbd3452546 100644 --- a/examples/l3fwd/l3fwd_em.c +++ b/examples/l3fwd/l3fwd_em.c @@ -239,6 +239,14 @@ em_mask_key(void *key, xmm_t mask) return vec_and(data, mask); } +#elif defined(RTE_ARCH_RISCV) +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/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c index 6e0054b4cb..bdb7d7535d 100644 --- a/examples/l3fwd/l3fwd_fib.c +++ b/examples/l3fwd/l3fwd_fib.c @@ -18,6 +18,8 @@ #include "l3fwd_neon.h" #elif defined RTE_ARCH_PPC_64 #include "l3fwd_altivec.h" +#else +#include "l3fwd_common.h" #endif #include "l3fwd_event.h" #include "l3fwd_route.h" diff --git a/examples/l3fwd/meson.build b/examples/l3fwd/meson.build index 75fa19b7fe..0830b3eb31 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 dpdk_conf.has('RTE_ARCH_RISCV') - build = false - reason = 'riscv arch not supported' - subdir_done() -endif - allow_experimental_apis = true deps += ['hash', 'lpm', 'fib', 'eventdev'] sources = files( -- 2.30.2