Re: [ovs-dev] [PATCH] cmap: Use PADDED_MEMBERS macro for cmap_bucket padding.

2017-12-01 Thread Ben Pfaff
On Fri, Dec 01, 2017 at 09:13:08AM +0300, Ilya Maximets wrote: > On 30.11.2017 20:42, Ben Pfaff wrote: > > On Thu, Nov 30, 2017 at 03:55:03PM +0300, Ilya Maximets wrote: > >> Current implementation of manual padding inside struct cmap_bucket > >> doesn't work for some cacheline sizes. For example,

Re: [ovs-dev] [PATCH] cmap: Use PADDED_MEMBERS macro for cmap_bucket padding.

2017-11-30 Thread Ilya Maximets
On 30.11.2017 20:42, Ben Pfaff wrote: > On Thu, Nov 30, 2017 at 03:55:03PM +0300, Ilya Maximets wrote: >> Current implementation of manual padding inside struct cmap_bucket >> doesn't work for some cacheline sizes. For example, if CACHE_LINE_SIZE >> equals to 128, compiler adds an additional 8

Re: [ovs-dev] [PATCH] cmap: Use PADDED_MEMBERS macro for cmap_bucket padding.

2017-11-30 Thread Ben Pfaff
On Thu, Nov 30, 2017 at 03:55:03PM +0300, Ilya Maximets wrote: > Current implementation of manual padding inside struct cmap_bucket > doesn't work for some cacheline sizes. For example, if CACHE_LINE_SIZE > equals to 128, compiler adds an additional 8 bytes: 4 bytes between > 'hashes' and 'nodes'

[ovs-dev] [PATCH] cmap: Use PADDED_MEMBERS macro for cmap_bucket padding.

2017-11-30 Thread Ilya Maximets
Current implementation of manual padding inside struct cmap_bucket doesn't work for some cacheline sizes. For example, if CACHE_LINE_SIZE equals to 128, compiler adds an additional 8 bytes: 4 bytes between 'hashes' and 'nodes' and 4 bytes after the manual 'pad'. This leads to build time assertion,