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

2019-08-19 Thread Daniel Xu
On Mon, Aug 19, 2019, at 10:45 AM, Andrii Nakryiko wrote: > On Fri, Aug 16, 2019 at 3:32 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

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

2019-08-19 Thread Andrii Nakryiko
On Fri, Aug 16, 2019 at 3:32 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 v3 bpf-next 2/4] libbpf: Add helpers to extract perf fd from bpf_link

2019-08-16 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