net/memif: relax barrier for zero copy path
authorPhil Yang <phil.yang@arm.com>
Fri, 11 Sep 2020 05:38:19 +0000 (13:38 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 21 Sep 2020 16:05:38 +0000 (18:05 +0200)
commit7ec9d6f4bd42610010e4dc85e35154f9e938e1d9
tree910f0423bfc20ce0d4afd5f1be2cda2a7b1912e1
parent0134a5c7b48c60abb7c96fa4d3362879732bc52a
net/memif: relax barrier for zero copy path

Using 'rte_mb' to synchronize the shared ring head/tail between producer
and consumer will stall the pipeline and damage performance on the weak
memory model platforms, such like aarch64.

Relax the expensive barrier with c11 atomic with explicit memory
ordering can improve 3.6% performance on throughput.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
drivers/net/memif/rte_eth_memif.c