diff mbox series

[bpf] samples: bpf: fix test_lru_dist

Message ID 20210928023816.14488-1-mcroce@linux.microsoft.com (mailing list archive)
State Superseded
Delegated to: BPF
Headers show
Series [bpf] samples: bpf: fix test_lru_dist | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present fail Series targets non-next tree, but doesn't contain any Fixes tags
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for bpf
netdev/subject_prefix success Link
netdev/cc_maintainers warning 8 maintainers not CCed: hawk@kernel.org kuba@kernel.org kpsingh@kernel.org kafai@fb.com netdev@vger.kernel.org john.fastabend@gmail.com davem@davemloft.net songliubraving@fb.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 2 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 2 this patch: 0
netdev/header_inline success Link
bpf/vmtest-bpf fail VM_Test
bpf/vmtest-bpf-PR fail PR summary

Commit Message

Matteo Croce Sept. 28, 2021, 2:38 a.m. UTC
From: Matteo Croce <mcroce@microsoft.com>

Fix this build error:

  CC  samples/bpf/test_lru_dist
samples/bpf/test_lru_dist.c:36:8: error: redefinition of ‘struct list_head’
   36 | struct list_head {
      |        ^~~~~~~~~

This happens even after running `make headers_install`

Signed-off-by: Matteo Croce <mcroce@microsoft.com>
---
 samples/bpf/xdp_redirect_map_multi.bpf.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Kumar Kartikeya Dwivedi Sept. 28, 2021, 4:15 a.m. UTC | #1
On Tue, Sep 28, 2021 at 08:08:16AM IST, Matteo Croce wrote:
> From: Matteo Croce <mcroce@microsoft.com>
>
> Fix this build error:
>
>   CC  samples/bpf/test_lru_dist
> samples/bpf/test_lru_dist.c:36:8: error: redefinition of ‘struct list_head’
>    36 | struct list_head {
>       |        ^~~~~~~~~
>

Description does not match the fix?

> This happens even after running `make headers_install`
>
> Signed-off-by: Matteo Croce <mcroce@microsoft.com>
> ---
>  samples/bpf/xdp_redirect_map_multi.bpf.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/samples/bpf/xdp_redirect_map_multi.bpf.c b/samples/bpf/xdp_redirect_map_multi.bpf.c
> index 8f59d430cb64..bb0a5a3bfcf0 100644
> --- a/samples/bpf/xdp_redirect_map_multi.bpf.c
> +++ b/samples/bpf/xdp_redirect_map_multi.bpf.c
> @@ -5,11 +5,6 @@
>  #include "xdp_sample.bpf.h"
>  #include "xdp_sample_shared.h"
>
> -enum {
> -	BPF_F_BROADCAST		= (1ULL << 3),
> -	BPF_F_EXCLUDE_INGRESS	= (1ULL << 4),
> -};
> -

I sent what is hopefully the right fix for this in [0], also see [1] for
background.

[0]: https://lore.kernel.org/bpf/20210928041329.1735524-1-memxor@gmail.com
[1]: https://lore.kernel.org/bpf/87mtnyj9d4.fsf@toke.dk

>  struct {
>  	__uint(type, BPF_MAP_TYPE_DEVMAP_HASH);
>  	__uint(key_size, sizeof(int));
> --
> 2.31.1
>

--
Kartikeya
diff mbox series

Patch

diff --git a/samples/bpf/xdp_redirect_map_multi.bpf.c b/samples/bpf/xdp_redirect_map_multi.bpf.c
index 8f59d430cb64..bb0a5a3bfcf0 100644
--- a/samples/bpf/xdp_redirect_map_multi.bpf.c
+++ b/samples/bpf/xdp_redirect_map_multi.bpf.c
@@ -5,11 +5,6 @@ 
 #include "xdp_sample.bpf.h"
 #include "xdp_sample_shared.h"
 
-enum {
-	BPF_F_BROADCAST		= (1ULL << 3),
-	BPF_F_EXCLUDE_INGRESS	= (1ULL << 4),
-};
-
 struct {
 	__uint(type, BPF_MAP_TYPE_DEVMAP_HASH);
 	__uint(key_size, sizeof(int));