]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Make global data internal arrays mmap()-able, if possible
authorAndrii Nakryiko <andriin@fb.com>
Sun, 17 Nov 2019 17:28:05 +0000 (09:28 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 18 Nov 2019 10:41:59 +0000 (11:41 +0100)
commitf5021cf5e6524446c422602186dc88e4c3f22ee8
tree7caa1d7e4c28ee1b925410be13da037eaee7d902
parentd41da1a54b88573931da01e3b01bfb20b9ea5d62
libbpf: Make global data internal arrays mmap()-able, if possible

Add detection of BPF_F_MMAPABLE flag support for arrays and add it as an extra
flag to internal global data maps, if supported by kernel. This allows users
to memory-map global data and use it without BPF map operations, greatly
simplifying user experience.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20191117172806.2195367-5-andriin@fb.com
tools/lib/bpf/libbpf.c