Switch to single LRU maps since we can't reliably read per CPU maps within BPF program.

This commit is contained in:
Christian Deacon
2020-06-04 17:06:50 +00:00
parent d5d3f02317
commit 8faf701446

View File

@@ -60,7 +60,7 @@ struct bpf_map_def SEC("maps") stats_map =
struct bpf_map_def SEC("maps") ip_stats_map = struct bpf_map_def SEC("maps") ip_stats_map =
{ {
.type = BPF_MAP_TYPE_LRU_PERCPU_HASH, .type = BPF_MAP_TYPE_LRU_HASH,
.key_size = sizeof(uint32_t), .key_size = sizeof(uint32_t),
.value_size = sizeof(struct xdpfw_ip_stats), .value_size = sizeof(struct xdpfw_ip_stats),
.max_entries = MAX_TRACK_IPS .max_entries = MAX_TRACK_IPS
@@ -68,7 +68,7 @@ struct bpf_map_def SEC("maps") ip_stats_map =
struct bpf_map_def SEC("maps") ip_blacklist_map = struct bpf_map_def SEC("maps") ip_blacklist_map =
{ {
.type = BPF_MAP_TYPE_LRU_PERCPU_HASH, .type = BPF_MAP_TYPE_LRU_HASH,
.key_size = sizeof(uint32_t), .key_size = sizeof(uint32_t),
.value_size = sizeof(uint64_t), .value_size = sizeof(uint64_t),
.max_entries = MAX_TRACK_IPS .max_entries = MAX_TRACK_IPS