Re: [RFC PATCH v3 09/37] bpf tools: Open eBPF object file and do basic validation

Alexei Starovoitov
2015-05-23T01:01:06Z

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...