This group is locked. No changes can be made to the group while it is locked.
Date
1 - 2 of 2
Can multiple BPF programs use same per-cpu perf ring buffer?
Hayden Livingston
Imagine I have a per-cpu perf ring buffer for all my cpus.
Now I have two eBPF programs.
In both these eBPF programs I do bpf_update_elem(myFD, &cpunumberkey,
&fdOfCPUspecificBuffer, BPF_ANY)
Will this mean that multiple eBPF programs will be able to write their
data into a single buffer (of course associated with cpu).
This would be amazing if it is truly possible. It seems like it should
be possible.
I have not tried yet.
Now I have two eBPF programs.
In both these eBPF programs I do bpf_update_elem(myFD, &cpunumberkey,
&fdOfCPUspecificBuffer, BPF_ANY)
Will this mean that multiple eBPF programs will be able to write their
data into a single buffer (of course associated with cpu).
This would be amazing if it is truly possible. It seems like it should
be possible.
I have not tried yet.
Yonghong Song
On Sun, Feb 16, 2020 at 8:43 PM Hayden Livingston
<halivingston@...> wrote:
<halivingston@...> wrote:
Yes, you can do this.
Imagine I have a per-cpu perf ring buffer for all my cpus.
Now I have two eBPF programs.
In both these eBPF programs I do bpf_update_elem(myFD, &cpunumberkey,
&fdOfCPUspecificBuffer, BPF_ANY)
Will this mean that multiple eBPF programs will be able to write their
data into a single buffer (of course associated with cpu).
This would be amazing if it is truly possible. It seems like it should
be possible.
I have not tried yet.