From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb0-f181.google.com (mail-yb0-f181.google.com [209.85.213.181]) by dpdk.org (Postfix) with ESMTP id D6B0A9E3 for ; Fri, 28 Apr 2017 05:50:05 +0200 (CEST) Received: by mail-yb0-f181.google.com with SMTP id 11so12751402yby.0 for ; Thu, 27 Apr 2017 20:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=d2FlJWnX7q3BTafF+EGg1DwkQZyjOUIXYkS6Rz4tGs4=; b=d8bvBHyvnf3Bo4QYY4eYpXCLN/Km4lBoYvMDkor1azX7Rydfcoz3qTaEG/5YKHORtD fHhqhgLB0cnPvbFz2E2PS35vXZeE+A1oIMrfTNLpJdQBVsT6iL1C2Xu0umrRdkwbn+DF mETTMEYHId2eyqHd6/BWp+TcpcR7S6p93dUCw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=d2FlJWnX7q3BTafF+EGg1DwkQZyjOUIXYkS6Rz4tGs4=; b=lQWuM3LRCj3NM0dSlVChamiwj38N2GHB2URN2YUKcjmE5he8g3ggQ7UaoMrlYvqpkJ uqcugjBmMpQGu65e3XH/A0/NL3hPgZgIRwWLbqzvtm2JLGDyGEVZPPTIdFxhUlQ0hHql PEoIsmNXcNpYAHjKPMAZVPAsdf2seD7KhWSPUWndPQ+3m/nbYWwQUv5oDfM0X7XsI3Md 205Dem9TiKut/FWgXaC1zYwNDqsledDkVeV3HZs6stiC+hlZIminG8TMeyY20cAluCyq nPFXiO/Q2GK5VaW8YOERbakZVdFkqZjDf72r1Ks3oEQiD74MctuEPxdFY30fb5y7BsVX /Bsw== X-Gm-Message-State: AN3rC/5122xo1xtSzXuvRkgCwK+2aWq8UV6rAoweEbiKkaXgirEILC+1 xgeKH3rd2Mhdao9gJJvKZaTaA8NpKg+4v0g= X-Received: by 10.37.91.136 with SMTP id p130mr7537793ybb.2.1493351405277; Thu, 27 Apr 2017 20:50:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.4.16 with HTTP; Thu, 27 Apr 2017 20:50:04 -0700 (PDT) In-Reply-To: <20170427130007.33210-1-ashwin.sekhar@caviumnetworks.com> References: <20170427130007.33210-1-ashwin.sekhar@caviumnetworks.com> From: Jianbo Liu Date: Fri, 28 Apr 2017 11:50:04 +0800 Message-ID: To: Ashwin Sekhar T K Cc: thomas@monjalon.net, cristian.dumitrescu@intel.com, Jerin Jacob , dev@dpdk.org Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [PATCH] sched: enable neon optimizations 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: , X-List-Received-Date: Fri, 28 Apr 2017 03:50:06 -0000 On 27 April 2017 at 21:00, Ashwin Sekhar T K wrote: > * Enabled CONFIG_RTE_SCHED_VECTOR for arm64 > * Verified the changes with sched_autotest unit test case > > Signed-off-by: Ashwin Sekhar T K > --- > config/defconfig_arm64-armv8a-linuxapp-gcc | 2 +- > lib/librte_sched/rte_sched.c | 22 ++++++++++++++++++++++ > 2 files changed, 23 insertions(+), 1 deletion(-) > > diff --git a/config/defconfig_arm64-armv8a-linuxapp-gcc b/config/defconfig_arm64-armv8a-linuxapp-gcc > index 65888ce..021044a 100644 > --- a/config/defconfig_arm64-armv8a-linuxapp-gcc > +++ b/config/defconfig_arm64-armv8a-linuxapp-gcc > @@ -48,4 +48,4 @@ CONFIG_RTE_LIBRTE_FM10K_PMD=n > CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n > CONFIG_RTE_LIBRTE_AVP_PMD=n > > -CONFIG_RTE_SCHED_VECTOR=n > +CONFIG_RTE_SCHED_VECTOR=y It's enough to remove this line only, I don't think you must enable it explicitly in the armv8a common config. > diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c > index 614705d..4ba476a 100644 > --- a/lib/librte_sched/rte_sched.c > +++ b/lib/librte_sched/rte_sched.c > @@ -58,6 +58,8 @@ > > #if defined(__SSE4__) > #define SCHED_VECTOR_SSE4 > +#elif defined(RTE_MACHINE_CPUFLAG_NEON) > +#define SCHED_VECTOR_NEON > #endif > > #endif > @@ -1732,6 +1734,26 @@ grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe) > return 1; > } > > +#elif defined(SCHED_VECTOR_NEON) > + > +static inline int > +grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe) > +{ > + uint32x4_t index, pipes; > + uint32_t *pos = (uint32_t *)port->grinder_base_bmp_pos; > + > + index = vmovq_n_u32(base_pipe); > + pipes = vld1q_u32(pos); > + if (!vminvq_u32(veorq_u32(pipes, index))) > + return 1; > + > + pipes = vld1q_u32(pos + 4); > + if (!vminvq_u32(veorq_u32(pipes, index))) > + return 1; > + > + return 0; > +} > + > #else > > static inline int > -- > 2.7.4 >