AltraMayor / gatekeeper

The first open-source DDoS protection system
https://github.com/AltraMayor/gatekeeper/wiki
GNU General Public License v3.0
1.29k stars 227 forks source link

Maximize cache hits for GK, GT, and GK-GT unit #36

Open AltraMayor opened 7 years ago

AltraMayor commented 7 years ago

The GK blocks, GT blocks, and the GK-GT unit are the critical blocks of Gatekeeper and Grantor servers. In order to allow them to reach line speed, we need to maximize their cache hits, even if this reduces the cache hits of other blocks.

AltraMayor commented 5 years ago

This issue depends on us having a good testing environment. This test environment must generate normal and under-attack traffic patterns and a number of performance and correctness metrics in order to be well suited for the evaluation of the new code.

A reasonable intermediate step to initially evaluate how much can be gained through addressing this issue is to adopt rte_hash_lookup_bulk() in GK blocks to look up the flow table for the incoming packets.

cjdoucette commented 5 years ago

As a part of this issue, we should address this comment in include/gatekeeper_sol.h:

/*                                                                              
 * XXX The DPDK packet scheduler uses __rte_cache_aligned                       
 * on member @memory and on the struct as a whole. Should                       
 * it be used here?                                                             
 */
AltraMayor commented 5 years ago

Another lower hanging fruit is for GK blocks to adopt rte_lpm_lookupx4() as well.