[PATCH 3/7] build: make bpf library optional

Bruce Richardson bruce.richardson at intel.com
Thu Jun 22 15:48:36 CEST 2023


Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 app/test/meson.build | 10 +++++++---
 lib/meson.build      |  1 +
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index bed6acfdaf..d8ad8b1d97 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -15,7 +15,6 @@ test_sources = files(
         'test_barrier.c',
         'test_bitops.c',
         'test_bitmap.c',
-        'test_bpf.c',
         'test_byteorder.c',
         'test_cksum.c',
         'test_cksum_perf.c',
@@ -152,8 +151,6 @@ fast_tests = [
         ['acl_autotest', true, true],
         ['atomic_autotest', false, true],
         ['bitmap_autotest', true, true],
-        ['bpf_autotest', true, true],
-        ['bpf_convert_autotest', true, true],
         ['bitops_autotest', true, true],
         ['byteorder_autotest', true, true],
         ['cksum_autotest', true, true],
@@ -343,6 +340,13 @@ if dpdk_conf.has('RTE_EVENT_SKELETON')
     test_deps += 'event_skeleton'
 endif
 
+if dpdk_conf.has('RTE_LIB_BPF')
+    test_sources += 'test_bpf.c'
+    fast_tests += [
+        ['bpf_autotest', true, true],
+        ['bpf_convert_autotest', true, true],
+    ]
+endif
 if dpdk_conf.has('RTE_LIB_DMADEV')
     test_sources += ['test_dmadev.c', 'test_dmadev_api.c']
     driver_test_names += 'dmadev_autotest'
diff --git a/lib/meson.build b/lib/meson.build
index e46b141657..105f167d45 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -70,6 +70,7 @@ libraries = [
 optional_libs = [
         'bbdev',
         'bitratestats',
+        'bpf',
         'cfgfile',
         'compressdev',
         'dmadev',
-- 
2.39.2



More information about the dev mailing list