-
Notifications
You must be signed in to change notification settings - Fork 591
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
basic04-pinning-maps: correct solution for assignment 2? #125
Comments
Hmm, yeah, you're right that seems to be an oversight. However, libbpf has since introduced automatic re-use of pinned maps, so I guess we should switch this whole assignment over to explaining that. There are a couple of these kinds of tweaks, so taking a full pass through the tutorial and doing a few updates is really needed... It's on my list :) |
I'd be happy to help update the assignment to reflect that if it's welcome, with the caveat that I'm familiar with BPF but neither an XDP pro nor kernel dev :) I was looking around for any libbpf docs indicating that change or a patchset, any chance you have some reference material? If not, I can take a stab at it without. I found some tangential patchsets but not this diff yet. |
Hmm, only reference is this commit: libbpf/libbpf@e7d860d It requires BTF-defined maps, though, which we're not using in the tutorial either since that in turn depends on LLVM9. We haven't decided whether we're OK to depend on LLVM9 for the entire tutorial or if we should be splitting things based on version. So feel free to take a stab at defining something like this, but be prepared to move things around a bit if you do :) If you do want to try it, you'll also need an updated libbpf; see #126 |
Thanks so much for such an incredible resource!
I've been working through the assignments and I was trying to understand how the provided solution implements what the prompt requires for assignment 2.
I was expecting to remove the call to
bpf_object__unpin_maps
and replace it with something like https://github.com/xdp-project/xdp-tutorial/tree/master/basic04-pinning-maps#reusing-maps-with-libbpf inside the access check:The solution doesn't see to do this, it only seems to add a toggle to the CLI flags, am I missing something?
The text was updated successfully, but these errors were encountered: