Re: [RFC] bpf: Suggestion on bpf syscall interface

From: Alexei Starovoitov
Date: Mon Mar 30 2015 - 23:23:37 EST


On 3/29/15 8:13 PM, He Kuang wrote:

By using current bpf syscalls, we should keep the program which
attaches bpf programs running background, use it or some other
processes communicate with it to adjust maps parameters, like
sample rate for sys_write.

You can do all of the above by passing fds between processes. I still
don't see a need for sysfs.

In current implementation, we have to use a large and relative
heavy daemon to deal with loading, configuration, adjusting and
unloading works together.

This daemon is actually small and simple.
Just take a look how Daniel did for tc:
http://patchwork.ozlabs.org/patch/456387/
In that example 3 programs are sharing maps and single bpf_agent
monitors maps. Note that tc loaded programs and exited while
agent keeps running. Very straightforward.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/