rte_hash_free(ipv4_hash); return0; } 在该例子中,我们使用了rte_hash_create函数创建了一个哈希表并添加了两个元素。然后,我们使用rte_hash_iterate函数遍历了整个哈希表,并打印了每个节点的键、值和端口号。
rte_hash_add_key_data(hash_table,&data2.ip,&data2); // 迭代并打印哈希表中的数据 intret; void*key; void*value; // 初始化迭代器 rte_hash_iterate_init(hash_table,&iter); // 迭代哈希表并打印数据 while((ret=rte_hash_iterate(hash_table,&key,&value,&iter))>=0){ structip_mac*entr...
rte_hash_del_key(const struct rte_hash *h, const void *key); int32_t rte_hash_del_key_with_hash(const struct rte_hash *h, const void *key, hash_sig_t sig); 查找 int rte_hash_get_key_with_position(const struct rte_hash *h, const int32_t position, void **key); int rte_ha...
rte_hash_parameters 结构体 structrte_hash_parameters{constchar*name;/**< Name of the hash. */uint32_tentries;/**< Total hash table entries. */uint32_treserved;/**< Unused field. Should be set to 0 */uint32_tkey_len;/**< Length of hash key. */rte_hash_function hash_func;/*...
hash: add iterate function … pablodelara authored and Thomas Monjalon committed Jul 12, 2015 Copy the full SHA f9edbc9 View commit details View at this point in the history Browse the repository at this point in the history hash: allow to store data in hash table … pablodelara...
intrte_hash_lookup_bulk_data(conststructrte_hash*h,constvoid**keys,uint32_tnum_keys,uint64_t*hit_mask,void*data[]);intrte_hash_lookup_bulk(conststructrte_hash*h,constvoid**keys,uint32_tnum_keys,int32_t*positions);int32_trte_hash_iterate(conststructrte_hash*h,constvoid**key,void**...