Re: [PATCH net-next v4 3/4] bpf: add helper bpf_perf_prog_read_value

2017-09-19 Thread Daniel Borkmann
On 09/19/2017 09:04 AM, Yonghong Song wrote: [...] #ifdef CONFIG_CGROUP_PERF diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 2c68b9e..ba77022 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -590,6 +590,13 @@ union bpf_attr { * @buf: buf to f

[PATCH net-next v4 3/4] bpf: add helper bpf_perf_prog_read_value

2017-09-19 Thread Yonghong Song
This patch adds helper bpf_perf_prog_read_cvalue for perf event based bpf programs, to read event counter and enabled/running time. The enabled/running time is accumulated since the perf event open. The typical use case for perf event based bpf program is to attach itself to a single event. In suc