Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756776AbdLVVD7 (ORCPT ); Fri, 22 Dec 2017 16:03:59 -0500 Received: from mail-qk0-f193.google.com ([209.85.220.193]:43841 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756086AbdLVVD4 (ORCPT ); Fri, 22 Dec 2017 16:03:56 -0500 X-Google-Smtp-Source: ACJfBouQNDeCEI+n01fSJkTbl2/XLIFqS4tEgjWQ9TU1QTH3t1o+5C6tcUrfSLxrKd0/F9tF4UAGOA== Date: Fri, 22 Dec 2017 13:03:52 -0800 From: Jakub Kicinski To: Roman Gushchin Cc: , , , Alexei Starovoitov , Daniel Borkmann Subject: Re: [PATCH v2 bpf-next 1/2] tools/bpftool: use version from the kernel source tree Message-ID: <20171222130352.3c177d54@cakuba.netronome.com> In-Reply-To: <20171222161152.24715-1-guro@fb.com> References: <20171222161152.24715-1-guro@fb.com> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 885 Lines: 32 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!