[PATCH 1/1] test/bpf: remove redundant library guard

Marat Khalili <[email protected]>
Newsgroups org.dpdk.dev
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.