AltraMayor / AltraMayor/gatekeeper

Adopt Hopscotch hash table throughout Gatekeeper

Aperta
#662 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
C
Stelle
1.6k
Fork
252
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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`.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.