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' and 4 bytes after the manual 'pad'. This leads to > build time assertion, because sizeof(struct cmap_bucket) == 136. > > Fix that by using PADDED_MEMBERS macro, which will handle all the > unexpected compiler paddings. > This is safe because we still have build time assert for the structure > size. Other possible solution is to pack the structure, but the padding > marco looks better and matches the other code. > > Signed-off-by: Ilya Maximets <i.maxim...@samsung.com>
Thanks, applied to master. I've heard a few mentions of non-64-byte cache lines lately. Is this hypothetical or are you working with a system that has larger (or smaller) cache lines? _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev