Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757766AbbEWBBG (ORCPT ); Fri, 22 May 2015 21:01:06 -0400 Received: from mail-ig0-f180.google.com ([209.85.213.180]:38124 "EHLO mail-ig0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757213AbbEWBBC (ORCPT ); Fri, 22 May 2015 21:01:02 -0400 Message-ID: <555FD14A.1050908@plumgrid.com> Date: Fri, 22 May 2015 18:00:58 -0700 From: Alexei Starovoitov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Jiri Olsa , Wang Nan CC: paulus@samba.org, a.p.zijlstra@chello.nl, mingo@redhat.com, acme@kernel.org, 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 References: <1431860222-61636-1-git-send-email-wangnan0@huawei.com> <1431860222-61636-10-git-send-email-wangnan0@huawei.com> <20150522172333.GE6609@krava.redhat.com> In-Reply-To: <20150522172333.GE6609@krava.redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1043 Lines: 27 On 5/22/15 10:23 AM, Jiri Olsa wrote: >> + >> +struct bpf_object *bpf_open_object(const char *path) >> +{ > > another suggestion for the namespace.. Arnaldo forces us ;-) > to use the object name first plus '__(method name)' for > interface functions so that would be: > > bpf_object__open > bpf_object__close > > not sure we want to keep that standard in here though.. Arnaldo? have been thinking back and forth on this one. Finally convinced myself that we shouldn't be forcing it here. object__method style would force the library to look like fake object oriented whereas it's not. It's a normal C. Let's keep it simple. Objects are not needed here. May be 'bpf_object' is an unfortunate name, but it doesn't make the library to be 'ooo'. libtraceevent doesn't use this style either... -- 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/