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

Change map convention (prefix to name instead of suffix to section) + Update to latest Cilium #103

Merged
merged 7 commits into from
Jun 16, 2023

Conversation

burak-ok
Copy link
Contributor

@burak-ok burak-ok commented May 3, 2023

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 all eBPF 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 latest

Some 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

@solo-build-bot
Copy link

solo-build-bot bot commented May 3, 2023

Waiting for approval from someone in the solo-io org to start testing.

@burak-ok burak-ok force-pushed the burak/update_cilium branch from 25c20eb to 860d293 Compare May 3, 2023 15:20
@EItanya
Copy link
Member

EItanya commented May 3, 2023

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.

@burak-ok burak-ok force-pushed the burak/update_cilium branch from 860d293 to e657773 Compare May 4, 2023 09:18
Copy link
Member

@EItanya EItanya left a 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!

Copy link
Contributor

@SirNexus SirNexus left a 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!

docs/concepts.md Outdated Show resolved Hide resolved
burak-ok and others added 3 commits May 24, 2023 17:55
The old way of saving the (non public) BTF struct is not needed anymore

Co-authored-by: Alban Crequy <albancrequy@linux.microsoft.com>
@burak-ok burak-ok force-pushed the burak/update_cilium branch from e657773 to 441b2e6 Compare May 24, 2023 15:56
Copy link
Member

@krisztianfekete krisztianfekete left a 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.

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.

4 participants