diff mbox series

[bpf-next,1/6] selftests/bpf: undo GCC-specific bpf_helpers.h changes

Message ID 20190930185855.4115372-2-andriin@fb.com
State Changes Requested
Delegated to: BPF Maintainers
Headers show
Series Move bpf_helpers and add BPF_CORE_READ macros | expand

Commit Message

Andrii Nakryiko Sept. 30, 2019, 6:58 p.m. UTC
Having GCC provide its own bpf-helper.h is not the right approach and is
going to be changed. Undo bpf_helpers.h change before moving
bpf_helpers.h into libbpf.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
---
 tools/testing/selftests/bpf/bpf_helpers.h | 8 --------
 1 file changed, 8 deletions(-)

Comments

Song Liu Sept. 30, 2019, 10:53 p.m. UTC | #1
On Mon, Sep 30, 2019 at 1:42 PM Andrii Nakryiko <andriin@fb.com> wrote:
>
> Having GCC provide its own bpf-helper.h is not the right approach and is
> going to be changed. Undo bpf_helpers.h change before moving
> bpf_helpers.h into libbpf.
>
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>

Acked-by: Song Liu <songliubraving@fb.com>
Ilya Leoshkevich Oct. 1, 2019, 10:25 a.m. UTC | #2
> Am 30.09.2019 um 20:58 schrieb Andrii Nakryiko <andriin@fb.com>:
> 
> Having GCC provide its own bpf-helper.h is not the right approach and is
> going to be changed. Undo bpf_helpers.h change before moving
> bpf_helpers.h into libbpf.
> 
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
> ---
> tools/testing/selftests/bpf/bpf_helpers.h | 8 --------
> 1 file changed, 8 deletions(-)
> 
> diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h
> index 54a50699bbfd..a1d9b97b8e15 100644
> --- a/tools/testing/selftests/bpf/bpf_helpers.h
> +++ b/tools/testing/selftests/bpf/bpf_helpers.h
> @@ -13,8 +13,6 @@
> 			 ##__VA_ARGS__);		\
> })
> 
> -#ifdef __clang__
> -
> /* helper macro to place programs, maps, license in
>  * different sections in elf_bpf file. Section names
>  * are interpreted by elf_bpf loader
> @@ -258,12 +256,6 @@ struct bpf_map_def {
> 	unsigned int numa_node;
> };
> 
> -#else
> -
> -#include <bpf-helpers.h>
> -
> -#endif
> -
> #define BPF_ANNOTATE_KV_PAIR(name, type_key, type_val)		\
> 	struct ____btf_map_##name {				\
> 		type_key key;					\
> -- 
> 2.17.1
> 

Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
John Fastabend Oct. 1, 2019, 7:10 p.m. UTC | #3
Andrii Nakryiko wrote:
> Having GCC provide its own bpf-helper.h is not the right approach and is
> going to be changed. Undo bpf_helpers.h change before moving
> bpf_helpers.h into libbpf.
> 
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
> ---
>  tools/testing/selftests/bpf/bpf_helpers.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h
> index 54a50699bbfd..a1d9b97b8e15 100644
> --- a/tools/testing/selftests/bpf/bpf_helpers.h
> +++ b/tools/testing/selftests/bpf/bpf_helpers.h
> @@ -13,8 +13,6 @@
>  			 ##__VA_ARGS__);		\
>  })
>  
> -#ifdef __clang__
> -
>  /* helper macro to place programs, maps, license in
>   * different sections in elf_bpf file. Section names
>   * are interpreted by elf_bpf loader
> @@ -258,12 +256,6 @@ struct bpf_map_def {
>  	unsigned int numa_node;
>  };
>  
> -#else
> -
> -#include <bpf-helpers.h>
> -
> -#endif
> -
>  #define BPF_ANNOTATE_KV_PAIR(name, type_key, type_val)		\
>  	struct ____btf_map_##name {				\
>  		type_key key;					\
> -- 
> 2.17.1
> 

Acked-by: John Fastabend <john.fastabend@gmail.com>
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h
index 54a50699bbfd..a1d9b97b8e15 100644
--- a/tools/testing/selftests/bpf/bpf_helpers.h
+++ b/tools/testing/selftests/bpf/bpf_helpers.h
@@ -13,8 +13,6 @@ 
 			 ##__VA_ARGS__);		\
 })
 
-#ifdef __clang__
-
 /* helper macro to place programs, maps, license in
  * different sections in elf_bpf file. Section names
  * are interpreted by elf_bpf loader
@@ -258,12 +256,6 @@  struct bpf_map_def {
 	unsigned int numa_node;
 };
 
-#else
-
-#include <bpf-helpers.h>
-
-#endif
-
 #define BPF_ANNOTATE_KV_PAIR(name, type_key, type_val)		\
 	struct ____btf_map_##name {				\
 		type_key key;					\