ring: guarantee dequeue ordering before tail update
authorJuhamatti Kuusisaari <juhamatti.kuusisaari@coriant.com>
Fri, 15 Jul 2016 04:39:51 +0000 (07:39 +0300)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 21 Jul 2016 21:28:30 +0000 (23:28 +0200)
commitecc7d10e448e91d01b821499baa755ca6a92115b
treeeef07d24a73061b4552b9906ef1e3e0b89c22a17
parenta0bfd57a813f66fcd13c45b91d2fa2d6156a31b4
ring: guarantee dequeue ordering before tail update

Consumer queue dequeuing must be guaranteed to be done fully before
the tail is updated. This is not guaranteed with a read barrier,
changed to a write barrier just before tail update which in practice
guarantees correct order of reads and writes.

Signed-off-by: Juhamatti Kuusisaari <juhamatti.kuusisaari@coriant.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/librte_ring/rte_ring.h