Lines Matching defs:key
14 * if a bucket is full, the key is not added even if there is space in other
45 typedef uint32_t (*rte_fbk_hash_fn)(uint32_t key, uint32_t init_val);
47 /** Parameters used when creating four-byte key hash table. */
57 /** Individual entry in the four-byte key hash table. */
63 uint32_t key; /**< Key used to find value. */
68 /** The four-byte key hash table structure. */
74 uint32_t bucket_mask; /**< To find which bucket the key is in. */
84 * Find the offset into hash table of the bucket containing a particular key.
88 * @param key
94 rte_fbk_hash_get_bucket(const struct rte_fbk_hash_table *ht, uint32_t key)
96 return (ht->hash_func(key, ht->init_val) & ht->bucket_mask) <<
101 * Add a key to an existing hash table with bucket id.
106 * Hash table to add the key to.
107 * @param key
110 * Value to associate with key.
112 * Bucket to associate with key.
118 uint32_t key, uint16_t value, uint32_t bucket)
126 const uint64_t new_entry = ((uint64_t)(key) << 32) |
138 /* Change value if key already exists. */
139 if (ht->t[bucket + i].entry.key == key) {
149 * Add a key to an existing hash table. This operation is not multi-thread safe
153 * Hash table to add the key to.
154 * @param key
157 * Value to associate with key.
163 uint32_t key, uint16_t value)
166 key, value, rte_fbk_hash_get_bucket(ht, key));
170 * Remove a key with a given bucket id from an existing hash table.
175 * Hash table to remove the key from.
176 * @param key
179 * Bucket id associate with key.
185 uint32_t key, uint32_t bucket)
191 if (ht->t[bucket + i].entry.key == key) {
192 /* Find last key in bucket. */
199 * Move the last key to the deleted key's position, and
200 * delete the last key. lastEntry and i may be same but
216 * Remove a key from an existing hash table. This operation is not multi-thread
220 * Hash table to remove the key from.
221 * @param key
227 rte_fbk_hash_delete_key(struct rte_fbk_hash_table *ht, uint32_t key)
230 key, rte_fbk_hash_get_bucket(ht, key));
234 * Find a key in the hash table with a given bucketid.
239 * @param key
242 * Bucket associate to the key.
244 * The value that was associated with the key, or negative value on error.
248 uint32_t key, uint32_t bucket)
259 if (current_entry.entry.key == key) {
267 * Find a key in the hash table. This operation is multi-thread safe.
271 * @param key
274 * The value that was associated with the key, or negative value on error.
277 rte_fbk_hash_lookup(const struct rte_fbk_hash_table *ht, uint32_t key)
280 key, rte_fbk_hash_get_bucket(ht, key));