This PR enables to define external maps when using bpftime as a library. User can register a bpftime_map_ops with a given map types, and allow new bpf map types to work.
This PR also:
Move some map helper functions from include to src because they are not supposed to be external API;
change the name from_userspace to from_syscall to avoid misunderstanding.
I think it would be better if we can use map_ops for all built-in map types in the future. This can help simplify the code.
Type of change
[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Description
This PR enables to define external maps when using bpftime as a library. User can register a bpftime_map_ops with a given map types, and allow new bpf map types to work.
This PR also:
include
tosrc
because they are not supposed to be external API;from_userspace
tofrom_syscall
to avoid misunderstanding.I think it would be better if we can use
map_ops
for all built-in map types in the future. This can help simplify the code.Type of change