From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0050.outbound.protection.outlook.com [104.47.42.50]) by dpdk.org (Postfix) with ESMTP id 20442271; Mon, 18 Dec 2017 08:50:18 +0100 (CET) Received: from BN6PR03CA0021.namprd03.prod.outlook.com (10.168.230.159) by CY4PR03MB2693.namprd03.prod.outlook.com (10.173.43.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Mon, 18 Dec 2017 07:50:17 +0000 Received: from BL2FFO11FD054.protection.gbl (2a01:111:f400:7c09::141) by BN6PR03CA0021.outlook.office365.com (2603:10b6:404:23::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.323.15 via Frontend Transport; Mon, 18 Dec 2017 07:50:17 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD054.mail.protection.outlook.com (10.173.161.182) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.302.6 via Frontend Transport; Mon, 18 Dec 2017 07:50:06 +0000 Received: from [10.232.133.65] ([10.232.133.65]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBI7oDgC004686; Mon, 18 Dec 2017 00:50:14 -0700 To: Bruce Richardson References: <1509617335-6354-1-git-send-email-hemant.agrawal@nxp.com> <1513169578-28440-1-git-send-email-hemant.agrawal@nxp.com> <1513169578-28440-2-git-send-email-hemant.agrawal@nxp.com> <20171213132253.GA10724@bricha3-MOBL3.ger.corp.intel.com> CC: , , Michal Kobylinski , , Jun Yang From: Hemant Agrawal Message-ID: Date: Mon, 18 Dec 2017 13:20:12 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20171213132253.GA10724@bricha3-MOBL3.ger.corp.intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131580570062919500; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(39860400002)(376002)(346002)(396003)(39380400002)(2980300002)(1110001)(1109001)(339900001)(3190300001)(24454002)(189003)(199004)(2906002)(50466002)(36756003)(2486003)(106466001)(2950100002)(6916009)(305945005)(8936002)(4326008)(23676004)(64126003)(2870700001)(77096006)(68736007)(65826007)(498600001)(229853002)(53936002)(31686004)(5660300001)(6246003)(8676002)(85426001)(54906003)(58126008)(81156014)(356003)(81166006)(8656006)(67846002)(31696002)(316002)(83506002)(97736004)(86362001)(47776003)(76176011)(105606002)(65806001)(104016004)(53546011)(93886005)(65956001)(59450400001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2693; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD054; 1:QF1bouD2Sf4bIhBVfriumzKTYRNPHIQpbIRRw+7LgwLW6xnI07OPmbKQJeIY4XLXDbBa5WJ6NlH4jyGRiDW8+IpmxtMFOR3ODvC6zora3U9VRLEkzkIdJvbNItppqiJq X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: efb727cb-4e01-4d2e-974c-08d545ebf468 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:CY4PR03MB2693; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2693; 3:XeQR/owikQNmLbqXnVcnYtsMIVyyZ1aIyWZRTVQtKtsPU8WklTk0czxMMe8jZqcgWbXEceSXNOT9oNL9WB6mvUBzGEffHJaG1hlK+f8n8dLBTRyrBhGhzPanbT7l/9t7B0bqRy2NV50Ze2eY2WCfXjqphPGVRJ1lVFnjaae2jK4M+zPUm6AukoCj8IjumO9dqhc4bCU+VpNBFf3YegViKBUmogdPc7LJ4oEAZe+Idg4Z/5DtGs+YcHtcxw7rSg1cf5/9C2IaC8/fYFW9K4Rf4tq+apXy63pTeQ+pZTREHyYXoTX9ODBLyP+RBJbsn9/Dqk+Daa3NFqLlZYmDM3BHkGqHJrzj0iTX2SLbL4L2H1o=; 25:UJ17cb88yp31VLCd9xCWaiSBk4hvRC3qC+T3e2arNW2KYa86GGYpP2/p162gGgkLAH/aa78dQkLH5enctj8WftWLDXFz3RZ20OXeuVQSLIfMjtKI+fUwKDyWX1tk05E+pjxIxUVvv4iy3OGWxKRQXwAsK01BPK8bjWuEihV7zR7oOIxIgk4BpCOaD/fC8ti4m+xm+wjITJqiG4v5VP8hKD0k4hnuNQQBIW6r/t6mtLmXp7zmiLpJbW0I48FEaxWHEdPiCFLKhV2o/aDd6RlMbd7GEq7DO90vQzUkMPdsRFO5hzNeJRWH4CvX9M5hS92yZz6Nx96pDunEQhVxypGZ8w== X-MS-TrafficTypeDiagnostic: CY4PR03MB2693: X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2693; 31:Cqx2BhgpczZHC7ehFYSv5XPjHPDr29E7YYIoFGaUunWDzXAmU1L0sB3Kc2j+WmfkjfGpehQqFIjOT4TfMolAaORlcp2dOE7ozUuaacAj6tCRvGaFFXvLwwjTSspb0bMnE0t279EORFAO5ikq+Kv2HGpA9SIiG2/shvDKxwiPPXp056+aeDoc7aOPfubxjrZivYS68E+0xYATC2w7y3/AhpWOgv3RoSpxok8CQ8OAQbE=; 4:EAW/5D9UdgNCwhd3gXZ3r0wg89T4UNcUlnK4dtzTagAA/bYetpHd8CPghkyjerguhb3+qu6+6e8ZGhaztXND2sCXLHgrw+KtdgA5W9SypYW55mHxbkJWlYhCpvy1U0rVB/ieagl/608c20Yb3NPe6EmHOQrWe41geiPcFibDnASjv8K0RdFZ1mEq8hpVo1tD7ehachZaNh5YtONQyuPG81TD12JSvzTCrIJZ1LbSV7zHQoRUmjcSQ9YKfOLKqPXCTzcNp7ST2B4jUrCGxpJ/ibgYVBoBNiz/V+iFzZ0KcrIdpcjim+VFpuglJ3wPSZd9S+Kir5RsKY6jUDz2mFdJCEvchzFeUzHwnyykPfAQbsM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231023)(3002001)(6055026)(6096035)(20161123556025)(20161123561025)(20161123563025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123559100)(20161123565025)(201708071742011); SRVR:CY4PR03MB2693; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY4PR03MB2693; X-Forefront-PRVS: 0525BB0ADF X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjAzTUIyNjkzOzIzOjFtSjF1b1JiYi9vdGZlUzhKM0tvYWpWS3Nn?= =?utf-8?B?TjhIWjNxRXpHM3lQTWtDRmM1TUw3RlExMklZeVBNMXZia3h1QzdUUi9RZW56?= =?utf-8?B?VnVVaFZHT2FqYTZEakh3SC9QeThvQ2FsTW9ZOXN0TDNaNXVSdDVmRStXbGpa?= =?utf-8?B?bFlOdVpjRlFPSW5qaXpzS01qNHRwUWp6Uys1cXExbk5La3ZPQjc2SElkN29C?= =?utf-8?B?eFBx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wVkAblaf5TA+DARIV/OTfiQlE127+maiPpQx+4sjbzAfHJRJHRbn/6gpgpyCY0TdorOC5cPz+BgcumKiNmlDKpQ9vrBXGJSyhJpcu2yGXdrxu7hkaizBB1BtU8u9PCDe/8uqTGgauRfw4LEGLMIKinz28j2tMCBV/4JW8VEn3qjJ0SKoz3NIoOPO7T/2R6WMg9lGk=; 5:dHbgdNp23UthcPJ6kEBJ+KvCiPkuIv537u8o0NGyrcgIjX6Wf3qBbXyozit1L3QhZF7+aIx4B3UWHEmzsHzoUwt/9EhGVrL1ynPZbogS16tdQ3SBo9YK/5BFffkrkdIklfPkJujpvHYOkAUyQFT8qbMwxhwRAoAOCjQdUB4ZzIE=; 24:3jTKrUPwmbISHYnQ6yEvMhPuVP41cAdA9CuONoiTsvExQcCtgOVQZO950c8dcxd3QaKWESS8Thnmc9ErWztuEA7Y2C2pluO43NxBpDrvOCg=; 7:lDfbK6fFNDB5O48qMbelyObTJ25Yv0MygwNqhRGVyhf9zaIvJgMy7rrMY8Y5QRyOSKziVWoq6XG0MO7RAf8n8Jw2aljHgU8Pe4rbzN/CbR24jFFCa2z7JLsGEA+M+mx7QcF2c1izEToPEkB5dxnu20+GrR/IKaE+NOP1yBRAlopy520QCqbv1b+LsXY/H3roQMW1y27ZqXFSC/nwHq/cT4WwB5aKENDHyBzLPjEjSoZqo4IQff+L6VODOZAjxH6X SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2017 07:50:06.0891 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: efb727cb-4e01-4d2e-974c-08d545ebf468 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2693 Subject: Re: [dpdk-stable] [PATCH v2 2/5] lpm: fix compilation on ARM BE 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: , X-List-Received-Date: Mon, 18 Dec 2017 07:50:19 -0000 On 12/13/2017 6:52 PM, Bruce Richardson wrote: > On Wed, Dec 13, 2017 at 06:22:55PM +0530, Hemant Agrawal wrote: >> Compiling on ARM BE using Linaro toolchain caused following >> error/warnings. >> >> rte_lpm.c: In function ‘add_depth_big_v20’: >> rte_lpm.c:911:4: error: braces around scalar initializer [-Werror] >> { .group_idx = (uint8_t)tbl8_group_index, }, >> ^ >> rte_lpm.c:911:4: note: (near initialization for >> ‘new_tbl24_entry.depth’) >> rte_lpm.c:911:6:error: field name not in record or union initializer >> { .group_idx = (uint8_t)tbl8_group_index, }, >> ^ >> rte_lpm.c:911:6: note: (near initialization for >> ‘new_tbl24_entry.depth’) >> rte_lpm.c:914:13: error: initialized field overwritten >> [-Werror=override-init] >> .depth = 0, >> >> Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field") >> Cc: Michal Kobylinski >> Cc: stable@dpdk.org >> >> Signed-off-by: Jun Yang >> Signed-off-by: Hemant Agrawal >> Acked-by: Bruce Richardson >> --- >> v2: added endianess check in the assignments >> >> lib/librte_lpm/rte_lpm.c | 29 +++++++++++++++++++++++++++++ >> 1 file changed, 29 insertions(+) >> >> diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c >> index e1f1fad..a47c04f 100644 >> --- a/lib/librte_lpm/rte_lpm.c >> +++ b/lib/librte_lpm/rte_lpm.c >> @@ -912,10 +912,17 @@ add_depth_big_v20(struct rte_lpm_v20 *lpm, uint32_t ip_masked, uint8_t depth, >> */ >> >> struct rte_lpm_tbl_entry_v20 new_tbl24_entry = { >> +#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN >> { .group_idx = (uint8_t)tbl8_group_index, }, >> .valid = VALID, >> .valid_group = 1, >> .depth = 0, >> +#else >> + .depth = 0, >> + .valid_group = 1, >> + .valid = VALID, >> + { .group_idx = (uint8_t)tbl8_group_index, }, >> +#endif >> }; >> > I'm not I'd agree with this as a "better" fix. Were the issues with the > previous version of just removing the braces. All the ifdefs are rather > ugly. > Ok. I will revert.