[dpdk-dev] [PATCH] ring: fix build with icc

Bruce Richardson bruce.richardson at intel.com
Wed Apr 5 17:56:52 CEST 2017


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


More information about the dev mailing list