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

From: Alexei Starovoitov
Date: Sat Mar 28 2015 - 13:21:56 EST


On 3/28/15 4:36 AM, He Kuang wrote:
Hi, Alexei

In our end-end IO module project, we use bpf maps to record
configurations. According to current bpf syscall interface, we
should specify map_fd to lookup/update bpf maps, so we are
restricted to do config in the same user program.

you can pass map_fd and prog_fd from one process to another via normal
scm_rights mechanism.

My suggestion is to export this kind of operations to sysfs, so
we can load&attach bpf progs and config it seperately. We
implement this feature in our demo project. What's your opinion
on this?

Eventually we may use single sysfs file for lsmod-like listings, but I
definitely don't want to create parallel interface to maps via sysfs.
It's way too expensive and not really suitable for binary key/values.


--
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/