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 75D8DA04B7; Wed, 14 Oct 2020 12:06:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 11DDB1DDC1; Wed, 14 Oct 2020 12:06:15 +0200 (CEST) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id C447A1D9BF for ; Wed, 14 Oct 2020 12:06:13 +0200 (CEST) Received: by mail-io1-f68.google.com with SMTP id l8so4212862ioh.11 for ; Wed, 14 Oct 2020 03:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6cWzgTln7VDAktbkgQ/8LmB9O3411DvOgFlbJrzROoI=; b=cyZ2W7auNu6o6ayxf42hHUagc4kURNq6fio8rDwOiOFXn58vs2OWroXqhdXkwbtfq+ wXxfUg/O8L/w/WxtlUi5HYne/Rkvc2wc8nysbOaDcVPr0Zb6wDkfw+TFxMmC4pKyLrgL cAU0YGcjrHNWaGlv/WjkFwwh8/Oy0XEV/KaV0H3vxPoHOgVZxy6D5Uf1gKqeWXddS+dE U5US+I+BHYDv/eysqSy8xkOktEHx98owfqKKmaQdLyhmfb933CvuD5cqidtsLI/eoTYs ZtFP7l837PsSnRbbEL1HSP3IOpdwaSxddHIEv0f4sZ1DxOPOonX67Wu2oIUSFcL43RJG XaQQ== 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; bh=6cWzgTln7VDAktbkgQ/8LmB9O3411DvOgFlbJrzROoI=; b=ljj5ObkfXA0ET/ETVC5FA/jfawLq2Hzba8zOKj7oiVoayeCBqse3hMqoM+DtvNouzS ZVD+ooXpi/vlXNPAQScyfixI6pKLaErHYnSqY9+wR8BRWGbfXx5eu6t8uP3FXz6EB6ST Rp8VYBPK6yRjRmKh3yfoXOX49XMIHwXSr5t62aAme/fTadsRkWpFuO9Vh/W+fFUURzu0 O5L6wyN3oZ9cr9LUDmSKdrt1NVXT8c6smw3Xw00rPoTi3keJhoA4c5THtwETqNVHn9oH GinVfLoWVFQRvFAB9Ak3EkGFfbZw2+UUTcbjQTxPBTYl9K1qIQGq50a3Bjaxt1fgdO0N 3b6Q== X-Gm-Message-State: AOAM5324/dCptEVZs4l5anQo5coShDoNReB6qxiRZyXQ9IjgIpaMHV7X fieiH6lZyF0SEZyALT6KFiN8OOnkyOy4wJXvhes= X-Google-Smtp-Source: ABdhPJxzrNesoKByKZg1h3zCe7CaCir3+7QrOLk2+aaucE1y1mJk/UHQFaqLRg2bAU+bFlJelFV5gfewrUH8g81kP0Y= X-Received: by 2002:a05:6638:446:: with SMTP id r6mr2455696jap.60.1602669972125; Wed, 14 Oct 2020 03:06:12 -0700 (PDT) MIME-Version: 1.0 References: <20200807155859.63888-1-ciara.power@intel.com> <20201013110437.309110-1-ciara.power@intel.com> <20201013110437.309110-18-ciara.power@intel.com> In-Reply-To: From: Jerin Jacob Date: Wed, 14 Oct 2020 15:35:56 +0530 Message-ID: To: "Ananyev, Konstantin" Cc: "Power, Ciara" , "dev@dpdk.org" , "viktorin@rehivetech.com" , "ruifeng.wang@arm.com" , "jerinj@marvell.com" , "drc@linux.vnet.ibm.com" , "Richardson, Bruce" , Nithin Dabilpuram , Pavan Nikhilesh , Kiran Kumar K Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v5 17/17] node: 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 Tue, Oct 13, 2020 at 7:12 PM Ananyev, Konstantin wrote: > > > When choosing the vector path, max SIMD bitwidth is now checked to > > ensure the vector path is suitable. To do this, rather than the > > scalar/vector lookup functions being called directly from the apps, a > > generic function is called which will then call the scalar or vector > > lookup function. > > > > Cc: Nithin Dabilpuram > > Cc: Pavan Nikhilesh > > Cc: Jerin Jacob > > Cc: Kiran Kumar K > > > > Signed-off-by: Ciara Power > > --- > > lib/librte_node/ip4_lookup.c | 13 +++++++++++-- > > lib/librte_node/ip4_lookup_neon.h | 2 +- > > lib/librte_node/ip4_lookup_sse.h | 2 +- > > 3 files changed, 13 insertions(+), 4 deletions(-) > > > > +static uint16_t > > +ip4_lookup_node_process(struct rte_graph *graph, struct rte_node *node, > > + void **objs, uint16_t nb_objs) > > +{ > > +#if defined(RTE_MACHINE_CPUFLAG_NEON) || defined(RTE_ARCH_X86) > > + if (rte_get_max_simd_bitwidth() >= RTE_SIMD_128) > > + return ip4_lookup_node_process_vec(graph, node, objs, nb_objs); > > #endif > > + return ip4_lookup_node_process_scalar(graph, node, objs, nb_objs); > > +} > > Just wonder can't this selection be done once at ip4_lookup_node_init()? Yes. It is better to move ..process() selection in ip4_lookup_node_init()