Thread (4 messages) 4 messages, 2 authors, 2021-09-27

Re: [PATCH bpf-next] samples: bpf: avoid name collision with kernel enum values

From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Date: 2021-09-27 13:46:33

On Mon, Sep 27, 2021 at 06:07:30PM IST, Toke Høiland-Jørgensen wrote:
Kumar Kartikeya Dwivedi [off-list ref] writes:
quoted
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.
Hmm, shouldn't the sample just be getting the value from the kernel in
the first place instead of re-defining it?
True, but in general my assumption was that it could be built with a older
kernel's vmlinux.h, but be ran on a newer one. If that's not strictly needed, I
can just drop it.

This can also be the case if you haven't built the kernel in the tree (just did
a make headers_install), it then falls back to generating the vmlinux.h from the
running kernel.
-Toke
--
Kartikeya
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help