lib/distributor: fix deadlock on aarch64
authorRuifeng Wang <ruifeng.wang@arm.com>
Tue, 15 Oct 2019 09:28:25 +0000 (17:28 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 25 Oct 2019 08:20:31 +0000 (10:20 +0200)
commit52833924822490391df3dce3eec3a2ee7777acc5
tree49669f21b466a7ddfda263b3ac3df36f5546fd44
parenta7bdb568c3e943dd0a533c10e5e2784e00e2984e
lib/distributor: fix deadlock on aarch64

Distributor and worker threads rely on data structs in cache line
for synchronization. The shared data structs were not protected.
This caused deadlock issue on weaker memory ordering platforms as
aarch64.
Fix this issue by adding memory barriers to ensure synchronization
among cores.

Bugzilla ID: 342
Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: David Hunt <david.hunt@intel.com>
lib/librte_distributor/meson.build
lib/librte_distributor/rte_distributor.c
lib/librte_distributor/rte_distributor_v20.c