From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [PATCH v2 bpf-next 1/2] tools/bpftool: use version from the kernel source tree Date: Fri, 22 Dec 2017 13:03:52 -0800 Message-ID: <20171222130352.3c177d54@cakuba.netronome.com> References: <20171222161152.24715-1-guro@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: , , , Alexei Starovoitov , Daniel Borkmann To: Roman Gushchin Return-path: In-Reply-To: <20171222161152.24715-1-guro@fb.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org 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 > Cc: Jakub Kicinski > Cc: Alexei Starovoitov > Cc: Daniel Borkmann Reviewed-by: Jakub Kicinski Thanks Roman!