-
Notifications
You must be signed in to change notification settings - Fork 648
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
Upstream cilium GetMapInfo #5
Comments
@joestringer do you think you could take a stab at this? |
Sure, it's all just a matter of finding the time ;) |
And |
That's what LoadPinned(Map|Program) use right now. This issue is about adding a fall back for older kernels that don't have the function. |
Got it. |
@whl739 Does |
@joestringer you are right, these APIs are enough if i only want to get the map/prog. |
You can use https://godoc.org/github.com/cilium/ebpf#Map.ABI to access some of the information from the syscalls. Please create a separate issue explaining what you want to achieve if that isn't enough for your use case. |
Thanks for your kind help. I'll create a new issue. |
Fall back to reading /proc/self/*/fdinfo if BPF_OBJ_GET_INFO_BY_FD is not available on the current kernel. This should give us compatibility to at least 4.9. Fixes #5
Fall back to reading /proc/self/*/fdinfo if BPF_OBJ_GET_INFO_BY_FD is not available on the current kernel. This should give us compatibility to at least 4.9. Fixes #5
Fall back to reading /proc/self/*/fdinfo if BPF_OBJ_GET_INFO_BY_FD is not available on the current kernel. This should give us compatibility to at least 4.9. Fixes #5
Fall back to reading /proc/self/*/fdinfo if BPF_OBJ_GET_INFO_BY_FD is not available on the current kernel. This should give us compatibility to at least 4.9. Fixes #5
Fall back to reading /proc/self/*/fdinfo if BPF_OBJ_GET_INFO_BY_FD is not available on the current kernel. This should give us compatibility to at least 4.9. Fixes #5
Fall back to reading /proc/self/*/fdinfo if BPF_OBJ_GET_INFO_BY_FD is not available on the current kernel. This should give us compatibility to at least 4.9. Fixes #5
Fall back to reading /proc/self/*/fdinfo if BPF_OBJ_GET_INFO_BY_FD is not available on the current kernel. This should give us compatibility to at least 4.9. Fixes #5
Cilium has a cool function that parses map attributes from
/proc
: https://github.com/cilium/cilium/blob/12fe19d26afd005aa0e0e4c312f81b52af919b82/pkg/bpf/map_linux.go#L282We should incorporate this into LoadPinnedMap, to make it work on kernels < 4.14.
The text was updated successfully, but these errors were encountered: