From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0074.outbound.protection.outlook.com [104.47.37.74]) by dpdk.org (Postfix) with ESMTP id 082BE1B252 for ; Mon, 6 Nov 2017 05:30:08 +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=zxl0b0/wPsHMPzOEhChVMb+1QcCcUzJaTNjLzBl2evo=; b=l1ClrnCrReLnhnR6HhW9B6Eqzgcx4Jqw3EaCdHzRu8Hqv1e6PYLdCsHIIS7FgTtvfmKJVvVTtbz9j1iOhVSVAsglkLdyN8n7d1ZpT+Is4Gts8dPsgPXJVsuCSJwvGgTq3MxDc/vWvJCdxsEgzs+U+0JRD9YYHvnaeg9Xzyx+XOs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (106.200.244.197) by CY1PR07MB2522.namprd07.prod.outlook.com (10.167.16.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Mon, 6 Nov 2017 04:30:04 +0000 Date: Mon, 6 Nov 2017 09:59:46 +0530 From: Jerin Jacob To: Guduri Prathyusha Cc: tomasz.kantecki@intel.com, Jianbo.Liu@arm.com, guduriprathyusha@gmail.com, konstantin.ananyev@intel.com, dev@dpdk.org Message-ID: <20171106042945.GA4073@jerin> References: <20171103104351.30181-1-gprathyusha@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171103104351.30181-1-gprathyusha@caviumnetworks.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [106.200.244.197] X-ClientProxiedBy: PN1PR01CA0103.INDPRD01.PROD.OUTLOOK.COM (10.174.144.19) To CY1PR07MB2522.namprd07.prod.outlook.com (10.167.16.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c8296259-b573-4cd3-ef1d-08d524cf0ef9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199); SRVR:CY1PR07MB2522; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2522; 3:6Q6A/kdnsofAjVNIX/JA9aREc04CzHGPHYrezx4Z0nUFV+xg0sZGKuQ1DvlE949hlNVv0+8tMsaMIXcPBAe0FQcLwCmvdMU8Ld3yBVh7qJDX3OVtGTTEUWfAQAAp4loRHZFqNXQSRL3nwwObj5TnrSYRhGX6A7pVB02RZJOZuAgcJ2O8k+M1BkP8oS4chK99w2N3cBQiZdeEj6RPPFvLObLkYggglHhSgLCQoIFZygSLoYyABQvHJZFA1ettGIJt; 25:PAROPlBRHsHL+AqMLNf8LadlUqPFK/KWgjKCOwd+Qvhll4KKHKjcCNHwx9nW7pc/4ew92qkxMr0+FpiRK5aiObgnH2ou8/xrZyJVjcDD5fMELrO/T9IoETewcB9aCoeosD1TFve+MSidZHrpdjXUPB1syjlg6ZsBN6hgTgHjSG2PjLUiwcvd4zNUOgCA/GvitFccfhaVruJ1wh+5l+XBzZlxSMpInOuZilp3HHrFOQWKqe3/iJyTsmsqAgHpm9Kyl2p0gUEWLtRXDDiBH/RT4gsfTJrf5e9uFAU4Uo4q1uXOwdh4LSuA0k4h3schf4ddwaUk+KR8/5MLlfLWK7loyg==; 31:s6RW7ynyyM/DwK4O8oGuvD6XIxwCs29F+cTLLntmR7Z80ofEEI4kMKhSb5SIkNBcwQbjUK9Qi/SR6AgMemiF+/AyZiFga7ZIAoeS8xpKtzOOhe3XYmrPMwMoalgk4tqxhTueQGxrkf77hQBFvzuliq767b1Pgs5zLtxf4kI4GyHRY6jSNhC8X7AgL2R9Ei/nYOtIqI0TNvkhUflYJQtT7MS3vzh+7Ot4Aw43QCrRbZ4= X-MS-TrafficTypeDiagnostic: CY1PR07MB2522: X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2522; 20:2FUjpO3UUAFos90V1u9aBKHYaP8XDUjBOUR5Bo4MUhIGNieHHze3QzGtElw1lzbpMmpIKQbUqtNBNp01opCK7nVMYG3B2LJP8GQWeYMpy2YB1r0o9leCW+YXB79Nql8+m4e58Wh3S8unP0qRYJG2TYcHrNgwtHB0saRbR42qXD17aDhvNbY+BH9hGXioVJ+ZTrzBPVoC/CWGPqFgfauy7Qp1Izkk8jvVDZmIwGSNgfqaLf6uPjC6vKY6tJieuCG/5B9mKIQKcpXDmgywWPjopkty5ZJmRc2ssJbnusCx5xmI9QHXHkR1jrTrWPnSE9RlNxDMMY82dmySngSbKg1L00R2ywcURC+2h4HBydDs2TTMtCX2fQcyQaf5QDh4r/QWZrDGLH85d7BdSU/dR8GpBmAHS5gJiaUnkAGeNwg8DCNy4JsI450ws7YgDCesI1J4wEm1ZBqlh1KltiqM5QnqQfLKOvzXWVAFipitLvZvMvxA+py6cnRafPD57YBZZ1XXjWRb90r2t30eMd8sK816ec721w8oT352ZPCDXWGWgbPMp3sD8HKcDdoXWPttgBzm00zxvtANIlbyGhgX5nYUOpqdxRAuyR+c7+iEBvniE4k= X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3231021)(100000703101)(100105400095)(3002001)(93006095)(10201501046)(6041248)(20161123564025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR07MB2522; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR07MB2522; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2522; 4:RJx8I1nRC7ro22GYbjhb0yaWbqF+4uitLQ6F9RzrndQ/SENG+H3a3FjJXiXsIZ6jU1Bn9FAOyRWUymv4theZtXyNXApWEuIIjmg2a9SOUmzYDbVPhCODYJI/XL3ejVh3yzxgpnqWSqUz1Qmd7twsUtyrJbOxONNfwtH2kb5cCbFg4QUCqmCf2yVkuKrGESxyeymWwzorNNKCVoh3LTayHpv3sqWGkd3x9E/arpkTfUzCCL9ISMDq0IJOgOetTLncy0SvbpoL923KDeoaHf0RikUf4feMVj2sn70TzFQTjZG7FyOvXwyX7F8OgdX6E2BDz97+7kDx8M8d1VaORQblf0pQh6jWV5oe5fp+EBl/lDo= X-Forefront-PRVS: 048396AFA0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(189002)(13464003)(199003)(2906002)(81156014)(8676002)(68736007)(8936002)(6116002)(1076002)(81166006)(189998001)(23726003)(83506002)(58126008)(16586007)(316002)(33716001)(50466002)(72206003)(3846002)(25786009)(6862004)(4326008)(106356001)(39060400002)(105586002)(9686003)(53936002)(55016002)(6496005)(6246003)(33656002)(76176999)(50986999)(54356999)(5009440100003)(97736004)(7736002)(305945005)(478600001)(6666003)(101416001)(6636002)(229853002)(47776003)(5660300001)(42882006)(2950100002)(66066001)(16526018)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2522; 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: =?us-ascii?Q?1; CY1PR07MB2522; 23:eB+SwddrZGx1NgJPtNV1a7VR3UhRNMqwmGy5rTrC9?= =?us-ascii?Q?5oeXi2ha9YmpBsLMYjYPjhFWXfZIvHMcyjNTb0gAETjDKjWH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hCgnBvwdyS3GAWxfNe4LmSS+E6cxHtB3JLAjq5qeWg4XDdQvGH2w6Pw7lOw+gpY5rxPuGAm1TiGDOzvNPOhg20iO+t7Ybjk+/odYEuTnDjLOjSViac74CAFeMtcx48J5J3QvnsnEvbJ32SBIK+T+Lhr9dtR/dr9amW31mkD2juNFyHaLBBAOeCo3R3/pJlw0zBRVcwq0Cz7V5cRFGCwSzZWxw66wvKFiywSVvCo4ajtSlVwUXqQbD7yraNG9YYG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2017 04:30:04.5102 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c8296259-b573-4cd3-ef1d-08d524cf0ef9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2522 Subject: Re: [dpdk-dev] [PATCH v2] examples/l3fwd: fix aliasing in port grouping 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: Mon, 06 Nov 2017 04:30:09 -0000 -----Original Message----- > Date: Fri, 3 Nov 2017 16:13:51 +0530 > From: Guduri Prathyusha > To: tomasz.kantecki@intel.com > CC: Jianbo.Liu@arm.com, guduriprathyusha@gmail.com, > konstantin.ananyev@intel.com, dev@dpdk.org, Guduri Prathyusha > > Subject: [dpdk-dev] [PATCH v2] examples/l3fwd: fix aliasing in port grouping > X-Mailer: git-send-email 2.14.1 > > With -f-strict-aliasing enabled by default from -O2, gcc > 5.x gives > undefined behavior in port_groupx4 in ARM. 'pn' and 'pnum' are > two different pointers pointing to same chunk of memory and > with -f-strict-aliasing the pointers are assumed to be pointing to > different memory and compiler reorders instructions that depend on > pnum and pn. This breaks port grouping algorithm. > > This patch eliminates the above problem by introducing a compiler > barrier between the instructions that depend on pnum, pn and lp. > > Fixes: 569b290cdb36 ("examples/l3fwd: add NEON implementation") > > Signed-off-by: Guduri Prathyusha Acked-by: Jerin Jacob > --- > examples/l3fwd/l3fwd_neon.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h > index 4bc161394..b319b5a92 100644 > --- a/examples/l3fwd/l3fwd_neon.h > +++ b/examples/l3fwd/l3fwd_neon.h > @@ -114,6 +114,7 @@ port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1, > > /* update last port counter. */ > lp[0] += gptbl[v].lpv; > + rte_compiler_barrier(); > > /* if dest port value has changed. */ > if (v != GRPMSK) { > -- > 2.14.1 >