Thanks. I will follow up with Francesco and Sebastiano.


On 2/22/18 1:58 AM, Fulvio Risso wrote:
this looks very similar to Francesco's request here:

FYI, Francesco and Sebastiano are currently working on a patch to enable this feature. You can get in touch directly with them.


On 21/02/2018 17:49, Alvarez, Pablo via iovisor-dev wrote:
Dear devs,

Is there a way to poll() or select() or otherwise not-busy-wait on a bpf map in userspace? I would like to react quickly to new data coming into the map from my bpf program withoug consuming too many resources.

I ran an experiment using the map fd and poll(), and found that the revents field always returned with POLLIN set, whether there was new data in the map or not. This makes a certain sense, since one never calls read() on the map to clear the field, but is not particularly useful.

The question applies both to
- a tc cls map added with "tc filter add dev eth0 egress bpf da obj clsact_get_packet.o sec getpacket" - a map accessed from a bpf program inserted into a TCP socket (with load_bpf_file() and setsockopt(sockfd, SOL_SOCKET, SO_ATTACH_BPF, prog_fd,       sizeof(prog_fd[0])).

If not, is there another way to get a bpf program to signal up to userspace that something has happened?


Pablo Alvarez

iovisor-dev mailing list

iovisor-dev mailing list

Reply via email to