aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorAndrew Melnychenko <andrew@daynix.com>2024-02-05 18:54:35 +0200
committerJason Wang <jasowang@redhat.com>2024-03-12 19:31:47 +0800
commit0cc14182aba961f4c34a21dd202ce6e4a87470f5 (patch)
treebba84b6261874bf20066156762d1c413f3006ec5 /meson.build
parente88899fa90635da7f5c1e245028288755bb5fbd4 (diff)
ebpf: Updated eBPF program and skeleton.
Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Also, added map_flags with explicitly declared BPF_F_MMAPABLE. Added check for BPF_F_MMAPABLE flag to meson script and requirements to libbpf version. Also changed fragmentation flag check - some TCP/UDP packets may be considered fragmented if DF flag is set. Signed-off-by: Andrew Melnychenko <andrew@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 7 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index f9dbe7634e..64fba782b8 100644
--- a/meson.build
+++ b/meson.build
@@ -2006,19 +2006,23 @@ elif get_option('vduse_blk_export').disabled()
endif
# libbpf
-libbpf = dependency('libbpf', required: get_option('bpf'), method: 'pkg-config')
+bpf_version = '1.1.0'
+libbpf = dependency('libbpf', version: '>=' + bpf_version, required: get_option('bpf'), method: 'pkg-config')
if libbpf.found() and not cc.links('''
#include <bpf/libbpf.h>
+ #include <linux/bpf.h>
int main(void)
{
+ // check flag availability
+ int flag = BPF_F_MMAPABLE;
bpf_object__destroy_skeleton(NULL);
return 0;
}''', dependencies: libbpf)
libbpf = not_found
if get_option('bpf').enabled()
- error('libbpf skeleton test failed')
+ error('libbpf skeleton/mmaping test failed')
else
- warning('libbpf skeleton test failed, disabling')
+ warning('libbpf skeleton/mmaping test failed, disabling')
endif
endif