samples: bpf: fix test_lru_dist
PATCH 1/1 samples: bpf: fix test_lru_dist
From: Matteo Croce <[email protected]>
Fix this build error:
CC samples/bpf/test_lru_distsamples/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
--- samples/bpf/xdp_redirect_map_multi.bpf.c | 5 ----- 1 file changed, 5 deletions(-)
samples/bpf/xdp_redirect_map_multi.bpf.c +0 -5
@@ -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));
Signature · 1 line
2.31.1
Kumar Kartikeya Dwivedi
maintainerQuoted 9 lines · Matteo Croce
From: Matteo Croce <[email protected]>
Fix this build error:
CC
samples/bpf/test_lru_distsamples/bpf/test_lru_dist.c:36:8: error: redefinition of ‘struct list_head’36 | struct list_head { | ^~~~~~~~~
Description does not match the fix?
Quoted 12 lines
This happens even after running
make headers_installSigned-off-by Matteo Croce <[email protected]>--- samples/bpf/xdp_redirect_map_multi.bpf.c | 5 ----- 1 file changed, 5 deletions(-)samples/bpf/xdp_redirect_map_multi.bpf.c +0
-0
samples/bpf/xdp_redirect_map_multi.bpf.c line 12
Quoted 8 lines
samples/bpf/xdp_redirect_map_multi.bpf.c +0
-5@@ -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/[email protected]
[1]: https://lore.kernel.org/bpf/[email protected]
Quoted 6 lines
samples/bpf/xdp_redirect_map_multi.bpf.c +0
-1struct { __uint(type, BPF_MAP_TYPE_DEVMAP_HASH); __uint(key_size, sizeof(int)); --2.31.1
--
Kartikeya