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 4E005A00C2; Thu, 5 May 2022 19:31:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 00C214283D; Thu, 5 May 2022 19:30:36 +0200 (CEST) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by mails.dpdk.org (Postfix) with ESMTP id 137B14283A for ; Thu, 5 May 2022 19:30:33 +0200 (CEST) Received: by mail-lf1-f54.google.com with SMTP id x17so8612974lfa.10 for ; Thu, 05 May 2022 10:30:33 -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=wWE0V/zfRUDZbtl2fjPItvPJtNofBjGwNJMACdcwbJU=; b=BDHHTUFzHTo0ekuqQZImTvyFZCakTwViRNHJ0I/HNhecDF2CCEHN0kU+rTP2AcXJpa 7DvWtcN/rGVD/f+8DWTW3I2WOluwjNcoBsoBGxVFIZP07yK10AwSw5QsOjZzxqX6iG+v p9i1fPPF97eedPCGGMR0IudCjK/ZjgVPbiheg1Nv0PhrQykK57BtyLz9W1tKu5eXOLrS g2YabP+PUEodgoBLy2zflm+0sAvrVuryX92CuaC5Zyh20MyHrNMGnib5YZ7sAzqYt8xK KVXZk16a38bOKoo6OXRHj46alaiWmLIznKPcZvPMnAaBLnQGhn+4nR0BuUX24cgcGU/i ZYJg== 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=wWE0V/zfRUDZbtl2fjPItvPJtNofBjGwNJMACdcwbJU=; b=kRWMamE4O9H7T2G97RO4j5FIYa1DyQB7jejHBjxg9EnH0l+XHudtTZSKbxCwFA6Uj6 nq/0vRT7lB3mMrOooNjA4ZMllKIR+re9orZB5YwxQ9gQ+RpMxd4qL5z5lIlHKcb7S8uW hERsnL4s9BB8L3SvnxwtQgWZjevaENwnBOA3csDDqUobAjlwdZrnYxJi4V/nMMRN+Zy1 DzM3N52lFjd8WScFtClnLW5e36q+RBJC/X8+W+OlAv3Wxt04AX9BS4rkKvkz8qniQpAY NUU6eL12RXReTh84MiQJ5UiFc8nxi1fBKW9VI49HoVXHbug7W5xQOksefGHidpD06tJw uMaQ== X-Gm-Message-State: AOAM530DvuTwHEs0qNFIPVUhqvBSLjx4DDhELsxLP6JDKkCGfcoC66QZ MGruWOeDt5vPOels8H79DQW4SS1dVwcyvw== X-Google-Smtp-Source: ABdhPJwdrNZmCQCFBw6HDFYclTiu0d0z6IXiO4tMwXY37njUCZxwvb29jJtF7gw2k7WaYSCS2N35aA== X-Received: by 2002:a05:6512:2a92:b0:472:5c09:c1a8 with SMTP id dt18-20020a0565122a9200b004725c09c1a8mr16417000lfb.265.1651771832688; Thu, 05 May 2022 10:30:32 -0700 (PDT) Received: from localhost.localdomain (89-73-146-138.dynamic.chello.pl. [89.73.146.138]) by smtp.gmail.com with ESMTPSA id z26-20020ac25dfa000000b0047255d21203sm289640lfq.306.2022.05.05.10.30.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 10:30:32 -0700 (PDT) From: Stanislaw Kardach To: dev@dpdk.org Cc: Stanislaw Kardach , Frank Zhao , Sam Grove , mw@semihalf.com, upstream@semihalf.com Subject: [PATCH 07/11] examples/l3fwd: enable RISC-V operation Date: Thu, 5 May 2022 19:29:59 +0200 Message-Id: <20220505173003.3242618-8-kda@semihalf.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220505173003.3242618-1-kda@semihalf.com> References: <20220505173003.3242618-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. Signed-off-by: Stanislaw Kardach Sponsored-by: Frank Zhao Sponsored-by: Sam Grove --- 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