net/fm10k: fix out of order Rx read
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 17 Oct 2016 18:29:42 +0000 (02:29 +0800)
committerBruce Richardson <bruce.richardson@intel.com>
Wed, 26 Oct 2016 17:38:18 +0000 (19:38 +0200)
commit0876c8b821296eaaf466a03e1f89df05f75b661a
tree1b464fb7d5b90204e5d2f6af67e248f314bbf792
parentbd85525efbf3ce382c12146ab89954e8bcdfd0be
net/fm10k: fix out of order Rx read

In vPMD, when we load Rx desc with _mm_loadu_si128, the volatile
modifier will be cast away, allowing the compiler to reorder the
load instructions.

The Rx recv function's correctness is relying on these load
instructions following a strict sequence, reading the descriptors
in reverse order, so we add compiler barrier to prevent compiler
reorder.

Fixes: 7092be8437bd ("fm10k: add vector Rx")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
drivers/net/fm10k/fm10k_rxtx_vec.c