From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0083.outbound.protection.outlook.com [104.47.32.83]) by dpdk.org (Postfix) with ESMTP id 840A01DBF; Mon, 18 Dec 2017 08:57:56 +0100 (CET) Received: from BN3PR03CA0108.namprd03.prod.outlook.com (10.174.66.26) by CY1PR03MB2362.namprd03.prod.outlook.com (10.166.207.149) 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:57:55 +0000 Received: from BY2FFO11FD015.protection.gbl (2a01:111:f400:7c0c::114) by BN3PR03CA0108.outlook.office365.com (2603:10b6:400:4::26) 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:57:55 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; 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 BY2FFO11FD015.mail.protection.outlook.com (10.1.14.131) 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:57:43 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBI7vl6F011541; Mon, 18 Dec 2017 00:57:52 -0700 From: Hemant Agrawal To: CC: , , , Michal Kobylinski , Date: Mon, 18 Dec 2017 13:26:46 +0530 Message-ID: <1513583809-3926-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513583809-3926-1-git-send-email-hemant.agrawal@nxp.com> References: <1513169578-28440-1-git-send-email-hemant.agrawal@nxp.com> <1513583809-3926-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131580574636101767; (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)(376002)(346002)(396003)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(2351001)(105606002)(498600001)(106466001)(50466002)(97736004)(2906002)(4326008)(59450400001)(2870700001)(76176011)(47776003)(36756003)(81166006)(81156014)(85426001)(53936002)(8676002)(6916009)(2950100002)(86362001)(104016004)(6666003)(356003)(5820100001)(5660300001)(23676004)(54906003)(68736007)(316002)(8936002)(50226002)(77096006)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2362; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD015; 1:wEh5Iq2Ao9q/QBxrEupFtStMzqqERAqzs4qV/ev16GFxnIg0++mcL5G40VaCoTIoZBZleblHRWwJyVOhyhGFW3ORpWq5DaalL8/Rj4V4qMj00hiOUx5ASycxPi1xnMwp X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: af2ead2c-c881-4a8f-d087-08d545ed04fd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:CY1PR03MB2362; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2362; 3:gQzo9NrYnpXGMw+PToDSrWcCytWDr/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2reJ8vwGZmkKihxsqdsjAZRXjHodWOGFtyVmsEa6xGCUrwWNCEesm99xlggdhLq7JqXe3rKxAR2GMsiSjFP4/OkL4FcQ9d50t2VqTe1SEQyPPvEy3f+FzQCoO5aIoQ+EKk+2ckUBrcCSnBnNk5dFFdwD5IPZKrrN+pQ4HANlrrgNK6bjtYDdDRSYxBCx0nZMUhOC3hywbf8RyVjYiDkz3KGZw1gkuqr9FUUhUADuNpV9Sn8zRNIOOXO8fiNtcpvN9Qlc= 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)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231023)(3002001)(6055026)(6096035)(20161123559100)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123556025)(20161123561025)(20161123565025)(20161123563025)(201708071742011); SRVR:CY1PR03MB2362; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR03MB2362; X-Forefront-PRVS: 0525BB0ADF X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjAzTUIyMzYyOzIzOmJIWGJMQkpsb0xNVG5lSTVuWWhuQlBoamZM?= =?utf-8?B?L3ptU0hZam5GTU9hWURXdG9YTko1ZVNDZGNjcWdYTVlvR2xtQmthaWlVSTZY?= =?utf-8?B?bUpiYzl4UXFXeEY5Qmw0eFBSTkw3bDlEYlp0WVphVW9LZ0oySWlTVk1seXhE?= =?utf-8?B?YUN2SlRVZGIyZm1QemNUanpCUWVTeDFrQmcxUlRiKzluc0NCVGtpY204SzV2?= =?utf-8?B?ZkU3OGFsVkNZemJnV2dSbUlWcEd4QU1WUlVWQS9vRmd6YXdzU0pRYmxOTzUz?= =?utf-8?B?cEhwc0NJdFdZdXhFQ0hsYlMwYVVUVjR4TW15L3BpSExsK0l1ZGpVcUxBT1ZV?= =?utf-8?B?eHJCZ3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BoUQe7dXnIrmj+SaKARpGlsHqopK32Z/9qIyhWJzZuwMG6tOVljCueU8c6NQBMiS4rhDuwRvX56hu1BIaG37nc4E6mBj3aE7L3Yuh2mDYS8C7rDMP3x+mBMruirasXlVZJfKABXdgV2NVUDAyuIgg/ZKQ9g SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2017 07:57:43.4229 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: af2ead2c-c881-4a8f-d087-08d545ed04fd 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: CY1PR03MB2362 Subject: [dpdk-stable] [PATCH v3 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:57:57 -0000 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: Hemant Agrawal Acked-by: Bruce Richardson --- v3: reverting ifdef v2: adding ifdef lib/librte_lpm/rte_lpm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c index e1f1fad..dda74a9 100644 --- a/lib/librte_lpm/rte_lpm.c +++ b/lib/librte_lpm/rte_lpm.c @@ -912,7 +912,7 @@ 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 = { - { .group_idx = (uint8_t)tbl8_group_index, }, + .group_idx = (uint8_t)tbl8_group_index, .valid = VALID, .valid_group = 1, .depth = 0, @@ -958,7 +958,7 @@ 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 = { - { .group_idx = (uint8_t)tbl8_group_index, }, + .group_idx = (uint8_t)tbl8_group_index, .valid = VALID, .valid_group = 1, .depth = 0, @@ -1365,7 +1365,7 @@ delete_depth_small_v20(struct rte_lpm_v20 *lpm, uint32_t ip_masked, */ struct rte_lpm_tbl_entry_v20 new_tbl24_entry = { - {.next_hop = lpm->rules_tbl[sub_rule_index].next_hop,}, + .next_hop = lpm->rules_tbl[sub_rule_index].next_hop, .valid = VALID, .valid_group = 0, .depth = sub_rule_depth, @@ -1668,7 +1668,7 @@ delete_depth_big_v20(struct rte_lpm_v20 *lpm, uint32_t ip_masked, } else if (tbl8_recycle_index > -1) { /* Update tbl24 entry. */ struct rte_lpm_tbl_entry_v20 new_tbl24_entry = { - { .next_hop = lpm->tbl8[tbl8_recycle_index].next_hop, }, + .next_hop = lpm->tbl8[tbl8_recycle_index].next_hop, .valid = VALID, .valid_group = 0, .depth = lpm->tbl8[tbl8_recycle_index].depth, -- 2.7.4