X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Flibrte_hash%2Frte_cuckoo_hash.h;h=fb19bb27dfeff613866b2dba4f56f2696011a867;hb=346c2c954e85c1769f09afd1cf75182d1f705c3e;hp=eacdaa8d468493f050b05adad39ee543db5bdb5e;hpb=d5c677db89cc1e6113d55d8bf2300ec8b5f2d383;p=dpdk.git diff --git a/lib/librte_hash/rte_cuckoo_hash.h b/lib/librte_hash/rte_cuckoo_hash.h index eacdaa8d46..fb19bb27df 100644 --- a/lib/librte_hash/rte_cuckoo_hash.h +++ b/lib/librte_hash/rte_cuckoo_hash.h @@ -141,6 +141,7 @@ struct rte_hash_key { enum rte_hash_sig_compare_function { RTE_HASH_COMPARE_SCALAR = 0, RTE_HASH_COMPARE_SSE, + RTE_HASH_COMPARE_NEON, RTE_HASH_COMPARE_NUM }; @@ -210,6 +211,13 @@ 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 */ + /* Stores index of an empty ext bkt to be recycled on calling + * rte_hash_del_xxx APIs. When lock free read-write concurrency is + * enabled, an empty ext bkt cannot be put into free list immediately + * (as readers might be using it still). Hence freeing of the ext bkt + * is piggy-backed to freeing of the key index. + */ + uint32_t *ext_bkt_to_free; uint32_t *tbl_chng_cnt; /**< Indicates if the hash table changed from last read. */ } __rte_cache_aligned;