Re: [PATCH v2 bpf-next 1/2] tools/bpftool: use version from the kernel source tree

From: Jakub Kicinski
Date: Fri Dec 22 2017 - 16:04:12 EST


On Fri, 22 Dec 2017 16:11:51 +0000, Roman Gushchin wrote:
> Bpftool determines it's own version based on the kernel
> version, which is picked from the linux/version.h header.
>
> It's strange to use the version of the installed kernel
> headers, and makes much more sense to use the version
> of the actual source tree, where bpftool sources are.
>
> Fix this by building kernelversion target and use
> the resulting string as bpftool version.
>
> Example:
> before:
>
> $ bpftool version
> bpftool v4.14.6
>
> after:
> $ bpftool version
> bpftool v4.15.0-rc3
>
> $bpftool version --json
> {"version":"4.15.0-rc3"}
>
> Signed-off-by: Roman Gushchin <guro@xxxxxx>
> Cc: Jakub Kicinski <jakub.kicinski@xxxxxxxxxxxxx>
> Cc: Alexei Starovoitov <ast@xxxxxxxxxx>
> Cc: Daniel Borkmann <daniel@xxxxxxxxxxxxx>

Reviewed-by: Jakub Kicinski <jakub.kicinski@xxxxxxxxxxxxx>

Thanks Roman!