| 1 |
|
| 2 |
|
| 3 |
#include "common.h" |
| 4 |
|
| 5 |
#define PIN_GLOBAL_NS 2 |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
struct bpf_elf_map { |
| 12 |
unsigned int type; |
| 13 |
unsigned int size_key; |
| 14 |
unsigned int size_value; |
| 15 |
unsigned int max_elem; |
| 16 |
unsigned int flags; |
| 17 |
unsigned int id; |
| 18 |
unsigned int pinning; |
| 19 |
unsigned int inner_id; |
| 20 |
unsigned int inner_idx; |
| 21 |
}; |
| 22 |
|
| 23 |
struct bpf_elf_map hash_map __section("maps") = { |
| 24 |
.type = BPF_MAP_TYPE_HASH, |
| 25 |
.size_key = sizeof(uint32_t), |
| 26 |
.size_value = sizeof(uint64_t), |
| 27 |
.max_elem = 2, |
| 28 |
.pinning = PIN_GLOBAL_NS, |
| 29 |
}; |