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.13] bpf: fix error handling for invoke_tailcall_if() #26497

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

julianwiedmann
Copy link
Member

@julianwiedmann julianwiedmann commented Jun 27, 2023

Manual backport for

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

for pr in 26118; do contrib/backporting/set-labels.py $pr done 1.13; done

or with

make add-labels BRANCH=v1.13 ISSUES=26118

[ upstream commit 0191c5d ]

invoke_tailcall_if() either inlines the target function, or calls it via
tail-call. In the inline variant, the `return` causes us to skip over any
subsequent error handling (eg drop notification) in the caller.

Rework the macro so that it properly assigns the `ret` value.

Suggested-by: Anton Protopopov <aspsk@isovalent.com>
Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
[ upstream commit fb48741 ]

If the invoked function is inlined, it can return error that we need to
handle. If the function is tail-called, we still need to handle the
DROP_MISSED_TAIL_CALL.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
@julianwiedmann julianwiedmann added kind/backports This PR provides functionality previously merged into master. backport/1.13 This PR represents a backport for Cilium 1.13.x of a PR that was merged to main. labels Jun 27, 2023
@julianwiedmann
Copy link
Member Author

/test-backport-1.13

@julianwiedmann julianwiedmann marked this pull request as ready for review June 27, 2023 10:53
@julianwiedmann julianwiedmann requested a review from a team as a code owner June 27, 2023 10:53
@julianwiedmann julianwiedmann added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jun 27, 2023
@borkmann borkmann merged commit 42bad72 into cilium:v1.13 Jun 29, 2023
62 checks passed
@julianwiedmann julianwiedmann deleted the v1.13-invoke-tailcall-if branch June 29, 2023 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.13 This PR represents a backport for Cilium 1.13.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants