Skip to content

Instantly share code, notes, and snippets.

@TCY16
Created October 5, 2020 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TCY16/3396531a8aa8884fa474e1ef8774f140 to your computer and use it in GitHub Desktop.
Save TCY16/3396531a8aa8884fa474e1ef8774f140 to your computer and use it in GitHub Desktop.
struct bpf_map_def SEC("maps") exclude_v4_prefixes = {
.type = BPF_MAP_TYPE_LPM_TRIE,
.key_size = sizeof(struct bpf_lpm_trie_key) + sizeof(uint32_t),
.value_size = sizeof(uint64_t),
.max_entries = 10000
};
struct bpf_map_def SEC("maps") exclude_v6_prefixes = {
.type = BPF_MAP_TYPE_LPM_TRIE,
.key_size = sizeof(struct bpf_lpm_trie_key) + 8, // first 64 bits
.value_size = sizeof(uint64_t),
.max_entries = 10000
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment