]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/dpdk/drivers/event/opdl/opdl_ring.c
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / drivers / event / opdl / opdl_ring.c
index e988f1cb243994f8f03595c61155bd3e221e24af..c8d19fef5aa5c519e3c815e2900680bea1ed579e 100644 (file)
@@ -16,7 +16,7 @@
 #include <rte_memcpy.h>
 #include <rte_memory.h>
 #include <rte_memzone.h>
-#include <rte_eal_memconfig.h>
+#include <rte_atomic.h>
 
 #include "opdl_ring.h"
 #include "opdl_log.h"
@@ -475,9 +475,7 @@ opdl_ring_input_multithread(struct opdl_ring *t, const void *entries,
        /* If another thread started inputting before this one, but hasn't
         * finished, we need to wait for it to complete to update the tail.
         */
-       while (unlikely(__atomic_load_n(&s->shared.tail, __ATOMIC_ACQUIRE) !=
-                       old_head))
-               rte_pause();
+       rte_wait_until_equal_32(&s->shared.tail, old_head, __ATOMIC_ACQUIRE);
 
        __atomic_store_n(&s->shared.tail, old_head + num_entries,
                        __ATOMIC_RELEASE);
@@ -756,7 +754,7 @@ int
 opdl_stage_disclaim(struct opdl_stage *s, uint32_t num_entries, bool block)
 {
        if (num_entries != s->num_event) {
-               rte_errno = -EINVAL;
+               rte_errno = EINVAL;
                return 0;
        }
        if (s->threadsafe == false) {