Change ip_stats_map's map type to support maximum IPs.

This commit is contained in:
Christian Deacon
2020-05-07 04:32:53 +00:00
parent d2a65ae389
commit f802267fad
2 changed files with 2 additions and 2 deletions

View File

@@ -5,7 +5,7 @@
#define MAX_PCKT_LENGTH 65535 #define MAX_PCKT_LENGTH 65535
#define MAX_FILTERS 50 #define MAX_FILTERS 50
#define MAX_TRACK_IPS 30000 #define MAX_TRACK_IPS 100000
struct tcpopts struct tcpopts
{ {

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_PERCPU_HASH, .type = BPF_MAP_TYPE_LRU_PERCPU_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