ebpf: Added eBPF map update through mmap.

Changed eBPF map updates through mmaped array.
Mmaped arrays provide direct access to map data.
It should omit using bpf_map_update_elem() call,
which may require capabilities that are not present.

Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
Andrew Melnychenko 2024-02-05 18:54:31 +02:00 committed by Jason Wang
parent 6a5287ce80
commit 333b3e5fab
2 changed files with 99 additions and 23 deletions

View file

@ -20,6 +20,11 @@ struct EBPFRSSContext {
int map_configuration;
int map_toeplitz_key;
int map_indirections_table;
/* mapped eBPF maps for direct access to omit bpf_map_update_elem() */
void *mmap_configuration;
void *mmap_toeplitz_key;
void *mmap_indirections_table;
};
struct EBPFRSSConfig {