-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
maglev: Delete map if previous M's do not match #14345
Conversation
test-me-please |
f646a2c
to
afcb86f
Compare
test-me-please |
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.
I would have expected that check to happen in cilium-map-migrate
since that's where we currently check for property mismatches. But given we want to favor an all-Golang codebase in the long term, it probably makes sense to implement this logic in Go 👍
LGTM!
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
@pchaigno It's being checked by https://github.com/cilium/cilium/blob/master/pkg/bpf/map_linux.go#L1129. However, as we are planning to migrate from |
Damn, we run the privileged tests on 4.9, and the map-in-map is not supported on that kernel. |
afcb86f
to
b56d670
Compare
It was reported by a user, that when the M param (--bpf-lb-maglev-table-size) changes, then the verifier is failing to load the program on the 5.4 kernel with the following error: invalid access to map value, value_size=32762 off=65520 size=2 R0 max value is outside of the array range processed 507 insns (limit 1000000) max_states_per_insn 1 total_states 34 peak_states 34 mark_read 17 Fix this by recreating the map when we detect that the M has changed. Reported-by: Han Zhou <hzhou8@ebay.com> Signed-off-by: Martynas Pumputis <m@lambda.lt>
22d4385
to
8c7fade
Compare
test-me-please |
8c7fade
to
d9afcd3
Compare
Move the GetKernelVersion() from pkg/datapath/linux to pkg/version so that it can be included by pkg/maps/lbmap which is included by pkg/datapath/linux. Otherwise, we have a circular dependency. Also, make the function to return an error instead of calling log.Fatal, as it's caller's responsibility to decide what to do with an error. Signed-off-by: Martynas Pumputis <m@lambda.lt>
Unfortunately, we run the privileged unit tests on the 4.9 kernel which does not have the map-in-map support. Therefore, add a skip based on the kernel version so that the CI does not fail. Signed-off-by: Martynas Pumputis <m@lambda.lt>
test-me-please |
retest-net-next |
net-next hit #12511. |
retest-net-next |
It was reported by a user, that when the M param
(
--bpf-lb-maglev-table-size
) changes, then the verifier is failing toload the program on the 5.4 kernel with the following error:
Fix this by recreating the map when we detect that the M has changed.
Fix: #14251
Reported-by: Han Zhou hzhou8@ebay.com