In xdp_redirect_map_multi.bpf.c, on newer kernels samples compilation fails when vmlinux.h is generated from a kernel supporting broadcast for devmap. Hence, avoid naming collisions to prevent build failure. Fixes: a29b3ca17ee6 (samples: bpf: Convert xdp_redirect_map_multi_kern.o to XDP samples helper) Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> --- samples/bpf/xdp_redirect_map_multi.bpf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/bpf/xdp_redirect_map_multi.bpf.c b/samples/bpf/xdp_redirect_map_multi.bpf.c index 8f59d430cb64..c6361e70c829 100644 --- a/samples/bpf/xdp_redirect_map_multi.bpf.c +++ b/samples/bpf/xdp_redirect_map_multi.bpf.c @@ -6,8 +6,8 @@ #include "xdp_sample_shared.h" enum { - BPF_F_BROADCAST = (1ULL << 3), - BPF_F_EXCLUDE_INGRESS = (1ULL << 4), + __BPF_F_BROADCAST = (1ULL << 3), + __BPF_F_EXCLUDE_INGRESS = (1ULL << 4), }; struct { @@ -43,7 +43,8 @@ static int xdp_redirect_map(struct xdp_md *ctx, void *forward_map) NO_TEAR_INC(rec->processed); return bpf_redirect_map(forward_map, 0, - BPF_F_BROADCAST | BPF_F_EXCLUDE_INGRESS); + __BPF_F_BROADCAST | + __BPF_F_EXCLUDE_INGRESS); } SEC("xdp") -- 2.33.0