ring: fix unaligned memory access on aarch32
authorPhil Yang <phil.yang@arm.com>
Mon, 9 Mar 2020 17:19:55 +0000 (01:19 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 19 Mar 2020 15:18:09 +0000 (16:18 +0100)
The 32-bit arm machine doesn't support unaligned memory access. It
will cause a bus error on aarch32 with the custom element size ring.

Thread 1 "test" received signal SIGBUS, Bus error.
__rte_ring_enqueue_elems_64 (n=1, obj_table=0xf5edfe41, prod_head=0, \
r=0xf5edfb80) at /build/dpdk/build/include/rte_ring_elem.h:177
177                             ring[idx++] = obj[i++];

Fixes: cc4b218790f6 ("ring: support configurable element size")

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

No differences found