Skip to content
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

Add ebpf_version() #4137

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

Add ebpf_version() #4137

wants to merge 1 commit into from

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Jan 14, 2025

Export a function which allows retrieving the version string of the runtime. ebpf-go uses this information in its own testsuite to be able to assert that certain features are working given the necessary minimum version.

Export a function which allows retrieving the version string of the
runtime. ebpf-go uses this information in its own testsuite to be
able to assert that certain features are working given the necessary
minimum version.
@dthaler
Copy link
Collaborator

dthaler commented Jan 14, 2025

Since you named it ebpf_version(), I take it there isn't an equivalent on Linux that needs to be matched in prototype?

Assuming not, the usual guidance on Windows is not to use the version number to check that specific features are available, but rather to use an api that tells specifically whether those features are available or not. That accounts for things like different SKUs that vary by feature (e.g., is JIT enabled or not isn't something that you can tell by a version check), and feature deprecation/removal in later versions. What specific features are you checking?

@saxena-anurag
Copy link
Contributor

should this query the version from the runtime instead (i.e. from ebpfcore)?

@dthaler
Copy link
Collaborator

dthaler commented Jan 16, 2025

should this query the version from the runtime instead (i.e. from ebpfcore)?

Don't we already verify that ebpfapi matches ebpfcore at runtime? if so, this may be sufficient.

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.

3 participants