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 64D6FA0544; Tue, 7 Jun 2022 12:47:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9492242B6D; Tue, 7 Jun 2022 12:46:35 +0200 (CEST) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by mails.dpdk.org (Postfix) with ESMTP id C051D427F9 for ; Tue, 7 Jun 2022 12:46:32 +0200 (CEST) Received: by mail-lj1-f176.google.com with SMTP id b12so7742438ljq.3 for ; Tue, 07 Jun 2022 03:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S1UVNaW+InLWX8Iimm/OJgqHm3H+mdw+uvE5WWInj4s=; b=k0lDa0jx4wyX6N4ncRRjLaOYAIySq/JAXQ4U0IG2Z9gxUkTXHX5aOqMuYes7xcA8Dz AvS1V3L/OfZYQxUfCKRS9mBNKgq7SgdTOpZQuvVD+XUN4WifIdPBWW81dyKZCYX+G3G5 2+jWicIhCHc/YCpQ96Hym/gIW8Aq+tmkGHJDSnKUQM1UbCMrYnxECgcautuiSEacxzsU vVuZeSGvgFlCK0xHty2rAHX1zupaapQyhO+oikk40pYBTbldijkj3A52sPDYvHYggX3/ 9Mr6lGoqMPPFj0M5HTu4oN0yAv0k7mU7++mPF4Kzs5auFpauCE82iLs7Xy2VQ2/oRBff ob+g== 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=S1UVNaW+InLWX8Iimm/OJgqHm3H+mdw+uvE5WWInj4s=; b=5tEB7ZEaOdVhjI7HlxY4BCtsFrPfqavPceFHXLwkM4/AmIMs94LgUlHQmX4ShQ48ow h29DpC3Lf35PjEghV7ppFmQKAUT9i6BOWH4S9vvJCRq5HWZr2nfSjVzimBEOTpIC6Hv2 vbES2lferPcMui6B8zcSzxBWiznYwdkw1rlhmDm9SGiMneMZkygnWnQ/NDVFmE98iwMU vR7Pv84yHBNP9qUR3Rrcbulm6llJhjbcYPqDUcc769h3slxHcpNmXdgt4V8mr18EvAEJ qLZpXWjYlpneifWjZJMIamqvAaEHBFay4suGxDF3MjgDbhCbP4cVeO4VR7K8uqQdAYwf M1rQ== X-Gm-Message-State: AOAM531ZcA6jTM9DHw2D5Vj6r7HLYcjyb8xhH3TgIEbkEnk1pAgfHWPv D0w5POfpN0PMIenXcmdwDmL8sF9a5qY+n0kn X-Google-Smtp-Source: ABdhPJzCjSuU0YhwX7ajg7H6edS5tbL1kHJw7WfdegVpCEKQa+j5vVeJs63SVFnzfSgWLHskbFNnsA== X-Received: by 2002:a2e:9149:0:b0:255:afbb:7532 with SMTP id q9-20020a2e9149000000b00255afbb7532mr974743ljg.275.1654598792301; Tue, 07 Jun 2022 03:46: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 m16-20020a056512115000b00478f2f2f044sm3217272lfg.123.2022.06.07.03.46.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 03:46:31 -0700 (PDT) From: Stanislaw Kardach To: dev@dpdk.org Cc: Stanislaw Kardach , Frank Zhao , Sam Grove , mw@semihalf.com, upstream@semihalf.com Subject: [PATCH RESEND v4 5/8] examples/l3fwd: enable RISC-V operation Date: Tue, 7 Jun 2022 12:46:14 +0200 Message-Id: <20220607104617.153892-6-kda@semihalf.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220607104617.153892-1-kda@semihalf.com> References: <20220607104617.153892-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 6f8d94f120..10be24c61d 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 26d0767ae2..e02e4b3f5a 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