Add support for shared tables (#1988)
authorMauricio Vásquez <mauriciovasquezbernal@gmail.com>
Fri, 28 Sep 2018 15:40:49 +0000 (10:40 -0500)
committeryonghong-song <ys114321@gmail.com>
Fri, 28 Sep 2018 15:40:49 +0000 (08:40 -0700)
commit54e377d29b1e09968b8278c039fc3e146da9d962
tree15c460e2182140d02d8f235d61675b8bebd27f5d
parentf138fea5a9ab279b7347fa6acfd2f53777068b27
Add support for shared tables (#1988)

Currently tables can be created in two modes:
1. private to the ebpf program
2. shared among all the ebpf programs created by the same user-space
process

This commit extends bcc allowing to create a table that is shared among
a set of specific ebpf programs.
This is useful when creating network functions that are composed
by more than 1 ebpf program, a map is shared among all the programs of
the network function but isolated from different instances of that
function.

Signed-off-by: Mauricio Vasquez B <mauricio.vasquez@polito.it>
14 files changed:
src/cc/api/BPF.h
src/cc/bpf_module.cc
src/cc/bpf_module.h
src/cc/export/helpers.h
src/cc/frontends/b/codegen_llvm.cc
src/cc/frontends/b/codegen_llvm.h
src/cc/frontends/b/loader.cc
src/cc/frontends/b/loader.h
src/cc/frontends/clang/b_frontend_action.cc
src/cc/frontends/clang/b_frontend_action.h
src/cc/frontends/clang/loader.cc
src/cc/frontends/clang/loader.h
tests/cc/CMakeLists.txt
tests/cc/test_shared_table.cc [new file with mode: 0644]