The app/test/meson.build already adds 'bpf' as a dependency to test_bpf.c.
If the bpf library is disabled, the test source file is excluded from
the build entirely.

Therefore, the RTE_LIB_BPF guard is dead code and can be removed.

Signed-off-by: Marat Khalili <[email protected]>
---
 app/test/test_bpf.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
index 3205afaa63..88ee8ec224 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -15,24 +15,12 @@
 #include <rte_random.h>
 #include <rte_byteorder.h>
 #include <rte_errno.h>
-
-#include "test.h"
-
-#if !defined(RTE_LIB_BPF)
-
-static int
-test_bpf(void)
-{
-       printf("BPF not supported, skipping test\n");
-       return TEST_SKIPPED;
-}
-
-#else
-
 #include <rte_bpf.h>
 #include <rte_ether.h>
 #include <rte_ip.h>
 
+#include "test.h"
+
 
 /* Tests of most simple BPF programs (no instructions, one instruction etc.) */
 
@@ -3744,7 +3732,6 @@ test_bpf(void)
        return rc;
 }
 
-#endif /* !RTE_LIB_BPF */
 
 REGISTER_FAST_TEST(bpf_autotest, NOHUGE_OK, ASAN_OK, test_bpf);
 
-- 
2.43.0

Reply via email to