From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH] ring: fix build with icc Date: Wed, 5 Apr 2017 16:56:52 +0100 Message-ID: <20170405155652.GA15156@bricha3-MOBL3.ger.corp.intel.com> References: <20170405150312.20960-1-ferruh.yigit@intel.com> <2101638.L2PhFsoQeI@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Ferruh Yigit , dev@dpdk.org To: Thomas Monjalon Return-path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id CBC142B84 for ; Wed, 5 Apr 2017 17:56:56 +0200 (CEST) Content-Disposition: inline In-Reply-To: <2101638.L2PhFsoQeI@xps13> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Apr 05, 2017 at 05:29:48PM +0200, Thomas Monjalon wrote: > 2017-04-05 16:03, Ferruh Yigit: > > build error: > > In file included from .../lib/librte_ring/rte_ring.c(90): > > .../lib/librte_ring/rte_ring.h(162): > > error #1366: a reduction in alignment without the "packed" attribute > > is ignored > > } __rte_cache_aligned; > > ^ > > > > Alignment attribute moved to first element of the struct > > The fix is surprising. > Is it really doing the same thing as > } __rte_cache_aligned; > at the end of the struct? > It should be. Aligning the whole structure to start on a cache-line boundary should be exactly the same as telling the compiler to put the first field of the structure on a cacheline boundary. /Bruce