From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [PATCH bpf-next 2/3] bpf: btf: add btf json print functionality Date: Fri, 22 Jun 2018 11:43:12 -0700 Message-ID: <20180622114312.1698418f@cakuba.netronome.com> References: <20180620203051.223156973@fb.com> <20180620203703.101156292@fb.com> <20180621145935.41ff8974@cakuba.netronome.com> <20180621225117.dhrkrtmkfbeihbe4@kafai-mbp.dhcp.thefacebook.com> <20180621160719.2cfb4b58@cakuba.netronome.com> <20180621235746.dfq6kdtkogftw3ws@kafai-mbp.dhcp.thefacebook.com> <20180621172523.6cd00ed1@cakuba.netronome.com> <20180622012052.htkvholi674x6i4f@kafai-mbp.dhcp.thefacebook.com> <20180622111751.GB3050@w1t1fb> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Martin KaFai Lau , Daniel Borkmann , Alexei Starovoitov , Yonghong Song , Quentin Monnet , "David S. Miller" , , , To: Okash Khawaja Return-path: In-Reply-To: <20180622111751.GB3050@w1t1fb> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Fri, 22 Jun 2018 12:17:52 +0100, Okash Khawaja wrote: > > > > > > > The name XYZ_struct may not be the best, perhaps you can come up with a > > > > > > > better one? > > > > > > > > > > > > > > Does that make sense? Am I missing what you're doing here? > > > > > > > > > > > > > > One process note - please make sure you run checkpatch.pl --strict on > > > > > > > bpftool patches before posting. > > > > > > > > > > > > > > Thanks for working on this! > > > > > Hi, > > While I agree on the point of backward compatibility, I think printing > two overlapping pieces of information side-by-side will make the > interface less clear. Having separate outputs for the two will keep the > interface clear and readable. > > Is there a major downside to adding a new flag for BTF output? plain output and JSON should be more or less equivalent, just formatted differently. If we hide the BTF-ed JSON under some flag most users will just run bpftool -jp map dump id X, see BTF is not there and move on, without ever looking into the man page to discover there is a magic switch...