Re: [PATCH bpf-next v4 3/3] selftests/bpf: update xdp_bpf2bpf test to use new set_attach_target API

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

 




On 18 Feb 2020, at 22:21, Andrii Nakryiko wrote:

> On Mon, Feb 17, 2020 at 5:03 AM Eelco Chaudron <echaudro@xxxxxxxxxx> wrote:
>>
>> Use the new bpf_program__set_attach_target() API in the xdp_bpf2bpf
>> selftest so it can be referenced as an example on how to use it.
>>
>>
>
> nit: extra empty line?

ACK <SNIP>
>> +       prog = *ftrace_skel->skeleton->progs[0].prog;
>
> it took me a while to understand what's going on here... :) You are
> not supposed to peek into ftrace_skel->skeleton, it's an "internal"
> object that's passed into libbpf.
>
> It's better to write it as a nice and short:
>
> prog = ftrace_skel->progs.trace_on_entry;
>

Will change in next rev…





[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