Re: Notification when an eBPF map is modified

Yonghong Song

On Fri, Feb 16, 2018 at 7:59 AM, Francesco Picciariello via
iovisor-dev <iovisor-dev@...> wrote:
Hello all,
Is there a way to receive asynchronous notification each time an eBPF map is
When map is modified in kernel, you can send something into a ring buffer
and userspace can poll on this ring buffer to get notification.

I used bpf_obj_pin() in order to save a specific map on filesystem, and I
called linux inotify() on the pinned object.

The inotify API provides a mechanism for monitoring filesystem events, and
the goal is to notice when a pinned eBPF map is modified, but it seems
inotify() does not work properly with bpf filesystem. In fact it's able to
detect the creation and the deletion, but not the modification of the pinned
The inotify takes vfs_read/write for read/write operations.
Here bpf map read/write happens inside
bpf program, or through bpf syscall, and hence inotify mechanism won't work.


iovisor-dev mailing list

Join to automatically receive all group messages.