DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] test/bpf: remove redundant library guard
@ 2026-08-05  9:03 Marat Khalili
  2026-08-24 15:01 ` Marat Khalili
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Marat Khalili @ 2026-08-05  9:03 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: dev, stephen

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 <marat.khalili@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-21 20:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05  9:03 [PATCH 1/1] test/bpf: remove redundant library guard Marat Khalili
2026-08-24 15:01 ` Marat Khalili
2026-09-18 10:33 ` Marat Khalili
     [not found] ` <40f46de2e8374938bb36eb428f45153f@huawei.com>
2026-09-21  9:32   ` Konstantin Ananyev
2026-09-21 12:44 ` Marat Khalili
2026-09-21 20:15 ` Marat Khalili

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox