Re: [PATCH v2 bpf-next 2/4] libbpf: Add helpers to extract perf fd from bpf_link

2019-08-12 Thread Andrii Nakryiko
On Fri, Aug 9, 2019 at 2:48 PM Daniel Xu wrote: > > It is sometimes necessary to perform ioctl's on the underlying perf fd. > There is not currently a way to extract the fd given a bpf_link, so add a > a pair of casting and getting helpers. > > The casting and getting helpers are nice because

[PATCH v2 bpf-next 2/4] libbpf: Add helpers to extract perf fd from bpf_link

2019-08-09 Thread Daniel Xu
It is sometimes necessary to perform ioctl's on the underlying perf fd. There is not currently a way to extract the fd given a bpf_link, so add a a pair of casting and getting helpers. The casting and getting helpers are nice because they let us define broad categories of links that makes it