-
Notifications
You must be signed in to change notification settings - Fork 77
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
Change map convention (prefix to name instead of suffix to section) + Update to latest Cilium #103
Conversation
This removes the issue with having non standard section names for the maps
…to its sectionname
Waiting for approval from someone in the solo-io org to start testing. |
25c20eb
to
860d293
Compare
Hello @burak-ok! Thanks so much for the PR! As this is a breaking change, it will be important to message this in the release notes when we release this. We will do it as 0.1.x to make it as clear as possible. |
860d293
to
e657773
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes LGTM, would like to give @lgadban and @krisztianfekete a chance to review as well!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one nit. Love this change. Having the nonstandard map section name was previously not great when trying to use the BPF program with other tooling. Thanks so much for the contribution!
The old way of saving the (non public) BTF struct is not needed anymore Co-authored-by: Alban Crequy <albancrequy@linux.microsoft.com>
e657773
to
441b2e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the PR, @burak-ok! My only "concern" is that this way the names of the Prometheus metrics will sound a bit unusual due to including the metric type explicitly, but don't really have a better idea.
BREAKING CHANGE
This PR has 2 parts
1. Change scheme for output maps
Instead of specifying the output type in the section name (
events SEC(".maps.print");
) this PR relies on the name of the map itself (print_events SEC(".maps");
). This keep the section names aligned with alleBPF
programs and the magic is now about the prefix of the name.This also has the advantage that one doesn't have to make changes to
cilium/ebpf
A disadvantage is that changing the output type of a map is now more annoying. One has to change the name and all of its occurrences. Before that the change only involved the section name.
2. Update
cilium/ebpf
to latestSome further changes are needed to update
cilium/ebpf
to its latest version. BTF information are now available. (In the used version one had to move the packages to a public one)Generics are now required and therefore Go was update to
1.18
Misc
I tried to separate the commits into logical chunks. I think this way it is easier to review. Rebasing and squashing can be done of course before merging.
Regarding using a prefix/suffix for the name: I prefer having a suffix to instantly see what that map is about