net/memif: move barrier outside loop
authorHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Mon, 28 Sep 2020 19:03:34 +0000 (14:03 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 17:18:47 +0000 (19:18 +0200)
commit9ef7dc22f24c949a815beab54c83b2e85759d94b
treeb640d16fd8a04c694e58e866953f8aa44603570a
parent5198cb1c25841f6e3962bae0e9416b7ddb598982
net/memif: move barrier outside loop

load-acquire memory order has a barrier. Loading it inside
the loop will result in a barrier in every iteration. Hence,
load the variable once outside the loop.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-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