]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/dpdk/lib/librte_stack/rte_stack_lf_generic.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / lib / librte_stack / rte_stack_lf_generic.h
index 1191406d37b047d8f36463bfb1af6b058906b715..3abbb53428b244014ac38fd9adc8efb5f4a46be9 100644 (file)
@@ -26,7 +26,8 @@ __rte_stack_lf_count(struct rte_stack *s)
         * elements. If the mempool is near-empty to the point that this is a
         * concern, the user should consider increasing the mempool size.
         */
-       return (unsigned int)rte_atomic64_read(&s->stack_lf.used.len);
+       return (unsigned int)rte_atomic64_read((rte_atomic64_t *)
+                       &s->stack_lf.used.len);
 }
 
 static __rte_always_inline void
@@ -35,12 +36,6 @@ __rte_stack_lf_push_elems(struct rte_stack_lf_list *list,
                          struct rte_stack_lf_elem *last,
                          unsigned int num)
 {
-#ifndef RTE_ARCH_X86_64
-       RTE_SET_USED(first);
-       RTE_SET_USED(last);
-       RTE_SET_USED(list);
-       RTE_SET_USED(num);
-#else
        struct rte_stack_lf_head old_head;
        int success;
 
@@ -73,8 +68,7 @@ __rte_stack_lf_push_elems(struct rte_stack_lf_list *list,
                                __ATOMIC_RELAXED);
        } while (success == 0);
 
-       rte_atomic64_add(&list->len, num);
-#endif
+       rte_atomic64_add((rte_atomic64_t *)&list->len, num);
 }
 
 static __rte_always_inline struct rte_stack_lf_elem *
@@ -83,20 +77,12 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
                         void **obj_table,
                         struct rte_stack_lf_elem **last)
 {
-#ifndef RTE_ARCH_X86_64
-       RTE_SET_USED(obj_table);
-       RTE_SET_USED(last);
-       RTE_SET_USED(list);
-       RTE_SET_USED(num);
-
-       return NULL;
-#else
        struct rte_stack_lf_head old_head;
        int success;
 
        /* Reserve num elements, if available */
        while (1) {
-               uint64_t len = rte_atomic64_read(&list->len);
+               uint64_t len = rte_atomic64_read((rte_atomic64_t *)&list->len);
 
                /* Does the list contain enough elements? */
                if (unlikely(len < num))
@@ -158,7 +144,6 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
        } while (success == 0);
 
        return old_head.top;
-#endif
 }
 
 #endif /* _RTE_STACK_LF_GENERIC_H_ */