aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/slab.c
diff options
context:
space:
mode:
authorGravatar Kui-Feng Lee <thinker.li@gmail.com> 2024-02-28 22:45:20 -0800
committerGravatar Andrii Nakryiko <andrii@kernel.org> 2024-02-29 14:23:52 -0800
commit69e4a9d2b3f5adf5af4feeab0a9f505da971265a (patch)
tree0b044a41286a8648b98c65ca50b1ccb20b9dadb9 /tools/lib/slab.c
parentlibbpf: Set btf_value_type_id of struct bpf_map for struct_ops. (diff)
downloadlinux-69e4a9d2b3f5adf5af4feeab0a9f505da971265a.tar.gz
linux-69e4a9d2b3f5adf5af4feeab0a9f505da971265a.tar.bz2
linux-69e4a9d2b3f5adf5af4feeab0a9f505da971265a.zip
libbpf: Convert st_ops->data to shadow type.
Convert st_ops->data to the shadow type of the struct_ops map. The shadow type of a struct_ops type is a variant of the original struct type providing a way to access/change the values in the maps of the struct_ops type. bpf_map__initial_value() will return st_ops->data for struct_ops types. The skeleton is going to use it as the pointer to the shadow type of the original struct type. One of the main differences between the original struct type and the shadow type is that all function pointers of the shadow type are converted to pointers of struct bpf_program. Users can replace these bpf_program pointers with other BPF programs. The st_ops->progs[] will be updated before updating the value of a map to reflect the changes made by users. Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20240229064523.2091270-3-thinker.li@gmail.com
Diffstat (limited to 'tools/lib/slab.c')
0 files changed, 0 insertions, 0 deletions