-
Notifications
You must be signed in to change notification settings - Fork 286
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
Add atomic replacement of XDP progs and multihoming of Extension progs #282
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for aya-rs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
dave-tucker
added
feature
A PR that implements a new feature or enhancement
aya
This is about aya (userspace)
labels
May 24, 2022
dave-tucker
force-pushed
the
bpfd
branch
2 times, most recently
from
June 17, 2022 22:56
0785971
to
71813df
Compare
dave-tucker
force-pushed
the
bpfd
branch
3 times, most recently
from
June 19, 2022 17:33
e124798
to
4932340
Compare
alessandrod
requested changes
Jun 25, 2022
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.
This is looking great now! See comments
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This removes the ProgramFd trait with a struct that wraps a RawFd. Program::fd() has been implemented as well as fd() for each Program Type. This allows for a better API than requiring the use of the ProgramFd trait. Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This allows for Extension programs already loaded to the kernel to be attached to another program that is BTF-compatible with the one provided at `load()` time Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
@alessandrod comments addressed 👍 |
alessandrod
approved these changes
Jun 25, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds:
bpf_link_update
Xdp::attach_to_link
- which allows for atomic replacement of XDP programsExtension::attach_to_program
- which allows for an Extension program to be attached to a program other than the one provided atload()
- which is required as the verifier needs to know where it will be attached. The program/function should be BTF compatible or the call will fail.These changes are collected together to enable the following use case in
bpfd
Xdp
dispatcher program to an interface with anXdp
program loaded as anExtension
tofunc1
.func2
Xdp
dispatcher program.func1
- it is now attached to the old and new dispatcher simultaneously.func2
Xdp::attach_to_link
to perform atomic replacement of the dispatcher programs