Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751290AbbEZAlV (ORCPT ); Mon, 25 May 2015 20:41:21 -0400 Received: from mail.kernel.org ([198.145.29.136]:48821 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751134AbbEZAlT (ORCPT ); Mon, 25 May 2015 20:41:19 -0400 Date: Mon, 25 May 2015 21:41:14 -0300 From: Arnaldo Carvalho de Melo To: "Wangnan (F)" Cc: Alexei Starovoitov , Jiri Olsa , paulus@samba.org, a.p.zijlstra@chello.nl, mingo@redhat.com, namhyung@kernel.org, jolsa@kernel.org, dsahern@gmail.com, daniel@iogearbox.net, brendan.d.gregg@gmail.com, masami.hiramatsu.pt@hitachi.com, lizefan@huawei.com, linux-kernel@vger.kernel.org, pi3orama@163.com Subject: Re: [RFC PATCH v3 09/37] bpf tools: Open eBPF object file and do basic validation Message-ID: <20150526004114.GF17970@kernel.org> References: <1431860222-61636-1-git-send-email-wangnan0@huawei.com> <1431860222-61636-10-git-send-email-wangnan0@huawei.com> <20150522172333.GE6609@krava.redhat.com> <555FD14A.1050908@plumgrid.com> <20150525133039.GD17970@kernel.org> <5563B8C8.3090105@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5563B8C8.3090105@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1517 Lines: 36 Em Tue, May 26, 2015 at 08:05:28AM +0800, Wangnan (F) escreveu: > On 2015/5/25 21:30, Arnaldo Carvalho de Melo wrote: > >Well, there are many styles to pick, the fact that perf uses __ to > >separate class name from class method doesn't mean that you should as > >well, as you may find it inconvenient or useless to you, you may prefer > >CamelCase notation, for instance ;-) > >In the same fashion the fact that libtraceevent doesn't doesn't mean you > >shouldn't use what the perf tooling uses. > I'll try OO style naming and see the results in my next version. > However, I'm not very sure whether such naming make sense, since we > have only 2 classes in libbpf: 'bpf_object, bpf_program', 'bpf_map' > has potential to become a class but currently not. > In addition, the internal functions are hidden to user, so the only > meaning to user of such API is an additional '_' in each function. > Anyway, let's see the result then decide whether it is good enough. Well, perhaps the number of classes in libbpf is really small, haven't looked in detail, but over time, if perf's track record is to be taken into accound, many more may appear :-) Time permitting I'll try to look at the current codebase again, to try to provide more comments, Thanks, - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/