This PR adds support for loading BPF programs via load_func, which is used in BPF tail-calls programs. See the commits' messages for more context on this and when it is useful. It also adds support to select the very handy BCC debug level.
We add the bitflags crate to have a nicer way of dealing with the debug flags, and modify one of the error codes to be cleaner, and add expose BpfProgType in the crate's root.
We could migrate the current log_level and other calls that take a debug / log level, to the more type-safe BccDebug in another PR :smile:
Test plan
Added some more smoke tests for these new features, and ran them with Vagrind. Also tried this new feature in a project I am currently porting from a Python BCC driver.
This PR adds support for loading BPF programs via
load_func
, which is used in BPF tail-calls programs. See the commits' messages for more context on this and when it is useful. It also adds support to select the very handy BCC debug level.We add the
bitflags
crate to have a nicer way of dealing with the debug flags, and modify one of the error codes to be cleaner, and add exposeBpfProgType
in the crate's root.We could migrate the current
log_level
and other calls that take a debug / log level, to the more type-safeBccDebug
in another PR :smile:Test plan
Added some more smoke tests for these new features, and ran them with Vagrind. Also tried this new feature in a project I am currently porting from a Python BCC driver.