[DTrace-devel] [PATCH 1/2] bpf: use bpf/bpf_helpers.h from libbpf-dev[el]

Eugene Loh eugene.loh at oracle.com
Fri Feb 2 18:24:48 UTC 2024


iiuc, this patch introduces a new dependency:  libbpf-devel.  So I would 
think that means adding that BuildReq to dtrace.spec.  If so, then that 
addition should be made and:
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>

On 2/2/24 11:49, Kris Van Hees via DTrace-devel wrote:
> Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
> ---
>   bpf/Build         | 2 +-
>   bpf/agg_lqbin.c   | 4 ++--
>   bpf/agg_qbin.c    | 4 ++--
>   bpf/get_agg.c     | 4 ++--
>   bpf/get_bvar.c    | 4 ++--
>   bpf/get_dvar.c    | 4 ++--
>   bpf/probe_error.c | 4 ++--
>   bpf/speculation.c | 4 ++--
>   bpf/strlen.c      | 4 ++--
>   9 files changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/bpf/Build b/bpf/Build
> index 4f3c7ca0..62812942 100644
> --- a/bpf/Build
> +++ b/bpf/Build
> @@ -16,7 +16,7 @@ $(objdir)/include/.dir.stamp:
>   	@touch $(objdir)/include/.dir.stamp
>   
>   BPFLIBS += bpf_dlib
> -bpf_dlib_CPPFLAGS = -Ilibdtrace -Iinclude -I$(objdir)/include
> +bpf_dlib_CPPFLAGS = -Ilibdtrace -Iinclude -I$(objdir)/include -idirafter /usr/include
>   bpf_dlib_TARGET = dlibs/bpf_dlib
>   bpf_dlib_DIR := $(current-dir)
>   bpf_dlib_SRCDEPS = $(objdir)/include/.dir.stamp
> diff --git a/bpf/agg_lqbin.c b/bpf/agg_lqbin.c
> index 5eba9de3..c6b407ff 100644
> --- a/bpf/agg_lqbin.c
> +++ b/bpf/agg_lqbin.c
> @@ -1,10 +1,10 @@
>   // SPDX-License-Identifier: GPL-2.0
>   /*
> - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2020, 2024, Oracle and/or its affiliates.
>    */
>   #include <linux/bpf.h>
>   #include <stdint.h>
> -#include <bpf-helpers.h>
> +#include <bpf/bpf_helpers.h>
>   
>   #ifndef noinline
>   # define noinline	__attribute__((noinline))
> diff --git a/bpf/agg_qbin.c b/bpf/agg_qbin.c
> index 741dfe27..00d2a1a8 100644
> --- a/bpf/agg_qbin.c
> +++ b/bpf/agg_qbin.c
> @@ -1,10 +1,10 @@
>   // SPDX-License-Identifier: GPL-2.0
>   /*
> - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2020, 2024, Oracle and/or its affiliates.
>    */
>   #include <linux/bpf.h>
>   #include <stdint.h>
> -#include <bpf-helpers.h>
> +#include <bpf/bpf_helpers.h>
>   
>   #ifndef noinline
>   # define noinline	__attribute__((noinline))
> diff --git a/bpf/get_agg.c b/bpf/get_agg.c
> index 0f26ed34..c0eb825f 100644
> --- a/bpf/get_agg.c
> +++ b/bpf/get_agg.c
> @@ -1,10 +1,10 @@
>   // SPDX-License-Identifier: GPL-2.0
>   /*
> - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2022, 2024, Oracle and/or its affiliates.
>    */
>   #include <linux/bpf.h>
>   #include <stdint.h>
> -#include <bpf-helpers.h>
> +#include <bpf/bpf_helpers.h>
>   #include <bpf-lib.h>
>   #include <dt_bpf_maps.h>
>   #include <dt_dctx.h>
> diff --git a/bpf/get_bvar.c b/bpf/get_bvar.c
> index 3fba982a..751dc9c3 100644
> --- a/bpf/get_bvar.c
> +++ b/bpf/get_bvar.c
> @@ -1,11 +1,11 @@
>   // SPDX-License-Identifier: GPL-2.0
>   /*
> - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2020, 2024, Oracle and/or its affiliates.
>    */
>   #include <linux/bpf.h>
>   #include <stddef.h>
>   #include <stdint.h>
> -#include <bpf-helpers.h>
> +#include <bpf/bpf_helpers.h>
>   #include <dtrace/conf.h>
>   #include <dtrace/dif_defines.h>
>   #include <dtrace/faults_defines.h>
> diff --git a/bpf/get_dvar.c b/bpf/get_dvar.c
> index 0a4a758b..1bb5eb00 100644
> --- a/bpf/get_dvar.c
> +++ b/bpf/get_dvar.c
> @@ -1,10 +1,10 @@
>   // SPDX-License-Identifier: GPL-2.0
>   /*
> - * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2019, 2024, Oracle and/or its affiliates.
>    */
>   #include <linux/bpf.h>
>   #include <stdint.h>
> -#include <bpf-helpers.h>
> +#include <bpf/bpf_helpers.h>
>   #include <bpf-lib.h>
>   #include <dt_dctx.h>
>   
> diff --git a/bpf/probe_error.c b/bpf/probe_error.c
> index 5f54533d..c8ddcdfa 100644
> --- a/bpf/probe_error.c
> +++ b/bpf/probe_error.c
> @@ -1,10 +1,10 @@
>   // SPDX-License-Identifier: GPL-2.0
>   /*
> - * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2021, 2024, Oracle and/or its affiliates.
>    */
>   #include <linux/bpf.h>
>   #include <stdint.h>
> -#include <bpf-helpers.h>
> +#include <bpf/bpf_helpers.h>
>   #include <dt_dctx.h>
>   
>   #ifndef noinline
> diff --git a/bpf/speculation.c b/bpf/speculation.c
> index 616008f3..ccd5877f 100644
> --- a/bpf/speculation.c
> +++ b/bpf/speculation.c
> @@ -1,10 +1,10 @@
>   // SPDX-License-Identifier: GPL-2.0
>   /*
> - * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2021, 2024, Oracle and/or its affiliates.
>    */
>   #include <linux/bpf.h>
>   #include <stdint.h>
> -#include <bpf-helpers.h>
> +#include <bpf/bpf_helpers.h>
>   #include <bpf-lib.h>
>   #include <dt_bpf_maps.h>
>   
> diff --git a/bpf/strlen.c b/bpf/strlen.c
> index d39955a2..5408ed17 100644
> --- a/bpf/strlen.c
> +++ b/bpf/strlen.c
> @@ -1,9 +1,9 @@
>   // SPDX-License-Identifier: GPL-2.0
>   /*
> - * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2021, 2024, Oracle and/or its affiliates.
>    */
>   #include <linux/bpf.h>
> -#include <bpf-helpers.h>
> +#include <bpf/bpf_helpers.h>
>   #include <stdint.h>
>   #include <dt_dctx.h>
>   #include <bpf-lib.h>



More information about the DTrace-devel mailing list