Thread (4 messages) flat view 4 messages, 2 authors, 2015-10-20

Re: [PATCH V4 1/1] bpf: control events stored in PERF_EVENT_ARRAY maps trace data output when perf sampling

From: Alexei Starovoitov <hidden>
Date: 2015-10-20 02:14:10
Also in: lkml

On 10/19/15 3:37 AM, Kaixu Xia wrote:
+/* flags for PERF_EVENT_ARRAY maps*/
+enum {
+	BPF_EVENT_CTL_BIT_CUR = 0,
+	BPF_EVENT_CTL_BIT_ALL = 1,
+	__NR_BPF_EVENT_CTL_BITS,
+};
+
+#define	BPF_CTL_BIT_FLAG_MASK \
+	((1ULL << __NR_BPF_EVENT_CTL_BITS) - 1)
+#define	BPF_CTL_BIT_DUMP_CUR \
+	(1ULL << BPF_EVENT_CTL_BIT_CUR)
+#define	BPF_CTL_BIT_DUMP_ALL \
+	(1ULL << BPF_EVENT_CTL_BIT_ALL)
+
the above shouldn't be part of uapi header. It can stay in bpf_trace.c
Just document these bits next to helper similar to skb_store_bytes()

The rest looks ok.
It still needs an ack from Peter for perf_event bits
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help