net/i40e: fix out of order Rx read
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 17 Oct 2016 18:29:40 +0000 (02:29 +0800)
committerBruce Richardson <bruce.richardson@intel.com>
Wed, 26 Oct 2016 17:38:18 +0000 (19:38 +0200)
commitff6edd388603a8331217b13bb002cfd0c0e471b3
treea5dd8fe0bb6be81f1f92f6c66309c3f218b18571
parent7832fe9819ef72fa7b6883dd4b0dad758fc8a430
net/i40e: 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: 9ed94e5bb04e ("i40e: add vector Rx")

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