Re: Accessing pinned eBPF map from the kernel
Yonghong Song
On Thu, Jul 19, 2018 at 2:49 PM, Hyunseok <hyunseok@...> wrote:
Thanks for your reply.No. The example uses a locally-created map to illustrate the process, but a pinned map works in a similar way. The user space application: . using bpf_obj_get to get a FD for the pinned map. . create TableDesc with the FD. . Add TableDesc to the local_ts. . Create a BPF object with the local_ts. . ... In the bpf program itself, declare the pinned map with "extern" type. Just follow the above process, it should work. Facebook has used the same mechanism for a while to access externally-pinned maps. bpf_obj_get() intends to be used in userspace, not kernel.
|
|