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 EECDFA0093; Tue, 10 May 2022 17:08:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5645342857; Tue, 10 May 2022 17:08:27 +0200 (CEST) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by mails.dpdk.org (Postfix) with ESMTP id 26B814284C for ; Tue, 10 May 2022 17:08:24 +0200 (CEST) Received: by mail-lf1-f44.google.com with SMTP id j4so29864658lfh.8 for ; Tue, 10 May 2022 08:08:24 -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=KCHEbEPzrTr2OpHhHmN9dqsjtT7PJ6+basrYAuXaRFi6EZjdZShiJWYvrXmk/CVaco UX2Mq639n2tiufXA7coI9gATPwvPt5fDvsccLHHcWesdM47ejRNCKvOfA2TauEtRHnA7 n6dJQGyeMeA9SVK/PeYRa8oVdUHKU1+75RDUNnrepDHeTGJq3pRA+1ixXetTQhStjpm+ p6tcrCPPi7iuUlcTqfHXIgj/JOykRxQHq/GgNdgeU+ue9ekGGpkAHSshwzFnWcAJWTm8 nbfeuthvrSYcM5o2ExutbHpFSwlsfeXXkVwCIuix7FIeMhTAa+vQCQB2XsiCoyUN3gE6 wQ4A== 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=RnyYq4blEask1CJykkiIsP7biXSsPHNYfR9IyHguI4NIeTq0J69WDwxyINkJUXZ15W Sd5pMYlvKGpqQMUil9sDSlgPnXFZrYcCd5JiSwJeUnqTPXbfAcErfXnb0170uGqFsPUT XiwqqMgsiAauDBSLMoLgekNsbO5S+p/fXMVtXREmefpESSpKYh6KUuqbhDkqqFAw3Xs8 BW7Ng5CnhZWB5Jkqw98rxOuBEHM4Qh0bq+xn7EsuIVftz2FjB/1hbFibSEh3NNLaRBNx SqTE7DFSAq5CtzotZTXE/iq5/LsQvwQQSMb8SE+2V3vJFZtEhWkoL/MgN0MRgm9QmaLZ OdZQ== X-Gm-Message-State: AOAM532HrUpv4Bep9niX7rL4qJJ4LWdByg+SkSn8uZRvT/tvlITp55Qn pA6WdOkn76VfgLaPcw6B4EtNkYy287lOQQ== X-Google-Smtp-Source: ABdhPJzBD2X1jhgwNJdzazG4p00NtISJbralNuFpTOaorI/QKqWhLTSaqTHHXa9jaFmF2YeJlhvfZg== X-Received: by 2002:a05:6512:3b85:b0:474:16f5:5250 with SMTP id g5-20020a0565123b8500b0047416f55250mr11831732lfv.450.1652195303869; Tue, 10 May 2022 08:08:23 -0700 (PDT) Received: from toster.office.semihalf.net ([83.142.187.84]) by smtp.gmail.com with ESMTPSA id z4-20020a19e204000000b0047255d2117esm2311895lfg.173.2022.05.10.08.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 08:08:22 -0700 (PDT) From: Stanislaw Kardach To: dev@dpdk.org Cc: Stanislaw Kardach , Frank Zhao , Sam Grove , mw@semihalf.com, upstream@semihalf.com Subject: [PATCH v2 5/8] examples/l3fwd: enable RISC-V operation Date: Tue, 10 May 2022 17:07:56 +0200 Message-Id: <20220510150759.525434-6-kda@semihalf.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220510150759.525434-1-kda@semihalf.com> References: <20220505173003.3242618-1-kda@semihalf.com> <20220510150759.525434-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