hash错过rte_hash_lookup_bulk_data在dpdk rte_hash库中
DPDK HASH库提供了rte_hash_lookup_bulk和rte_hash_lookup_bulk_data的批量数据查找。函数返回一个bitmask作为一个参数,指示哈希命中为1,而错过了0。我想知道批量本身内部是否有类似的键(需要查找),它们是否会在命中或错过的情况下返回bitmask?
例如,想象一下批量中有两个相同键的实例。但是该钥匙尚未被哈希。两个钥匙都会作为错过返回吗?
在我的程序中,当返回的bitmask中有一个(0)时,我将新键插入哈希表。但是,当散装具有相同的密钥一次以上时,如果查找在整个键中的每个实例返回遗漏(0),则无法使用上述逻辑。
DPDK hash library offers bulk data lookups with rte_hash_lookup_bulk and rte_hash_lookup_bulk_data. The functions return a bitmask as an argument indicating the hash hits as 1 and miss as 0. I want to know if there are similar keys inside the bulk itself(which needs to be looked up), will they return as hits or misses in the bitmask?
As an example, imagine there are two instances of the same key in the bulk. But that key is not hashed yet. Will both keys will be returned as misses?
In my program, I insert the new key to the hash table when there is a miss(0) in the returned bitmask. But when the bulk has same key more than one time, above logic cannot be used if the lookup returns a miss(0) for each instance of that key in the bulk.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论