[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 5/5] meson: libbpf dependency now exclusively for Linux.
From: |
Andrew Melnychenko |
Subject: |
[RFC PATCH 5/5] meson: libbpf dependency now exclusively for Linux. |
Date: |
Wed, 9 Jun 2021 13:04:57 +0300 |
Libbpf is used for eBPF RSS steering, which is
supported only by Linux TAP.
There is no reason yet to build eBPF loader and
helper for non Linux systems, even if libbpf is
present.
Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
---
meson.build | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/meson.build b/meson.build
index ce26bddead..fa6c48fb86 100644
--- a/meson.build
+++ b/meson.build
@@ -1033,19 +1033,22 @@ if not get_option('fuse_lseek').disabled()
endif
# libbpf
-libbpf = dependency('libbpf', required: get_option('bpf'), method:
'pkg-config')
-if libbpf.found() and not cc.links('''
- #include <bpf/libbpf.h>
- int main(void)
- {
- bpf_object__destroy_skeleton(NULL);
- return 0;
- }''', dependencies: libbpf)
- libbpf = not_found
- if get_option('bpf').enabled()
- error('libbpf skeleton test failed')
- else
- warning('libbpf skeleton test failed, disabling')
+libbpf = not_found
+if targetos == 'linux'
+ libbpf = dependency('libbpf', required: get_option('bpf'), method:
'pkg-config')
+ if libbpf.found() and not cc.links('''
+ #include <bpf/libbpf.h>
+ int main(void)
+ {
+ bpf_object__destroy_skeleton(NULL);
+ return 0;
+ }''', dependencies: libbpf)
+ libbpf = not_found
+ if get_option('bpf').enabled()
+ error('libbpf skeleton test failed')
+ else
+ warning('libbpf skeleton test failed, disabling')
+ endif
endif
endif
--
2.31.1
- [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd., Andrew Melnychenko, 2021/06/09
- [RFC PATCH 1/5] ebpf: Added eBPF initialization by fds., Andrew Melnychenko, 2021/06/09
- [RFC PATCH 2/5] virtio-net: Added property to load eBPF RSS with fds., Andrew Melnychenko, 2021/06/09
- [RFC PATCH 3/5] ebpf_rss_helper: Added helper for eBPF RSS., Andrew Melnychenko, 2021/06/09
- [RFC PATCH 4/5] qmp: Added qemu-ebpf-rss-path command., Andrew Melnychenko, 2021/06/09
- [RFC PATCH 5/5] meson: libbpf dependency now exclusively for Linux.,
Andrew Melnychenko <=
- Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd., Jason Wang, 2021/06/10
- Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd., Yuri Benditovich, 2021/06/10
- Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd., Jason Wang, 2021/06/11
- Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd., Andrew Melnichenko, 2021/06/11
- Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd., Daniel P . Berrangé, 2021/06/11
- Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd., Jason Wang, 2021/06/15
- Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd., Andrew Melnichenko, 2021/06/15
- Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd., Andrew Melnichenko, 2021/06/18
- Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd., Jason Wang, 2021/06/21
- Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd., Yuri Benditovich, 2021/06/21