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

Add docs on map sharing to reference #1760

Open
bobrik opened this issue May 15, 2018 · 1 comment
Open

Add docs on map sharing to reference #1760

bobrik opened this issue May 15, 2018 · 1 comment

Comments

@bobrik
Copy link
Contributor

bobrik commented May 15, 2018

A while ago in #66 / #309 @drzaeus77 added support for sharing maps between programs.

Currently it's not mentioned in the reference:

This makes it a bit harder to figure out how to make this work.

@yonghong-song
Copy link
Collaborator

@bobrik bcc does provide a way to share maps between different BPF modules(files) in the same process. See test_clang.py test test_exported_maps (https://github.com/iovisor/bcc/blob/master/tests/python/test_clang.py#L428).

bcc also supports to share maps between different processes (though map pinning): https://github.com/iovisor/bcc/blob/master/examples/cpp/UseExternalMap.cc
the example creates a map locally in the process and incorporates it into the BPF module.
The map itself could be a pinned map shared by different processes.

Want to study these examples and help improve our documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants