Re: [PATCH v4 bpf-next 6/7] libbpf: add BPF_CORE_READ/BPF_CORE_READ_INTO helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/7/19 11:15 PM, Andrii Nakryiko wrote:
>>> +#define BPF_CORE_READ(src, a, ...)                                       \
>>> +     ({                                                                  \
>>> +             ___type(src, a, ##__VA_ARGS__) __r;                         \
>>> +             BPF_CORE_READ_INTO(&__r, src, a, ##__VA_ARGS__);            \
>>> +             __r;                                                        \
>>> +     })
>>> +
>> Since we're splitting things into
>> bpf_{helpers,helper_defs,endian,tracing}.h
>> how about adding all core macros into bpf_core_read.h ?
> ok, but maybe just bpf_core.h then?

bpf_core.h is too generic. It either needs to be capitalized,
which is unheard of for header files or some suffix added.
I think bpf_core_read.h is short enough and doesn't look like
bpf_core_write.h will be coming any time soon.
If you're worried about _read part then may be
bpf_core_access.h ?





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux