net/ixgbe: fix out of order Rx read
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 17 Oct 2016 18:29:41 +0000 (02:29 +0800)
committerBruce Richardson <bruce.richardson@intel.com>
Wed, 26 Oct 2016 17:38:18 +0000 (19:38 +0200)
commitbd85525efbf3ce382c12146ab89954e8bcdfd0be
tree3305b0efb47aecc0ce7953495437d96811f37d44
parentff6edd388603a8331217b13bb002cfd0c0e471b3
net/ixgbe: 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: c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx")

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