From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emea01-db3-obe.outbound.protection.outlook.com (mail-db3on0070.outbound.protection.outlook.com [157.55.234.70]) by dpdk.org (Postfix) with ESMTP id B8DEEC6CA for ; Mon, 22 Jun 2015 18:47:45 +0200 (CEST) Authentication-Results: 6wind.com; dkim=none (message not signed) header.d=none; Received: from cchemparathy-ubuntu (12.218.212.162) by VI1PR02MB0798.eurprd02.prod.outlook.com (10.162.14.148) with Microsoft SMTP Server (TLS) id 15.1.195.15; Mon, 22 Jun 2015 16:47:44 +0000 Date: Mon, 22 Jun 2015 09:47:26 -0700 From: Cyril Chemparathy To: Thomas Monjalon Message-ID: <20150622094726.2a751267@cchemparathy-ubuntu> In-Reply-To: <4101438.HZvvEl93na@xps13> References: <1434735293-15469-1-git-send-email-cchemparathy@ezchip.com> <1434735293-15469-6-git-send-email-cchemparathy@ezchip.com> <4101438.HZvvEl93na@xps13> Organization: EZchip X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [12.218.212.162] X-ClientProxiedBy: CO2PR18CA0025.namprd18.prod.outlook.com (25.161.80.35) To VI1PR02MB0798.eurprd02.prod.outlook.com (25.162.14.148) X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB0798; 2:xG+ihozUKnFmwJ5vvGYOSp6wJvpmCvPft0UoOkhzDyu20iPNoX820rB9VBRSlDOj; 3:8D/RB8vwPdiYHPfzZyZI3j3fiN+uMaz491bJwE/xshWXL8f38hcSpQ9x4+Y7FhkU3SSA54uztqlqV/QJFdGMa7IOFM5C7bTJ3HV7Bicf1jC2nwltlSobWGu4KRrheJLCkr76oiDAxXQTrFSyS2rENA==; 20:IDRVtftGYAfCJNo/M9iUEWM4WFyjli4QwgfLCAU+kdLrW+We1jZBsxm4NDS/DqORphZTM1PJ+sHAEZpn35gdJIYzlE6jKdQpbdmJSzULCDJdAX8rpaDlMGAx7VMnGGETwJNzrx6Tog6psF74LuhUDW2eSFGVoKPJc9Xg6hIX/3E=; 4:p/A4qtT3Zg12dtLyX09MwhhCKEHBOlm5DxVq0XLnklfmWjML8h/jNg726i12PvcR7Ob+QgDms5vF7nRE8SQnc7armBx1H8x10Z0zEJiCoP/NruRBPtTSmJP3Q5BD+dRqoD6M3wZnS1rkGjx1G2hEpkMN6Tgf9bACr++EehdU8XFrsvIF3qpKBUQ0H3KiVSEvFNFs5XFkb1dRwvbcOG21YNiUOaXvwmT1GtSR3e7dJA67YKxSriDaRnCWhV8lko3vYDxmP3N4wiiK3bAACvX+tjgP2hzG7xMDJJ4DEQVIFmA= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR02MB0798; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:VI1PR02MB0798; BCL:0; PCL:0; RULEID:; SRVR:VI1PR02MB0798; X-Forefront-PRVS: 06157D541C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(377424004)(51704005)(24454002)(86362001)(76176999)(23726002)(66066001)(92566002)(77096005)(33716001)(46102003)(50986999)(33646002)(42186005)(122386002)(47776003)(77156002)(62966003)(19580405001)(19580395003)(50466002)(46406003)(5001960100002)(50226001)(40100003)(110136002)(87976001)(5001920100001)(189998001)(2950100001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR02MB0798; H:cchemparathy-ubuntu; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB0798; 23:0iKwxJVN25Zzchq4UC13h5jDFjOdBNNZcME8FerUQLDDTXTu8oT+vlmvbm5z0VUfDJ5DKFu/8+PaAfX7ip1fVyEG0DdrH+kQxjHSRevlueFkkoouYn4u/wt4mrar61itMOF2iSA6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pWivc8ub31SW+Fnge0bcL2va0KMGMMj/YKGygj+lR/pDUkDMTUqdtzLZErHXTKKk9wSLW116dx+Ift0fJA== X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2015 16:47:44.2147 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR02MB0798 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 05/10] eal: add and use unaligned integer types X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2015 16:47:46 -0000 On Mon, 22 Jun 2015 11:36:20 +0200 Thomas Monjalon wrote: > 2015-06-19 10:34, Cyril Chemparathy: > > On machines that are strict on pointer alignment, current code > > breaks on GCC's -Wcast-align checks on casts from narrower to wider > > types. This patch introduces new unaligned_uint(16|32|64)_t types, > > which correctly retain alignment in such cases. > [...] > > +#ifdef RTE_ARCH_STRICT_ALIGN > > +typedef uint64_t unaligned_uint64_t __attribute__ ((aligned(1))); > > +typedef uint32_t unaligned_uint32_t __attribute__ ((aligned(1))); > > +typedef uint16_t unaligned_uint16_t __attribute__ ((aligned(1))); > > +#else > > +typedef uint64_t unaligned_uint64_t; > > +typedef uint32_t unaligned_uint32_t; > > +typedef uint16_t unaligned_uint16_t; > > +#endif > > CONFIG_RTE_ARCH_STRICT_ALIGN should be declared (and disabled) in > config templates. Sure. Will include in v3. I'm assuming this goes into common_linuxapp and common_bsdapp, allowing specific architectures to override if necessary. Correct?