AltraMayor / AltraMayor/gatekeeper
Adopt Hopscotch hash table throughout Gatekeeper
- Ngôn ngữ chính
- C
- Star
- 1.6k
- Fork
- 252
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Gatekeeper version 1.2 introduces a general Hopscotch hash table library to implement the flow table, Gatekeeper counts with its own hash table library. We now may be able to replace all hash tables in Gatekeeper that use DPDK's hash library; search for `rte_hash_create()`.
Currently, there are two use cases for hash tables:
1. `lls/cache.c`: hash table for ARP and ND resolutions.
2. `gk/rt.c`: hash table for cache of Ethernet headers. While the code has a single writer, care must be taken to support concurrent readers. The new code should leverage the internal QID of Gatekeeper's hash table to simplify the allocation of caches of Ethernet headers (see `get_new_ether_cache_locked()`). An entry array will be needed to hold the key of the entries and the data pointer. The GT block uses the code of this cache as well, so it makes sense to move it into its own library.
These use cases may require one to improve our hash library to support concurrent readers while a single writer updates the table. But before this improvement is done, one should review the synchronization model of the use cases to check if they can be rewritten in such a way that no synchronization is needed. If the improvement of our hash library is necessary, it must not have any significant performance penalty since this library is used to implement the flow table of Gatekeeper.
The hash tables of the use cases above are relatively small, so one can set their performance parameters as follows: `max_probes = 8` and `scale_num_bucket = 2`.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.