Support dumping data from a BPF ring buffer
bpftool map event_pipe dumps data from a perf ring. We don't have any equivalent yet for BPF ring buffers.
@qmonnet It would be a great UX improvement if it just shows an error that this operation is not supported for now instead of showing an empty map
You mean if trying bpftool map event_pipe id N with map of id N being a BPF ring buffer? I haven't tried it, but I would expect bpftool to display an error, given that we have the following in map_perf_ring.c:
if (map_info.type != BPF_MAP_TYPE_PERF_EVENT_ARRAY) {
p_err("map is not a perf event array");
goto err_close_map;
}
Or can you provide more details on what you've tried and observed?
@qmonnet I wasn't aware of event_pipe. I was directly trying to dump data using bpftool map dump id N (N being the BPF ring buffer)
OK I see, yes it would make sense to avoid displaying something empty in that case.