On Fri, Feb 16, 2018 at 11:19 PM, Fulvio Risso <[email protected]> wrote: > > > On 17/02/2018 08:02, Y Song via iovisor-dev wrote: >> >> On Fri, Feb 16, 2018 at 7:59 AM, Francesco Picciariello via >> iovisor-dev <[email protected]> wrote: >>> >>> Hello all, >>> Is there a way to receive asynchronous notification each time an eBPF map >>> is >>> modified? >> >> >> 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. > > > When you say "you" means "the dataplane program"?
Yes. > In other words, the dataplane must be collaborative and send a notification > to userspace when the map has been modified? Yes. Not just notification, may be actual data or part of actual data, or aggregated data if modification is too frequent. > > Thanks, > > fulvio > >> >>> >>> 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 >>> object. >> >> >> 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. >> >>> >>> Regards. >>> >>> _______________________________________________ >>> iovisor-dev mailing list >>> [email protected] >>> https://lists.iovisor.org/mailman/listinfo/iovisor-dev >>> >> _______________________________________________ >> iovisor-dev mailing list >> [email protected] >> https://lists.iovisor.org/mailman/listinfo/iovisor-dev >> > _______________________________________________ iovisor-dev mailing list [email protected] https://lists.iovisor.org/mailman/listinfo/iovisor-dev
