hash错过rte_hash_lookup_bulk_data在dpdk rte_hash库中

发布于 2025-02-07 13:48:45 字数 307 浏览 2 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文