X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fring%2Frte_ring_c11_pvt.h;h=f895950df4876d4b235dffd68ca9050e90701109;hb=1fd3de64ff47f8865f9cbd13bb8f20611beb3cfa;hp=759192f4c44035879cca79bb1afe4be7d3c66c43;hpb=99a2dd955fba6e4cc23b77d590a033650ced9c45;p=dpdk.git diff --git a/lib/ring/rte_ring_c11_pvt.h b/lib/ring/rte_ring_c11_pvt.h index 759192f4c4..f895950df4 100644 --- a/lib/ring/rte_ring_c11_pvt.h +++ b/lib/ring/rte_ring_c11_pvt.h @@ -2,6 +2,7 @@ * * Copyright (c) 2017,2018 HXT-semitech Corporation. * Copyright (c) 2007-2009 Kip Macy kmacy@freebsd.org + * Copyright (c) 2021 Arm Limited * All rights reserved. * Derived from FreeBSD's bufring.h * Used as BSD-3 Licensed with permission from Kip Macy. @@ -21,8 +22,7 @@ __rte_ring_update_tail(struct rte_ring_headtail *ht, uint32_t old_val, * we need to wait for them to complete */ if (!single) - while (unlikely(ht->tail != old_val)) - rte_pause(); + rte_wait_until_equal_32(&ht->tail, old_val, __ATOMIC_RELAXED); __atomic_store_n(&ht->tail, new_val, __ATOMIC_RELEASE); } @@ -111,7 +111,7 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp, * @param is_sc * Indicates whether multi-consumer path is needed or not * @param n - * The number of elements we will want to enqueue, i.e. how far should the + * The number of elements we will want to dequeue, i.e. how far should the * head be moved * @param behavior * RTE_RING_QUEUE_FIXED: Dequeue a fixed number of items from a ring