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

tools: Add libbpf tag gen tool #70

Merged
merged 4 commits into from
Oct 15, 2024
Merged

Conversation

dylandreimerink
Copy link
Collaborator

The PR adds a new tool to generate Libbpf version tags for userspace API functions. To prove it works, this PR also adds a few pages. Stumbled across a spellcheck usage issue while running it on the new pages and fixed it. And while running the make generate-docs we got some helper function updates which I decided to also commit while at it.

This commit adds a tool that parses the libbpf.map file in the libbpf
sources, then finds specific annotations in libbpf userspace pages
and inserts the version tags for the functions in question.

Signed-off-by: Dylan Reimerink <[email protected]>
This commit adds pages for the libbpf_{major_version, minor_version,
strerror} functions. These are simple functions, pages were added to
prove the libbpf-tag-gen tool works as expected.

Signed-off-by: Dylan Reimerink <[email protected]>
The spellcheck will output its best guess for the location of misspelled
words in the markdown files. This is useful for the user to quickly find
and fix the misspelled words. However, the output also includes the
project root, which is likely different for every system including the
host vs in a docker container. By removing the project root from the
output, we get a relative path which most terminals can use to open the
file as long as the working directory is the project root.

Signed-off-by: Dylan Reimerink <[email protected]>
A few helper functions have been updated with a new `__bpf_fastcall`
attribute. This commit updates the helper function signatures to reflect
this change in the libbpf headers.

Signed-off-by: Dylan Reimerink <[email protected]>
@dylandreimerink dylandreimerink merged commit bc0bc07 into master Oct 15, 2024
1 check passed
@dylandreimerink dylandreimerink deleted the feature/libbpf-tag-gen-tool branch November 18, 2024 16:33
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.

1 participant