-
Notifications
You must be signed in to change notification settings - Fork 247
Closed
Labels
Operational demandThis issue would make Gatekeeper safer and/or cheaper to operateThis issue would make Gatekeeper safer and/or cheaper to operate
Milestone
Description
The current flow tables use DPDK hash library. While this library provided Gatekeeper with a good starting point, it has some edges that conflict with the way GK blocks use it. The two salient points are the following:
- DPDK hash tables have a key store that maintains a copy of all the keys present in the tables. These keys are needed to ensure that a lookup doesn't confuse two entries with identical hash values. The key store also eliminates the need for entries having a copy of their keys. Nevertheless, when entries must have a copy of their keys, like flow entries, the key store brings two disadvantages:
1.1. Duplicate, wasted memory. A flow table in Gatekeeper is 36 bytes long, and a small flow table has 2^20 entries, that is, the key store takes 36MB of memory.
1.2. One of the lasts steps of an entry lookup is to load the key being searched. When the number of entries with the same hash value is small and the flow table is large, it is better to load the entry instead of the key to minimize cache misses in the running core. In Gatekeeper, less than 1% of the buckets have entries with the same hash value. - While DPDK hash tables have a fast lookup, they struggle to add new entries when the table has high occupancy. This is critical for GK block during an attack that explores the keyspace. A solution to this problem is not known at this point, but the future solution must balance the faster lookup speed with the occupancy of the table. Section "22.7. Entry distribution in hash table" of DPDK documentation points out that their implementation can reach up to 95% occupancy.
Metadata
Metadata
Assignees
Labels
Operational demandThis issue would make Gatekeeper safer and/or cheaper to operateThis issue would make Gatekeeper safer and/or cheaper to operate