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

Preparatory refactoring for dynamic BPF map sizing #10957

Merged
merged 3 commits into from Apr 14, 2020

Conversation

tklauser
Copy link
Member

Some preparatory refactoring before the next iteration of #10780.

This moves the checking of the map size limits to its own, testable function and adds accompanying tests.

Reviewable by commit.

Preparatory refactoring to move map size clamping into a separate
function.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
@tklauser tklauser added pending-review kind/cleanup This includes no functional changes. release-note/misc This PR makes changes that have no direct user impact. labels Apr 14, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot added this to In progress in 1.8.0 Apr 14, 2020
@tklauser
Copy link
Member Author

test-me-please

@tklauser tklauser requested review from a team April 14, 2020 08:48
This matches the other map entry size vars and also avoids confusion
with the const PolicyMapMax used for upper bound policy map size.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Refactoring in preparation for introducing dynamic map sizes. Also add
some tests.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
@tklauser tklauser force-pushed the pr/tklauser/bpf-map-prep-refactoring branch from bd900fe to 8691c47 Compare April 14, 2020 09:11
@tklauser
Copy link
Member Author

tklauser commented Apr 14, 2020

test-me-please

EDIT: failure looks like #10942 https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/18720/

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 46.606% when pulling 8691c47 on pr/tklauser/bpf-map-prep-refactoring into afc48b7 on master.

@tklauser
Copy link
Member Author

restart-ginkgo

@vadorovsky vadorovsky merged commit 6f98435 into master Apr 14, 2020
1.8.0 automation moved this from In progress to Merged Apr 14, 2020
@vadorovsky vadorovsky deleted the pr/tklauser/bpf-map-prep-refactoring branch April 14, 2020 21:50
@joestringer
Copy link
Member

joestringer commented Mar 1, 2022

@tklauser Why are these limits enforced? The underlying maps support __u32 map size.

@tklauser
Copy link
Member Author

tklauser commented Mar 2, 2022

@tklauser Why are these limits enforced? The underlying maps support __u32 map size.

@joestringer you mean the upper limits on map sizes? I'm not sure (or can't remember) to be honest. AFAIR, these were defined already before the refactoring and I just refactored the code so the limits could be tested.

@joestringer
Copy link
Member

Ah I see, sorry for the noise. I traced back the variable but didn't look so closely at the PR. I guess it's just always been a restriction like that. Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup This includes no functional changes. release-note/misc This PR makes changes that have no direct user impact.
Projects
No open projects
1.8.0
  
Merged
Development

Successfully merging this pull request may close these issues.

None yet

6 participants