Cleaned code.

This commit is contained in:
Christian Deacon
2020-05-07 04:05:54 +00:00
parent 5a4cda8d70
commit 4d5eb050bd
3 changed files with 2 additions and 4 deletions

View File

@@ -5,8 +5,7 @@
#define MAX_PCKT_LENGTH 65535 #define MAX_PCKT_LENGTH 65535
#define MAX_FILTERS 50 #define MAX_FILTERS 50
#define MAX_CPUS 128 #define MAX_TRACK_IPS 30000
#define LRU_MAP_SIZE 16384
struct tcpopts struct tcpopts
{ {

View File

@@ -63,7 +63,7 @@ struct bpf_map_def SEC("maps") ip_stats_map =
.type = BPF_MAP_TYPE_PERCPU_HASH, .type = BPF_MAP_TYPE_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 = LRU_MAP_SIZE .max_entries = MAX_TRACK_IPS
}; };
SEC("xdp_prog") SEC("xdp_prog")

View File

@@ -7,7 +7,6 @@
#include <inttypes.h> #include <inttypes.h>
#include <time.h> #include <time.h>
#include <getopt.h> #include <getopt.h>
#include <sys/sysinfo.h>
#include <net/if.h> #include <net/if.h>
#include <linux/if_link.h> #include <linux/if_link.h>