Skip to content

datapath/loader: Add map count to verifier complexity records#44652

Merged
ti-mo merged 1 commit intomainfrom
pr/dylandreimerink/bpf-verifier-map-usage
Mar 11, 2026
Merged

datapath/loader: Add map count to verifier complexity records#44652
ti-mo merged 1 commit intomainfrom
pr/dylandreimerink/bpf-verifier-map-usage

Conversation

@dylandreimerink
Copy link
Copy Markdown
Member

@dylandreimerink dylandreimerink commented Mar 6, 2026

We use a lot of maps in Cilium. The kernel limits us to a max of 64 maps per program. We would like to track how many maps are used by our programs, and how close we are to that limit.

So for every permutation of our program we load during the complexity tests, we also query the kernel for the number of maps used by that program, and we add that to the complexity records.

Also updated the complexity diff tool to include map count in its output so its both in the JSON files as well as the human readable output.

Fixes: #44651

We use a lot of maps in Cilium. The kernel limits us to a max of
64 maps per program. We would like to track how many maps are used by
our programs, and how close we are to that limit.

So for every permutation of our program we load during the complexity
tests, we also query the kernel for the number of maps used by
that program, and we add that to the complexity records.

Also updated the complexity diff tool to include map count in its output
so its both in the JSON files as well as the human readable output.

Fixes: #44651

Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 6, 2026
@dylandreimerink dylandreimerink added the release-note/ci This PR makes changes to the CI. label Mar 6, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 6, 2026
@dylandreimerink
Copy link
Copy Markdown
Member Author

/ci-verifier

@dylandreimerink
Copy link
Copy Markdown
Member Author

/test

@dylandreimerink dylandreimerink marked this pull request as ready for review March 9, 2026 14:09
@dylandreimerink dylandreimerink requested a review from a team as a code owner March 9, 2026 14:09
@dylandreimerink dylandreimerink requested a review from ti-mo March 9, 2026 14:09
@ti-mo ti-mo added this pull request to the merge queue Mar 11, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 11, 2026
Merged via the queue into main with commit 0f8f342 Mar 11, 2026
701 of 710 checks passed
@ti-mo ti-mo deleted the pr/dylandreimerink/bpf-verifier-map-usage branch March 11, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track amount of maps in use in complexity workflow

3 participants