Skip to content

n-acd: runtime eBPF support detection #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jvaclav-rh
Copy link

Currently, eBPF support is toggled by a compile-time flag based on whether we expect the system to support it or not.

This PR makes it so that n-acd always attempts to use eBPF, and gracefully handles failure if it isn't supported (e.g. due to lacking capabilities).

This change is desirable for programs that would like to use n-acd with eBPF as often as possible, but expect that eBPF setup may fail (and are OK with falling back).

Currently, eBPF support is toggled by a compile-time flag
based on whether we expect the system to support it or not.

Make it so that n-acd always attempts to use eBPF, and gracefully
handles failure if it isn't supported (e.g. due to lacking capabilities).
@dvdhrm
Copy link
Member

dvdhrm commented Sep 10, 2024

Hi, thanks for the suggestion! Can you explain who would use it? Distros know their kernel versions, so they can easily require a kernel with eBPF. Who would build n-acd without knowing their kernel version?

@jvaclav-rh
Copy link
Author

jvaclav-rh commented Sep 11, 2024

Can you explain who would use it? Distros know their kernel versions, so they can easily require a kernel with eBPF. Who would build n-acd without knowing their kernel version?

It is not so much about whether the kernel supports eBPF but also about if the application has capabilities to use it at runtime. For example it would be very useful for NetworkManager if it is e.g. running in a container.

edit: I also just noticed an older pull request (#9) that had some discussion related to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants