git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
eal: improve option API documentation
[dpdk.git]
/
lib
/
librte_hash
/
rte_cuckoo_hash.h
diff --git
a/lib/librte_hash/rte_cuckoo_hash.h
b/lib/librte_hash/rte_cuckoo_hash.h
index
ff95181
..
eacdaa8
100644
(file)
--- a/
lib/librte_hash/rte_cuckoo_hash.h
+++ b/
lib/librte_hash/rte_cuckoo_hash.h
@@
-1,5
+1,6
@@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2016 Intel Corporation
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2016 Intel Corporation
+ * Copyright(c) 2018 Arm Limited
*/
/* rte_cuckoo_hash.h
*/
/* rte_cuckoo_hash.h
@@
-28,6
+29,17
@@
#define RETURN_IF_TRUE(cond, retval)
#endif
#define RETURN_IF_TRUE(cond, retval)
#endif
+#if defined(RTE_LIBRTE_HASH_DEBUG)
+#define ERR_IF_TRUE(cond, fmt, args...) do { \
+ if (cond) { \
+ RTE_LOG(ERR, HASH, fmt, ##args); \
+ return; \
+ } \
+} while (0)
+#else
+#define ERR_IF_TRUE(cond, fmt, args...)
+#endif
+
#include <rte_hash_crc.h>
#include <rte_jhash.h>
#include <rte_hash_crc.h>
#include <rte_jhash.h>
@@
-123,7
+135,7
@@
struct rte_hash_key {
};
/* Variable key size */
char key[0];
};
/* Variable key size */
char key[0];
-}
__attribute__((aligned(KEY_ALIGNMENT)))
;
+};
/* All different signature compare functions */
enum rte_hash_sig_compare_function {
/* All different signature compare functions */
enum rte_hash_sig_compare_function {
@@
-174,6
+186,8
@@
struct rte_hash {
* free the key index associated with the deleted entry.
* This flag is enabled by default.
*/
* free the key index associated with the deleted entry.
* This flag is enabled by default.
*/
+ uint8_t readwrite_concur_lf_support;
+ /**< If read-write concurrency lock free support is enabled */
uint8_t writer_takes_lock;
/**< Indicates if the writer threads need to take lock */
rte_hash_function hash_func; /**< Function used to calculate hash. */
uint8_t writer_takes_lock;
/**< Indicates if the writer threads need to take lock */
rte_hash_function hash_func; /**< Function used to calculate hash. */
@@
-196,6
+210,8
@@
struct rte_hash {
rte_rwlock_t *readwrite_lock; /**< Read-write lock thread-safety. */
struct rte_hash_bucket *buckets_ext; /**< Extra buckets array */
struct rte_ring *free_ext_bkts; /**< Ring of indexes of free buckets */
rte_rwlock_t *readwrite_lock; /**< Read-write lock thread-safety. */
struct rte_hash_bucket *buckets_ext; /**< Extra buckets array */
struct rte_ring *free_ext_bkts; /**< Ring of indexes of free buckets */
+ uint32_t *tbl_chng_cnt;
+ /**< Indicates if the hash table changed from last read. */
} __rte_cache_aligned;
struct queue_node {
} __rte_cache_aligned;
struct queue_node {