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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 27, 2021 at 06:07:30PM IST, Toke Høiland-Jørgensen wrote:
> Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> writes:
>
> > 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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux