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 53EADA057C; Fri, 27 Mar 2020 09:40:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0CEAC1C02E; Fri, 27 Mar 2020 09:40:21 +0100 (CET) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id 7A1FB1C029 for ; Fri, 27 Mar 2020 09:40:19 +0100 (CET) Received: by mail-io1-f66.google.com with SMTP id c19so9001807ioo.6 for ; Fri, 27 Mar 2020 01:40:19 -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=hKdpr1QctFZYHucQhshL11UYIwFl548LhnPe3vSFOqw=; b=b8UdsWefrr12OkM1wq8bEU44dqZQI29w8WULCOvpbiIJsjvHKafGsOKYew5YedsZOj iXeggxDSvzc27XdQzwkXuVfjLhNKz00mC9lWcoAgd18FMO8fvblOV3X4a8unTqzpcfB0 4EAQgu01CZqcvzOWub9MgSKA1V1dJuF1HrOj1UMYL+9Fa1cFxDUbTWYnJ7npGkWxI26/ GiIn1yDisIIKIVqMInR3Sc9dH+3bj4tb+XwyM2h1Dch4vTcpl2Y8UA8ix5vtWUj75107 /8nRmb08Cizu5SadYGawsyoqGmCoYMLAE3c2TswN4juKSRBsXhWCn/vZkL+3hejpzaHb PrqA== 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=hKdpr1QctFZYHucQhshL11UYIwFl548LhnPe3vSFOqw=; b=g90BiwT4WoDqcX0a1PWUrDv27gvlz2YNQsAOQPIXiFVE+bmOTyMAwFWcfBgsOYT+G5 6AdZZ25dZkt6KRkkwg7XZrCIf4KtiB8ZSjCujtkSzxaMJpAA3n7ta7+XRiOYDl1hKL9N NWjCejQ0d4Mm7hS2KQvbQ5jHE7TKukCD6JDHPM7cpmHsGWas9DgJj5zXiZvTouaB2oR4 K8rbGw7dtnU6tDmiKFPg3K2jVs4INkRqaRRi1FW4TVthqYLJmrnDumEUQ+nJXA/RH6Vt mAJGgtW1wcOrxmdjFuu598zlDJKF1SlHQYVLFMpQMwgWNRTeHuSvSRfZLcru8NsE1C+P atBA== X-Gm-Message-State: ANhLgQ2NcGu/4e/ZKcx24cMUTltUCn6G1ABFV3hJsnXQ7dGUrBZcouQN ZMFeLc1KUIIIdsnHf1S3CK3YapvJyZmmv1Rh70s= X-Google-Smtp-Source: ADFU+vsH9S05XYOigyg/xR0GnmOzxO82nKnNhF0A9xIPX3LuOqzSJi9y0J0o+NOeU5pGOB/ehIYhAGynjgjHToA5eS4= X-Received: by 2002:a5d:9b19:: with SMTP id y25mr11285953ion.94.1585298418586; Fri, 27 Mar 2020 01:40:18 -0700 (PDT) MIME-Version: 1.0 References: <20200318213551.3489504-1-jerinj@marvell.com> <20200326165644.866053-1-jerinj@marvell.com> <20200326165644.866053-21-jerinj@marvell.com> In-Reply-To: <20200326165644.866053-21-jerinj@marvell.com> From: Jerin Jacob Date: Fri, 27 Mar 2020 14:10:02 +0530 Message-ID: To: Jerin Jacob Cc: Nithin Dabilpuram , Pavan Nikhilesh , dpdk-dev , Thomas Monjalon , David Marchand , Ray Kinsella , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Kiran Kumar K Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 20/28] node: ipv4 lookup for x86 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, Mar 26, 2020 at 10:30 PM wrote: > > From: Pavan Nikhilesh > > Add IPv4 lookup process function for ip4_lookup > rte_node. This node performs LPM lookup using x86_64 > vector supported RTE_LPM API on every packet received > and forwards it to a next node that is identified by > lookup result. > > Signed-off-by: Pavan Nikhilesh > Signed-off-by: Nithin Dabilpuram > Signed-off-by: Kiran Kumar K > } > > +#elif defined(RTE_ARCH_X86) # Could you move the below code to ipv4_looup_sse.h and arm64 code to ipv4_looup_neon.h # In order to make this node work for PPC and ARMv7, please add a scalar version of ip4_lookup_node_process() too > + > +/* X86 SSE */ > +static uint16_t > +ip4_lookup_node_process(struct rte_graph *graph, struct rte_node *node, > + void **objs, uint16_t nb_objs) > +{ > + struct rte_mbuf *mbuf0, *mbuf1, *mbuf2, *mbuf3, **pkts; > + rte_edge_t next0, next1, next2, next3, next_index; > + struct rte_ipv4_hdr *ipv4_hdr; > + uint32_t ip0, ip1, ip2, ip3; > + void **to_next, **from; > + uint16_t last_spec = 0; > + uint16_t n_left_from; > + struct rte_lpm *lpm; > + uint16_t held = 0; > + uint32_t drop_nh; > + rte_xmm_t dst; > + __m128i dip; /* SSE register */ > + int rc, i;