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

v1.9 backports: maglev: Delete map if previous M's do not match #14424

Merged
merged 3 commits into from
Dec 17, 2020

Conversation

brb
Copy link
Member

@brb brb commented Dec 16, 2020

Once this PR is merged, you can update the PR labels via:

$ for pr in 14345; do contrib/backporting/set-labels.py $pr done 1.9; done

[ upstream commit ad16d0f ]

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>
[ upstream commit 762e8e2 ]

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>
[ upstream commit 8031a30 ]

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>
@brb brb added kind/backports This PR provides functionality previously merged into master. backport/1.9 labels Dec 16, 2020
@brb brb requested a review from a team as a code owner December 16, 2020 07:30
@brb
Copy link
Member Author

brb commented Dec 16, 2020

test-backport-1.9

@aanm aanm merged commit 38d1f62 into v1.9 Dec 17, 2020
@aanm aanm deleted the pr/v1.9-backport-maglev-resize branch December 17, 2020 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/backports This PR provides functionality previously merged into master.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants