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 8B878A05D3 for ; Tue, 23 Apr 2019 11:12:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 375241B4FB; Tue, 23 Apr 2019 11:12:53 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 9BFCE37AF; Tue, 23 Apr 2019 11:12:48 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3N8spKR016741; Tue, 23 Apr 2019 02:12:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=GB600U7Yyd8bCeNAJ/I41uBA+p75nrUG/aHi8A7+lq8=; b=E8VDqJhxHPh1cghfLApYr/rehFDjHKc/FXgfYZtNVjkPXQZqRailC2V7GGeNaf/or8Yl QrkAUOlPOZBk0shhD5Kw6JmpHp4ggqtZD4Jjdrm5WxKhRnr7grBA9lYM2j3JDkrQ5CVZ 85oTCxt/+h0a+wWEoet8QikrNuofvbG8aRix9zspU75Bte6/8nUZgbX2BIJ+yUR0ocbh y7g5EwhMFmP1sXpUIRwH43pKaOCpyZS7+Y7ORBUKQ8sLE+GnMWZKZRH8NS5alxx08pRn glrpsxD/Ppcha510gjJugPJ7LNbC6yrco/BEhPIQ7G/bA6gMHGyk62W8rHgixqAlKPyy Jg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2s0tjre5he-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 23 Apr 2019 02:12:47 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 23 Apr 2019 02:12:46 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.55) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 23 Apr 2019 02:12:45 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GB600U7Yyd8bCeNAJ/I41uBA+p75nrUG/aHi8A7+lq8=; b=s+RuLJ115ydloQQhG32TLLMldqzkCq8VcO3J4WfkddlycXt1B677oPzbbRkjggz8kexWaXDt8pSJ7q1NWf3m0Hg05NC3GIjKqc5/AeYFtIX20EPRnFBRttmYPJNPLOb0S8aegTLHXYVG6JwpiFEW8VKc7NdzYpqpv6+TlWzL7sM= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.14) by CY4PR1801MB2005.namprd18.prod.outlook.com (10.171.255.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.17; Tue, 23 Apr 2019 09:12:42 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::3da2:3fbf:60ee:9dbb]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::3da2:3fbf:60ee:9dbb%4]) with mapi id 15.20.1813.017; Tue, 23 Apr 2019 09:12:42 +0000 From: Pavan Nikhilesh Bhagavatula To: Thomas Monjalon 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" Thread-Topic: [dpdk-dev] [PATCH] examples/l3fwd: fix em mode datapath selection Thread-Index: AQHU+a+XBQz4SDK3uEqJf3HbwpA1XKZJdMxQ Date: Tue, 23 Apr 2019 09:12:42 +0000 Message-ID: References: <20190410072836.17496-1-pbhagavatula@marvell.com> <2029347.cZ2XlDF34S@xps> <1979146.r4zusaNbqz@xps> In-Reply-To: <1979146.r4zusaNbqz@xps> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [185.203.122.18] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 86071b66-c212-49c5-7369-08d6c7cbd779 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600141)(711020)(4605104)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:CY4PR1801MB2005; x-ms-traffictypediagnostic: CY4PR1801MB2005: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-forefront-prvs: 0016DEFF96 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(376002)(136003)(366004)(346002)(13464003)(199004)(189003)(486006)(86362001)(476003)(3846002)(6116002)(26005)(6246003)(446003)(93886005)(6506007)(316002)(73956011)(256004)(66476007)(66556008)(71190400001)(68736007)(64756008)(71200400001)(66446008)(54906003)(53936002)(99286004)(305945005)(11346002)(76116006)(66946007)(55016002)(6306002)(6916009)(74316002)(76176011)(14454004)(52536014)(7736002)(8936002)(9686003)(97736004)(7696005)(478600001)(7416002)(81166006)(186003)(229853002)(102836004)(4326008)(2906002)(66066001)(5660300002)(33656002)(25786009)(81156014)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB2005; H:CY4PR1801MB1863.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: XY0DA6SF0XnRgy85kMYUVlrqoEEAwb+QLAB2pQA4w/9AcAz0fEvm9aV1HkJQC9h+FYA7l0oGb14ofYb+VU8l7ic7RhcxAgUxxDq/6BENDCciyvxSTpPptMA1djMgkSuFUH4am/u79KbsBcgAp2DHl8aQYOWmprgZ15PKeE+tpA2/Z8DmYtlCWjSUOWyVZTVDm5WVRwjpLdNrI8ZKXG29cV/PlOnbUEIZ379alSDo9rPNOY3lLJu8+lSqS9Hw1MOCs2mb1gDCIiQKKY+vwtUypIXQnWVj2VnAbCZHDm5XxXEtztyLh6ZlG03TBPH5Yozke2DqWEyf3rk7Tfmvd4piYyEAQvEWI7u2RI7uBte45Q9j88vxS1nTygwyFUeqy3VvwJYZvdBOX5mxRfAcEOwUMDsKjqBqzmttwgDGFaERk8c= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 86071b66-c212-49c5-7369-08d6c7cbd779 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Apr 2019 09:12:42.5712 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB2005 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-22_01:, , signatures=0 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" >-----Original Message----- >From: dev On Behalf Of Thomas Monjalon >Sent: Tuesday, April 23, 2019 2:05 PM >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 >Subject: Re: [dpdk-dev] [PATCH] examples/l3fwd: fix em mode datapath >selection > >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 datapa= th >checks if NO_HASH_MULTI_LOOKUP is defined or not rather than its value. >> >> EXTRA_CFLAGS=3D'-DNO_HASH_MULTI_LOOKUP=3D0' 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, inst= ead >of #if defined. That will lead to undefined and redefined error: [dpdk] # make -C examples/l3fwd make: Entering directory '/root/pavan/dpdk-int/examples/l3fwd' CC main.o CC l3fwd_lpm.o In file included from /root/dpdk/examples/l3fwd/l3fwd_lpm.c:28:0: /root/dpdk/examples/l3fwd/l3fwd.h:14:6: error: "NO_HASH_MULTI_LOOKUP" is no= t defined, evaluates to 0 [-Werror=3Dundef] #if !NO_HASH_MULTI_LOOKUP && defined(RTE_MACHINE_CPUFLAG_NEON) [dpdk] # EXTRA_CFLAGS=3D'-DNO_HASH_MULTI_LOOKUP=3D0' make -C examples/l3fwd make: Entering directory '/root/dpdk/examples/l3fwd' CC main.o = ] #define NO_HASH_MULTI_LOOKUP 1 n file included from /root/dpdk/examples/l3fwd/l3fwd_lpm.c:28:0: :0:0: note: = ] #define NO_HASH_MULTI_LOOKUP 1is the location of the previous definition > >