AltraMayor / AltraMayor/gatekeeper

Adopt Hopscotch hash table throughout Gatekeeper

Abierto
#662 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
C
Estrellas
1.6k
Forks
252
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.