app/testeventdev: add string parsing helpers
[dpdk.git] / lib / librte_hash / rte_cuckoo_hash.c
index 51db006..80391cf 100644 (file)
@@ -57,6 +57,7 @@
 #include <rte_spinlock.h>
 #include <rte_ring.h>
 #include <rte_compat.h>
+#include <rte_pause.h>
 
 #include "rte_hash.h"
 #include "rte_cuckoo_hash.h"
@@ -536,7 +537,8 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
                if (cached_free_slots->len == 0) {
                        /* Need to get another burst of free slots from global ring */
                        n_slots = rte_ring_mc_dequeue_burst(h->free_slots,
-                                       cached_free_slots->objs, LCORE_CACHE_SIZE);
+                                       cached_free_slots->objs,
+                                       LCORE_CACHE_SIZE, NULL);
                        if (n_slots == 0)
                                return -ENOSPC;
 
@@ -568,7 +570,7 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
                                k->pdata = data;
                                /*
                                 * Return index where key is stored,
-                                * substracting the first dummy index
+                                * subtracting the first dummy index
                                 */
                                return prim_bkt->key_idx[i] - 1;
                        }
@@ -588,7 +590,7 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
                                k->pdata = data;
                                /*
                                 * Return index where key is stored,
-                                * substracting the first dummy index
+                                * subtracting the first dummy index
                                 */
                                return sec_bkt->key_idx[i] - 1;
                        }
@@ -729,7 +731,7 @@ __rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key,
                                        *data = k->pdata;
                                /*
                                 * Return index where key is stored,
-                                * substracting the first dummy index
+                                * subtracting the first dummy index
                                 */
                                return bkt->key_idx[i] - 1;
                        }
@@ -752,7 +754,7 @@ __rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key,
                                        *data = k->pdata;
                                /*
                                 * Return index where key is stored,
-                                * substracting the first dummy index
+                                * subtracting the first dummy index
                                 */
                                return bkt->key_idx[i] - 1;
                        }
@@ -808,7 +810,7 @@ remove_entry(const struct rte_hash *h, struct rte_hash_bucket *bkt, unsigned i)
                        /* Need to enqueue the free slots in global ring. */
                        n_slots = rte_ring_mp_enqueue_burst(h->free_slots,
                                                cached_free_slots->objs,
-                                               LCORE_CACHE_SIZE);
+                                               LCORE_CACHE_SIZE, NULL);
                        cached_free_slots->len -= n_slots;
                }
                /* Put index of new free slot in cache. */
@@ -846,7 +848,7 @@ __rte_hash_del_key_with_hash(const struct rte_hash *h, const void *key,
 
                                /*
                                 * Return index where key is stored,
-                                * substracting the first dummy index
+                                * subtracting the first dummy index
                                 */
                                ret = bkt->key_idx[i] - 1;
                                bkt->key_idx[i] = EMPTY_SLOT;
@@ -871,7 +873,7 @@ __rte_hash_del_key_with_hash(const struct rte_hash *h, const void *key,
 
                                /*
                                 * Return index where key is stored,
-                                * substracting the first dummy index
+                                * subtracting the first dummy index
                                 */
                                ret = bkt->key_idx[i] - 1;
                                bkt->key_idx[i] = EMPTY_SLOT;