From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0053.outbound.protection.outlook.com [104.47.38.53]) by dpdk.org (Postfix) with ESMTP id EFA571B2AA for ; Tue, 30 Jan 2018 09:56:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=XX9LgYTuzCrG1Mfwepu8JWD3/Ra4zZu/ZXjrqLkxdX4=; b=dZZjyS38Z8HC8KpTFm+GiqzYUtiXNux8Z3ise/n5QjYJWXAXwrbV8DMLAXVb9pmbdDYBhyGIRk+2aDty2IE3DmD6EP+53jjN6k4YORjhL2OBUDBrp65MwNcB5z0MlKx6g3PvVWYsR0jl95LlKGYgL3gu3nzOkXyBuQNpfe9zyH8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by BN3PR07MB2514.namprd07.prod.outlook.com (10.167.4.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Tue, 30 Jan 2018 08:56:52 +0000 Date: Tue, 30 Jan 2018 14:26:08 +0530 From: Jerin Jacob To: Gowrishankar Cc: dev@dpdk.org, Olivier Matz , thomas@monjalon.net Message-ID: <20180130085607.GA29747@jerin> References: <0d242c92a3734252f6baa5592c56afeba254941b.1517301739.git.gowrishankar.m@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0d242c92a3734252f6baa5592c56afeba254941b.1517301739.git.gowrishankar.m@linux.vnet.ibm.com> User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR0101CA0061.INDPRD01.PROD.OUTLOOK.COM (10.174.150.151) To BN3PR07MB2514.namprd07.prod.outlook.com (10.167.4.139) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ff02d274-1cdd-40ce-70bb-08d567bf68b5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:BN3PR07MB2514; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2514; 3:bSU6GXnrH4sVKZstF6+ZALu7sBFxlyY3NU3WSCiCfVW3Wjw0jWO/FqmoJ4YwTUOoBox6hrMKlLXVBy7eghakA0EPaRgvaueoIWGvnCGjL8HbTwaR9PEtN5e+DrNGHqkHMbA6NXgozch6HaRH++VbJLeFFWwHNsIGDsJsDdYiVoM2l+4x4qDHQW6/U0gGBNkZwS5eoNe+SKqHK4AIdmhH1F09YQ9jvxTnTA4n2mICib3lorTMyklrjhOFO6x4F2uu; 25:sJGBpG1j8wA8UakkFc+a1uc11lWv5eQpVXlJNZ6Y6VC4Q1jpptNAWuF0xPcDFYACwOzO7yi5uVuidSUHEKHhJS4eLISTjySyNfEYcpsDdytrq+5AgaQBZPtIDWHCPGIjiCyAby91NlEcgGQGx4IVpVot4I+4+iwWtOqK9qhH8v+zXihJ0bOccZb4jFLRTh9/0hGCmA+xizf1vON2NtuUsCwlJ56cn056ngxmmDEjZQEmt571K02i2KkU3/52hVVB8nkL5hrznuZUs6V5IwqgSnpA4wtFuKCxpqCBV+2AwOcJnIU24iEsmPEGFHRduFDP0MtHGqcgvw5C4yUOdnOWhg==; 31:Lmgx3DQWBz8UJ3yoTE5nN7EupswbPf+fbWcaSgUfzjGtAk3RFzcZnd1ppTLmCCxiK/g6B2HbjWTyL2h1aZpjcpolwBgt43a40q7jDhwXCDSEFo1vSdhgBzlmcermYfVKribevU+sauJVCH8VsdWxB1dlPjKzPP6WujMm7kGRt1Qb1xzdrWymjS3qFA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exchange-Antispam-Report-Test: UriScan:(104084551191319); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(3231101)(944501161)(10201501046)(3002001)(6041288)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:BN3PR07MB2514; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2514; X-Forefront-PRVS: 0568F32D91 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(366004)(39380400002)(39860400002)(346002)(13464003)(189003)(199004)(288314003)(478600001)(5660300001)(66066001)(6306002)(97736004)(53376002)(8936002)(16526019)(83506002)(47776003)(25786009)(33656002)(42882006)(6916009)(6666003)(2950100002)(68736007)(55016002)(966005)(316002)(1076002)(33716001)(9686003)(58126008)(81156014)(81166006)(3846002)(106356001)(53936002)(8676002)(105586002)(72206003)(4326008)(5009440100003)(6246003)(2906002)(6496006)(52116002)(23676004)(2486003)(76176011)(50466002)(52146003)(26005)(6116002)(386003)(2870700001)(305945005)(7736002)(186003)(33896004)(229853002)(59450400001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2514; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjNQUjA3TUIyNTE0OzIzOmxtdDJ4RU1yNHEyaFE4cGV0ckFxWkpTYU5p?= =?utf-8?B?L2dWUDIyT1BqS0NSMUF3SURCZlI2Mi9hNEN5SzZiQ2lTVkdaNy9CVWZuS3N4?= =?utf-8?B?OW9GR1ZrWm9hekFBV0tZYy9Hd0c4NmtZUXVSNTlMSkUrOVVDdmJQQ09SSS9Z?= =?utf-8?B?SjlPTFViRU04VS85ZG1EdDdFS2hHUDBFREFWdkFmajl4OW91alJL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diagnostics: 1; BN3PR07MB2514; 6:4if7pqlH54HYy+OynzXrpPDo/UEEn+VWRuU+q/dg7sUO5lZtLXGpp+ah+3G3nxuzvxVThbeAO1X6fd6lb6rz90IRdJ36LqxC0RweICetY0g3i/efLxYdjzJKe0XnrLsz0J42OPD5s1wES8oVZa2p5t6j86D6n4Z/jvZSs7bkNsaXr4JzAlJmEuZmYct7ZrwPLML+MmueLsKTkYkQgmJqKsMzqGDVX9md7VBJf0gZ3Zum8hAZa++xo3HL4Ao4+dPs2ltFJTVcN/HeVDcu21aWqxAx39q0CKFYKZhcDDUjm4d3DZK3EeFmpP1F1jNmQlMyhzMw7zFmw5zTygEg+jiH9ihf1HeEzbfEXgFASOg2Vjw=; 5:lm+49RfZqmQEWNTKTCt2OwFpBMnnmEUhK/EYu5qF3sBCN6s6y4MBesHv99UHKgXKPa6uT56mY4BR5M/bxfUgzRlS1r90laZw8fGgdVLcqZZPv3EO56uL1wQvWTzIkuRqzx4stracRwihYtbSjmHa0vxKIcSNXh0LewzlwF/398Y=; 24:cUgG9ZMrJ+jgiceP8mbbgytjHFATpPaLkzVsuJG+ujJVwcpTvWp+H47r8IVU++PrSP5s7rp//b6RdbFP9CMTe75q5ExgZqJLuystaCVv9yU=; 7:TWWpoWk9kGHMIhKUFbDZhfgHgb8K8fABo0p4tcdZJOZ05VqrQQiR0d1n5DHA5VHtvK0vhRdUqW64GCMLXFEp8lD0ixgz0KKhHjtUyZ9dckE0spKhwk/Ylyqs1ky3rdAJ6JlPrhD533XqSwalyhkwX5tB0YUTeloikBostbnj+GypXQ19ZBEiCfiQOyMrTf1YFSFqcuUdWp3TnsnrhU41Jp266JuwKKReyC31ar/A4Wh+I0oOZ95MKXbgqHdNLr6i SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2018 08:56:52.1866 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff02d274-1cdd-40ce-70bb-08d567bf68b5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2514 Subject: Re: [dpdk-dev] [PATCH] ring: fix compilation error with a broken else clause 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: , X-List-Received-Date: Tue, 30 Jan 2018 08:56:55 -0000 -----Original Message----- > Date: Tue, 30 Jan 2018 14:18:46 +0530 > From: Gowrishankar > To: dev@dpdk.org > CC: Olivier Matz , thomas@monjalon.net, > Gowrishankar Muthukrishnan > Subject: [dpdk-dev] [PATCH] ring: fix compilation error with a broken else > clause > X-Mailer: git-send-email 1.9.1 > > From: Gowrishankar Muthukrishnan > > Calling rte_smp_wmb macro expands into a compound block, which > would break compiling a else clause following it, if that calling > place has been terminated already with ";", as in below code. > This patch adds { } around this macro to allow compiling else too. > > Fixes: git show c9fb3c6289 ("ring: move code in a new header file") > > Signed-off-by: Gowrishankar Muthukrishnan > --- > > Error in compiling source: > > In file included from /tmp/dpdk/lib/librte_ring/rte_ring.h:372:0, > from /tmp/dpdk/lib/librte_ring/rte_ring.c:90: > /tmp/dpdk/lib/librte_ring/rte_ring_generic.h: In function ‘update_tail’: > /tmp/dpdk/lib/librte_ring/rte_ring_generic.h:75:2: error: ‘else’ without a previous ‘if’ > else > ^~~~ > /tmp/dpdk/mk/internal/rte.compile-pre.mk:114: recipe for target 'rte_ring.o' failed > > lib/librte_ring/rte_ring_generic.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_ring/rte_ring_generic.h b/lib/librte_ring/rte_ring_generic.h > index 8c3e65b..a668489 100644 > --- a/lib/librte_ring/rte_ring_generic.h > +++ b/lib/librte_ring/rte_ring_generic.h > @@ -70,8 +70,9 @@ > update_tail(struct rte_ring_headtail *ht, uint32_t old_val, uint32_t new_val, > uint32_t single, uint32_t enqueue) > { > - if (enqueue) > + if (enqueue) { Just wondering, Is it because of rte_smp_wmb() implementation of ppc64 is not just correct? We had a similar fix for arm64. http://dpdk.org/browse/dpdk/commit/?id=59a3cae5305816b3739b4197d277f9455af53b9f > rte_smp_wmb(); > + } > else > rte_smp_rmb(); > /* > -- > 1.9.1 >