On 03-Apr-18 2:26 PM, Olivier Matz wrote:
The initial objective of commit d9f0d3a1ffd4 ("ring: remove split cacheline build setting") was to add an empty cache line betwee, the producer and consumer data (on platform with cache line size = 64B), preventing from having them on adjacent cache lines.Following discussion on the mailing list, it appears that this also imposes an alignment constraint that is not required. This patch removes the extra alignment constraint and adds the empty cache lines using padding fields in the structure. The size of rte_ring structure and the offset of the fields remain the same on platforms with cache line size = 64B: rte_ring = 384 rte_ring.name = 0 rte_ring.flags = 32 rte_ring.memzone = 40 rte_ring.size = 48 rte_ring.mask = 52 rte_ring.prod = 128 rte_ring.cons = 256 But it has an impact on platform where cache line size is 128B: rte_ring = 384 -> 768 rte_ring.name = 0 rte_ring.flags = 32 rte_ring.memzone = 40 rte_ring.size = 48 rte_ring.mask = 52 rte_ring.prod = 128 -> 256 rte_ring.cons = 256 -> 512 Link: http://dpdk.org/dev/patchwork/patch/25039/ Suggested-by: Konstantin Ananyev <[email protected]> Signed-off-by: Olivier Matz <[email protected]> ---
This patch causes eal_flags_autotest to hang on FreeBSD. Root cause at this time is unknown, but this is a weird one - the test seems to hang while doing read() in bsd/eal_thread.c:59. Reverting this patch on top of rc5 results in eal_flags_autotest passing.
-- Thanks, Anatoly

