All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
To: Marat Khalili <marat.khalili@huawei.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: Konstantin Ananyev <konstantin.ananyev@huawei.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: RE: [PATCH 1/1] test/bpf: remove redundant library guard
Date: Mon, 21 Sep 2026 09:32:20 +0000	[thread overview]
Message-ID: <a4b3ff913c894845996b91a03c1cb88b@huawei.com> (raw)
In-Reply-To: <40f46de2e8374938bb36eb428f45153f@huawei.com>



> 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);
> 
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
> 2.43.0


  parent reply	other threads:[~2026-09-21  9:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-09-21 12:44 ` Marat Khalili
2026-09-21 20:15 ` Marat Khalili

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a4b3ff913c894845996b91a03c1cb88b@huawei.com \
    --to=konstantin.ananyev@huawei.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=marat.khalili@huawei.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.