I'm currently using 2 interfaces and 1 program, im trying to share the maps between the 2 programs, but I have no idea how to do that.
I have looked on the internet and found people explaining how to do it, but I don't know how to apply it to the code.
Here are the maps im using :
struct bpf_map_def SEC("maps") map1 = {
.type = BPF_MAP_TYPE_PERCPU_ARRAY,
.key_size = sizeof(__u32),
.value_size = sizeof(__u64),
.max_entries = 2,
};
struct bpf_map_def SEC("maps") map2 = {
.type = BPF_MAP_TYPE_HASH,
.key_size = sizeof(__u32),
.value_size = sizeof(__u64) * 2,
.max_entries = 10240000,
};
struct bpf_map_def SEC("maps") map3 = {
.type = BPF_MAP_TYPE_HASH,
.key_size = sizeof(__u32),
.value_size = sizeof(__u64) * 2,
.max_entries = 10240000,
};
I tried using the XDP-LOADER but when I run it I get :
Couldn't open file 'XDP_prog.o': Operation not supported
I also tried to pin the maps using the .pinning but no success, I get an error when compiling.
I'm also new to ebpf code and I would like to understand how to make this work.
Thanks in advance.