From patchwork Thu Nov 2 10:08:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 117762 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1964271qgn; Thu, 2 Nov 2017 03:09:49 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TbX4l8xP+L6d2s+RfGEZgu89WCFjR1wgnUbhbQDaOHJ6CRVGbMPS3rkbHQuKtjE4dDJN1k X-Received: by 10.28.20.141 with SMTP id 135mr1129894wmu.74.1509617389591; Thu, 02 Nov 2017 03:09:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509617389; cv=none; d=google.com; s=arc-20160816; b=XNMg2iMH0uQ4M8gzXQ3qK1nflOsy1gRDa/2oYhKb+r4QRa8BeUF59FbDZIG8bNY1W+ ADBJoQvSM0qllJSbwOuuzU5R/M4E9lQ70B4BZQyFYRXr21+nxHlye9PiVNNFcLJ8w3sc XUrlnEi3+z8xF6hhrTNzLYhx/O5ezw3JtBMpt0U2hiEFA7/df+H4iB0rAd7BrAzF+yf1 hz7eZmQws3Xb3Farhm1oasYu7Eiqa8NsG/14vIXtwfB+z+KkJPuZvXzF4ZzKkJ8mayrS 3zN0tKRBsLYsQF5c+PsfgUz+s0TKbpO+DR0BnhOuzupW+T22mq7QpAHLGRIJvqorOGDn wMPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from :arc-authentication-results; bh=1vp6kM+ZCycN1P7fQAKMClXVwQwoaC7UrzoYelspmjs=; b=yOMnOp2uB9VX4NSVEimr7KNGhTmsM5S82BprMdgBZjUEKKEIOS6fe2pM/TSvMyoOGh 3gtLRi0ETFHLr3HeOqM+IBajh2vR9v99thOiRo2QCrGNdOAMl9gcmcZwDADFv4ivwBkZ h3VKcqJUGLEO1wtGmDySTas3O3Iq63hTq6qP3EBMtt3de8QZhhBlT361Sz5CAMh/SHfy OrfbE6x6EdktnwTNqPkw/qDUj2Z4mZdCgllOqomBt1gtVBsXj/XRxTNWXfNLPJrzgwLa e/mq3th/+Toh7aZDLggL4lJxivA0Qshe2UvNcWH//yPGntZN0B8e7LlNVZN4+K3h7yWZ fFog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id a77si2459274wma.225.2017.11.02.03.09.49; Thu, 02 Nov 2017 03:09:49 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DDAC71B3B6; Thu, 2 Nov 2017 11:09:48 +0100 (CET) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0059.outbound.protection.outlook.com [104.47.42.59]) by dpdk.org (Postfix) with ESMTP id 1A8781B3A7; Thu, 2 Nov 2017 11:09:46 +0100 (CET) Received: from MWHPR03CA0004.namprd03.prod.outlook.com (10.175.133.142) by BN6PR03MB2691.namprd03.prod.outlook.com (10.173.144.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.6; Thu, 2 Nov 2017 10:09:45 +0000 Received: from BN1BFFO11FD036.protection.gbl (2a01:111:f400:7c10::1:132) by MWHPR03CA0004.outlook.office365.com (2603:10b6:300:117::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.77.21 via Frontend Transport; Thu, 2 Nov 2017 10:09:44 +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 BN1BFFO11FD036.mail.protection.outlook.com (10.58.144.99) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.178.5 via Frontend Transport; Thu, 2 Nov 2017 10:09:44 +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 vA2A9bnR031572; Thu, 2 Nov 2017 03:09:42 -0700 From: Hemant Agrawal To: CC: , Michal Kobylinski , Date: Thu, 2 Nov 2017 15:38:52 +0530 Message-ID: <1509617335-6354-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509617335-6354-1-git-send-email-hemant.agrawal@nxp.com> References: <1509617335-6354-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131540909847496220; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(7966004)(346002)(376002)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(85426001)(189998001)(316002)(50986999)(2906002)(2950100002)(36756003)(4326008)(68736007)(50466002)(6916009)(23676003)(5820100001)(106466001)(105606002)(54906003)(76176999)(2351001)(2870700001)(33646002)(50226002)(6666003)(53936002)(8936002)(86362001)(97736004)(498600001)(104016004)(77096006)(8676002)(81156014)(81166006)(5660300001)(47776003)(305945005)(356003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2691; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD036; 1:G/ihgvhQkM1Tx+7cDI4PXsntozwhpIVI0g0ztLanqIuwX7dkakXq7PI3QbLn1FQ66i17ZlZRYtHIi8tHjX0jTKVEcz5ZlPdr0BgGf9kFyIs8m9qKFlwSy/Kopx2GsBiH X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 58b6753e-f3fb-418d-461c-08d521d9d75b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4628075)(201703131517081)(2017052603238); SRVR:BN6PR03MB2691; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2691; 3:qAtzSXeMldBH7U2u9I9ro5Ys0Mtt0sJ2LeTsfmCZ84R/9ThvYh9OLzC38q+aKYGUhvSugvgvj7lXcO6WkTGv/vr4FHh8IuenVEMvNIhZdzeDPEyz5YQ6eBmyivukVArxfUR6IzzlgG/gSXpqEpaVBc+StY9Laq2GkXmNlmc6ufJLbxGpfUxiy4BGO1MLThymd9nyhqmhZkL6pmKXlIwL5o1IdW7GvtBV4reOpU5FjlOpEqw2tsQVRiVCeZnV6b+a4O4VSy2PQtzeEPOW1qt7ytHvB3bcYDJUTWFAQDgM8xgKZggYSO9lIP5FsZDmYOI5oyCcEmP+y+vgJBCly4d6Wq//NLw3C8NzPZdrlg4suio=; 25:gm2po7c9wNV8TBiLbBs4xPP2v0qSMig/rHLlTtIL/w/aESiVHBaUP74YIB/iLargaFYq8/AAre+8AWORjyUAJ2BJ8iCJXdu+V4xp94uHrLig2sZRqYW7gjJxsaudtDMwlKXBxKDOmli2+eZ4Df31Aj7JfiPPuxh2Vad/6j04YwBJ0cA8NgKV2buVPG4qSulwuA8MzLnDzVh9/GAv8o7Z5OesunRu8hctz6+Q6rBK4upLg9ZAftaDC4fVF08BsrJtxsN00FVpiepSk0jwRAangu+4ZkotbriA9jqMlFKYVXm9+BpB4Ez3jJxNI77La3N4PMDGwIf9TTWq4coKrSxLJw== X-MS-TrafficTypeDiagnostic: BN6PR03MB2691: X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2691; 31:x/Fq9ZzbA4vvNX9cYlyZKQzVaohAZDvnh/fxved3IxLtz3iBpvUIX9PrClppzJzvJSx+AxBE1Wx3NVfx2RPxqx+GvQNoxtWRugTiS9gRGgI8OXkXgeVkUHWP3eQuFRGNelRT3w3FVQApDjLR7v6lGkJmGRZbkphHsyQZpxnvjNhyDjMyjDTPxIUrKeK1EJ3jSn2orhPfye3RSkRUzHsj0XGj9dHxsrsJsDzkwJlXLY0=; 4:ENNfGwqqcW/I8xHjEQhHYsd8dBgcZ2SP4NqRGq4DV1M2PWUglePnmGCHj8M8iOW/3x5DgEJ71NIqN0JE/eu0duvrFv4u61ImOI3DP8/DTtrR5k/e20lZloHbfBt4L9WB9ElXBVycMEkcW0OQXOiewVFAm3fQYsa+pRJtd2sHT23MCAdDVZHza1/U6y4DLg1HvvqgXBnmU62HAt9wSoAIxqKf06Qce4dtNW/JgkGaQAqbI3ZKYLINoq9hwvqvA/yW6uuvWqdb1SpcFXZH1ksCc94Vbawkk3qz30+N/Mmmfj+FVXfIJ7j/M/BG+tbtK6MkmRq6pbq/tIleAxbHX0PO+K/BIi48nsVVT4tthE7+XpU= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231020)(100000703101)(100105400095)(3002001)(6055026)(6096035)(20161123563025)(20161123561025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123559100)(20161123556025)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR03MB2691; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR03MB2691; X-Forefront-PRVS: 047999FF16 X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BBN6PR03MB2691=3B23=3A0iTS?= =?utf-8?q?HRQZypXzUUMOZeWqKxEQ6scpTnf8e9v+syv48ch7H7dkRim35kMFDsIv?= =?utf-8?q?PWwA2k2CUkJkKfBE9v1s0hbJ4xrI8CQKFAiPtqbRBWy5bciySrGDuvx2?= =?utf-8?q?+2FYY+qIQUyznkXt/f8Lz8VGPRyu7jxGSaY7rnu50cm7OEvUO+KN5hCt?= =?utf-8?q?UU5IpkxX1c78CSEav3ttLBVqYw2HO5S76cbRtxtgSIHN4JFGYh7Sef66?= =?utf-8?q?ajTXjqUUoetuGT+HgDg565PWa1XFFIFwV9bQicrIae0J2G+BoexL4HIJ?= =?utf-8?q?kA6xxx3eFhA/VO05pxWaLaSH3HZgfdbMsDm8A1/CSu2VbX5VUs7VGZI5?= =?utf-8?q?GEMjq/IjUHfUiUj1H51uhG5VkutM+7qq4uiAzaTZzS/aGtgLrRQPZae/?= =?utf-8?q?FOmIDTwLJWGmDpklVlLFZ1Ho3dyK2iWb6sDVmFOOCececUibiK6W0sz+?= =?utf-8?q?THBt/pugJvaPgqW2FYatXRsmgHXuZd+9fCwmQWECsIm+fsEUYZ8XzIKq?= =?utf-8?q?Dk77pLyVYHDYVFmbRQTRxYO0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uZYhmlrMzDAzajirzLo/KA3Xf+QujNNVGWmNH58QefNkBc5LHCgK2rgIqEBmpFPc+tDUHxSbNTPlAv2ZwYAigfI14U2TDMPgFqs=; 5:1aYHPrQ2Qsrph9K9xC06xzt7OIZ5qNrvGYIM1b4svI5M0QPqEEu8owHJ6c22t7wescqsTGhMcwalYDoO+ya9SNcB8OJDXD+pX4z0o+eem5jXGojVZIXURLg4M0t26m6EcSCZoEpe/SefRKLy36D0cOa6MRXm7zW6JH2yxsGzCRA=; 24:s3tgQleKyWsTSmwQg7F435nwIayalgFsPI3mT6+enymhYi/FvwtT3uXz1IxiZFupIlT6jq0sAcdrJ21Az4a2fOc/wcrrX8nrJMy8qqJUq20=; 7:mVsai8da18ZveuJrvfrUJKwCNFqy61CUGKq7JA0lNxVHkCMBJR+NiFgOxfGvV2/zeep1sswyUqQEB7vE7wS22F6PDVPxeV3ejFZIT//IXZ/+9QlZ8ivPsWqvTs3na+xmO+UktE4a9TjsLGJ75WeaqpMiHLIt3U1O7R+s9auIWzb+ZRX/B+5WvQQfNFynFj0zx9citFf1SB3C94EeSegtsu6g4Ox7ETBddtUFsiD30RqfJ4wSY4dhPHzq1pZKkH9Q SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2017 10:09:44.5780 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 58b6753e-f3fb-418d-461c-08d521d9d75b 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: BN6PR03MB2691 Subject: [dpdk-dev] [PATCH 2/5] lpm: fix compilation on ARM BE 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- lib/librte_lpm/rte_lpm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.7.4 Acked-by: Bruce Richardson diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c index 140dbb2..3723743 100644 --- a/lib/librte_lpm/rte_lpm.c +++ b/lib/librte_lpm/rte_lpm.c @@ -913,7 +913,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, @@ -959,7 +959,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, @@ -1366,7 +1366,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, @@ -1669,7 +1669,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,