From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 442DCA04BC; Fri, 9 Oct 2020 14:37:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1E7641D5F9; Fri, 9 Oct 2020 14:37:21 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 6DC511D5F8 for ; Fri, 9 Oct 2020 14:37:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602247037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tWpIiKEjLK8OFMaXuRfTgDfkfZi7+t1G4+L1s93pwgI=; b=agSrljMgZBe9Qq0RTRizLCzUQnqBN0nh8vlqx95407b67H2MBRR7+6F0t1cRSr7/9kPyEk W1yZSRST0jiZhbYpxjowzhObXRoQ/X3880dnpFX6J/C2NeYaNqNDe3t1Qpv75t6SpLz6U6 oLu+hNwOvJfHwB9E4G0dBEdfK8bT7Lc= Received: from mail-ua1-f71.google.com (mail-ua1-f71.google.com [209.85.222.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-534-dSLU_1GxO5ix8ZLXi5vi3g-1; Fri, 09 Oct 2020 08:37:14 -0400 X-MC-Unique: dSLU_1GxO5ix8ZLXi5vi3g-1 Received: by mail-ua1-f71.google.com with SMTP id x5so2455662uau.13 for ; Fri, 09 Oct 2020 05:37:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=tWpIiKEjLK8OFMaXuRfTgDfkfZi7+t1G4+L1s93pwgI=; b=V74OyqDUFLTmDEWQ7ijM1hou2Rvt+WGMXObqrWJ+4Ws0GUh4lm3B4oQUoqr88+V/pa 7Sglkl8vjsg9QOQ2m+T2xmpnZ0OeZUePhA+8bIrp7bmCQTVGEwKUNUWtrFBImKemFrM+ tzKL6Pa84AhlRvucDv4OHIcKZCEUSlHaRnkqRAQ2I085gaBmE2vJo5EO6yu+9g8hI0ct IaZjYivKKt3MCR+lcE2D1GE1i9f5AgRxJekNPOcQNGx01LZ48gkJronFiX4uakE2PnUm D3/J8oCHQWLBdIVWzCmpnfJfUtNI5PMmV7mxpHEBUwktD+Gd7sEfowPhjW/somOs2pgR hQOQ== X-Gm-Message-State: AOAM531Bj4wK2kLDZnhISoGnBTzhNPiZ4gOFm07XgO2hXB8mNZFzFnha mzt5HypY1Y8BXZQQbtzao7c+ZUfPTp5Br8xAIg7zE/nK3rqRIi4u7ZOX2yrKUT765hU/G23ryeR Y3PoK1kA2Qg36tyumedU= X-Received: by 2002:a67:fd7a:: with SMTP id h26mr7666476vsa.27.1602247033701; Fri, 09 Oct 2020 05:37:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6oklxADjZsW2G7EKSjBUS8/++gVmp4CDL0M3vhfC/I3ujL2Y6AxIUyKNIADdsxlZiqys4Qr7ZXn7MkJ4Cu0U= X-Received: by 2002:a67:fd7a:: with SMTP id h26mr7666455vsa.27.1602247033392; Fri, 09 Oct 2020 05:37:13 -0700 (PDT) MIME-Version: 1.0 References: <20200807155859.63888-1-ciara.power@intel.com> <20200930130415.11211-1-ciara.power@intel.com> <20200930130415.11211-19-ciara.power@intel.com> In-Reply-To: From: David Marchand Date: Fri, 9 Oct 2020 14:37:02 +0200 Message-ID: To: Ciara Power Cc: dev , Bruce Richardson , Vladimir Medvedkin , Jerin Jacob , Ruifeng Wang Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v3 18/18] lpm: choose vector path at runtime X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Oct 8, 2020 at 5:19 PM David Marchand w= rote: > > On Wed, Sep 30, 2020 at 3:14 PM Ciara Power wrote= : > > > > When choosing the vector path, max SIMD bitwidth is now checked to > > ensure a vector path is allowable. To do this, rather than the vector > > lookup functions being called directly from apps, a generic lookup > > function is called which will call the vector functions if suitable. > > > > Signed-off-by: Ciara Power > > Got a build error on this patch with ./devtools/test-meson-builds.sh > ("gcc-shared" target): > > [2/3] Compiling C object > 'examples/c590b3c@@dpdk-l3fwd-thread@exe/performance-thread_l3fwd-thread_= main.c.o'. > FAILED: examples/c590b3c@@dpdk-l3fwd-thread@exe/performance-thread_l3fwd-= thread_main.c.o > ccache gcc -Iexamples/c590b3c@@dpdk-l3fwd-thread@exe -Iexamples > -I../../dpdk/examples -Iexamples/performance-thread/l3fwd-thread > -I../../dpdk/examples/performance-thread/l3fwd-thread > -I../../dpdk/examples/performance-thread/l3fwd-thread/../common > -I../../dpdk/examples/performance-thread/l3fwd-thread/../common/arch/x86 > -I. -I../../dpdk/ -Iconfig -I../../dpdk/config > -Ilib/librte_eal/include -I../../dpdk/lib/librte_eal/include > -Ilib/librte_eal/linux/include > -I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/x86/include > -I../../dpdk/lib/librte_eal/x86/include -Ilib/librte_eal/common > -I../../dpdk/lib/librte_eal/common -Ilib/librte_eal > -I../../dpdk/lib/librte_eal -Ilib/librte_kvargs > -I../../dpdk/lib/librte_kvargs > -Ilib/librte_telemetry/../librte_metrics > -I../../dpdk/lib/librte_telemetry/../librte_metrics > -Ilib/librte_telemetry -I../../dpdk/lib/librte_telemetry > -Ilib/librte_mempool -I../../dpdk/lib/librte_mempool -Ilib/librte_ring > -I../../dpdk/lib/librte_ring -Ilib/librte_net > -I../../dpdk/lib/librte_net -Ilib/librte_mbuf > -I../../dpdk/lib/librte_mbuf -Ilib/librte_ethdev > -I../../dpdk/lib/librte_ethdev -Ilib/librte_meter > -I../../dpdk/lib/librte_meter -Ilib/librte_cmdline > -I../../dpdk/lib/librte_cmdline -Ilib/librte_timer > -I../../dpdk/lib/librte_timer -Ilib/librte_lpm > -I../../dpdk/lib/librte_lpm -Ilib/librte_hash > -I../../dpdk/lib/librte_hash -Ilib/librte_rcu > -I../../dpdk/lib/librte_rcu > -I/home/dmarchan/intel-ipsec-mb/install/include > -fdiagnostics-color=3Dalways -pipe -D_FILE_OFFSET_BITS=3D64 -Wall > -Winvalid-pch -Werror -O2 -g -include rte_config.h -Wextra -Wcast-qual > -Wdeprecated -Wformat-nonliteral -Wformat-security > -Wmissing-declarations -Wmissing-prototypes -Wnested-externs > -Wold-style-definition -Wpointer-arith -Wsign-compare > -Wstrict-prototypes -Wundef -Wwrite-strings > -Wno-address-of-packed-member -Wno-packed-not-aligned > -Wno-missing-field-initializers -D_GNU_SOURCE -march=3Dnative > -Wno-format-truncation -DALLOW_EXPERIMENTAL_API -MD -MQ > 'examples/c590b3c@@dpdk-l3fwd-thread@exe/performance-thread_l3fwd-thread_= main.c.o' > -MF 'examples/c590b3c@@dpdk-l3fwd-thread@exe/performance-thread_l3fwd-thr= ead_main.c.o.d' > -o 'examples/c590b3c@@dpdk-l3fwd-thread@exe/performance-thread_l3fwd-thre= ad_main.c.o' > -c ../../dpdk/examples/performance-thread/l3fwd-thread/main.c > #=E2=80=98target_mem_ref=E2=80=99 not supported by expression#=E2=80=99In= file included from > ../../dpdk/examples/performance-thread/l3fwd-thread/main.c:133: > ../../dpdk/examples/performance-thread/l3fwd-thread/main.c: In > function =E2=80=98process_burst=E2=80=99: > ../../dpdk/lib/librte_lpm/rte_lpm.h:435:7: error: may be used > uninitialized in this function [-Werror=3Dmaybe-uninitialized] > 435 | if (rte_lpm_lookup(lpm, ((uint32_t *) &ip)[i], &hop[i]) < 0) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors > ninja: build stopped: subcommand failed. > > gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2) On the build issue, I guess you can use a rte_xmm_t passe-plat. diff --git a/lib/librte_lpm/rte_lpm.h b/lib/librte_lpm/rte_lpm.h index edba7cafd5..43db784a76 100644 --- a/lib/librte_lpm/rte_lpm.h +++ b/lib/librte_lpm/rte_lpm.h @@ -430,10 +430,14 @@ static inline void rte_lpm_lookupx4_scalar(struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4], uint32_t defv) { - int i; - for (i =3D 0; i < 4; i++) - if (rte_lpm_lookup(lpm, ((uint32_t *) &ip)[i], &hop[i]) < 0= ) + unsigned int i; + rte_xmm_t _ip; + + _ip.x =3D ip; + for (i =3D 0; i < RTE_DIM(_ip.u32); i++) { + if (rte_lpm_lookup(lpm, _ip.u32[i], &hop[i]) < 0) hop[i] =3D defv; /* lookupx4 expected to set on fai= lure */ + } } /** --=20 David Marchand