-
-
Save TCY16/38fc7a5cc28adf4ef1ce3c20afbf0a82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct bucket { | |
uint64_t start_time; | |
uint64_t n_packets; | |
}; | |
struct bpf_map_def SEC("maps") state_map = { | |
.type = BPF_MAP_TYPE_PERCPU_HASH, | |
.key_size = sizeof(uint32_t), | |
.value_size = sizeof(struct bucket), | |
.max_entries = 1000000 | |
}; | |
struct bpf_map_def SEC("maps") state_map_v6 = { | |
.type = BPF_MAP_TYPE_PERCPU_HASH, | |
.key_size = sizeof(struct in6_addr), | |
.value_size = sizeof(struct bucket), | |
.max_entries = 1000000 | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment