solo-io / bumblebee

Get eBPF programs running from the cloud to the kernel in 1 line of bash
Apache License 2.0
1.26k stars 78 forks source link

Add support for user space control (custom user space programs or passing data from user space to kernel bpf #68

Open srampal opened 2 years ago

srampal commented 2 years ago

Version

0.0.10

Linux Version

5.13.0-28-generic

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

Bumblebee currently does not allow the user any control on the user space program and only allows writing of some kernel programs. It would be very useful to allow some user space level control.

This could range from (1) Generate a user space stub program that goes with the kernel program generated and shares the bpf map struct definitions etc (2) Document any safe workarounds until then such as using the bpftools utility directly to interface with Bee's kernel space program. Document any race scenarios/ concurrency issues that developers may need to be aware of, or use of bpf maps vs global variables etc.

Basic use case example might be setting up network filters in the data plane based on user configured filter/ policy keys.

Describe alternatives you've considered

No response

Additional Context

No response

EItanya commented 2 years ago

Hello, this is very interesting, and definitely something we've been thinking about. The issue is that bumblebee is fundamentally meant to abstract the plumbing of eBPF programs from the user. Also, the OCI images cannot easily run user space code as that falls in the realm of a traditional docker container. The only way to run user space code would be to add some kind of user space plugin system. I have been thinking about this myself, and was thinking about experimenting with WASM.