From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 143F4A05D3 for ; Tue, 23 Apr 2019 10:35:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DBA2C1B4EF; Tue, 23 Apr 2019 10:35:32 +0200 (CEST) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id F0BF41B4E7; Tue, 23 Apr 2019 10:35:28 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 860771433F; Tue, 23 Apr 2019 04:35:28 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 23 Apr 2019 04:35:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=Qwz6QsqqQm1JDAlQr3wUfTXmXxThtyYEdqHHPkSrVu4=; b=LDHcCyvwiPYA cM4+9johHI1n0yayXSTRLb8aeTh0TfzEGv7+Szf8Ml1VI2vExeXroCvIOT04uirB mum/ijJuk2/QyN1GqXCWKOSTKcJtwu/74HtRm64/mEVIRJ4KNFKK9upGMKKLS/6N susQe+uNPM3CU0L8fPyYC2uWXwBUlnQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=Qwz6QsqqQm1JDAlQr3wUfTXmXxThtyYEdqHHPkSrV u4=; b=b/+uU01j5tHOfX2X8VwrbhKqrEt9eqcCdtZM2tgx6m8XsMOrfoeAb7Sve j0eZbfu0IvWZj9QarsKDfK47SHdv9dfRQ7RcYNgtMbhsyMJ2D9mMDy5Qtz7HiHU1 eI9ZnJENXg9aRXETgvTifo3j6g6SVvXgzf7guvyCAx1KCByaM1TnG+H2ISipyCTl qPLvnlizGJYHayZFNcZ/Hpx6gNXFK8ZZ0nV19nn4BsH0M412ILexhMb49uO1+Ray R+HNFn8ayxPhO+lAICzJSUjkmUmrPShsaBGPuHTZ6yHT2YKzAmiqID79SPeUK0IN to+M2RLTxbJcwSHV0rEzqamMRgW/g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrgeekgddtgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucffoh hmrghinhepughpughkrdhorhhgnecukfhppeekfedrudduhedrudehhedrudefkeenucfr rghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthenuc evlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.localnet (acaen-257-1-30-138.w83-115.abo.wanadoo.fr [83.115.155.138]) by mail.messagingengine.com (Postfix) with ESMTPA id 1576AE415C; Tue, 23 Apr 2019 04:35:24 -0400 (EDT) From: Thomas Monjalon To: Pavan Nikhilesh Bhagavatula Cc: "dev@dpdk.org" , Jerin Jacob Kollanukkaran , Marko Kovacevic , Ori Kam , Bruce Richardson , Pablo de Lara , Radu Nicolau , Akhil Goyal , Tomasz Kantecki , "stable@dpdk.org" Date: Tue, 23 Apr 2019 10:35:22 +0200 Message-ID: <1979146.r4zusaNbqz@xps> In-Reply-To: References: <20190410072836.17496-1-pbhagavatula@marvell.com> <2029347.cZ2XlDF34S@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] examples/l3fwd: fix em mode datapath selection X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 23/04/2019 04:47, Pavan Nikhilesh Bhagavatula: >From: Thomas Monjalon > >10/04/2019 09:29, Pavan Nikhilesh Bhagavatula: > >> From: Pavan Nikhilesh > >> > >> Currently, l3wfd em mode has two datapath modes em_sequential and > >> em_hlm. We can select either of them by defining > >NO_HASH_MULTI_LOOKUP > >> to one or zero. > >> The code checks if NO_HASH_MULTI_LOOKUP is defined or not instead of > >> checking for the value. > >> > >> Fixes: 52c97adc1f0f ("examples/l3fwd: fix exact match performance") > >> Cc: stable@dpdk.org > >> > >> Signed-off-by: Pavan Nikhilesh > >> --- > >> --- a/examples/l3fwd/l3fwd_em.c > >> +++ b/examples/l3fwd/l3fwd_em.c > >> #if defined RTE_ARCH_X86 || defined RTE_MACHINE_CPUFLAG_NEON -#if > >> defined(NO_HASH_MULTI_LOOKUP) > >> +#if NO_HASH_MULTI_LOOKUP > > > >A quick grep shows that it used in another place with #ifdef: > > > >examples/l3fwd/l3fwd.h:#if !defined(NO_HASH_MULTI_LOOKUP) && > >defined(RTE_MACHINE_CPUFLAG_NEON) > > > > > > #if !defined(NO_HASH_MULTI_LOOKUP) && defined(RTE_MACHINE_CPUFLAG_NEON) > #define NO_HASH_MULTI_LOOKUP 1 > #endif > > This macro is used to set l3fwd_em_sequential as the default EM datapath on AARCH64 > as its performance is better. (http://patches.dpdk.org/patch/49372/) > > make -C examples/l3fwd #Selects l3fwd_em_sequential by default on AARCH 64 > > Currently, we cannot select em_hlm without manually editing the macro as using the below command still > sets em_sequential as the default datapath because the macro modified in the patch that selects the datapath > checks if NO_HASH_MULTI_LOOKUP is defined or not rather than its value. > > EXTRA_CFLAGS='-DNO_HASH_MULTI_LOOKUP=0' make -C examples/l3fwd > > I hope I cleared up things a bit. In my understanding, we should check the value in the other case too, instead of #if defined.