bpf: add new map ops ->map_mem_usage
authorYafang Shao <laoar.shao@gmail.com>
Sun, 5 Mar 2023 12:45:58 +0000 (12:45 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 7 Mar 2023 17:33:41 +0000 (09:33 -0800)
commit90a5527d7686d3ebe0dd2a831356a6c7d7dc31bc
tree37f414130d1410aa9020d189bfbffdd24d0e52a2
parent2d5bcdcda8799cf21f9ab84598c946dd320207a2
bpf: add new map ops ->map_mem_usage

Add a new map ops ->map_mem_usage to print the memory usage of a
bpf map.

This is a preparation for the followup change.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://lore.kernel.org/r/20230305124615.12358-2-laoar.shao@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf.h
kernel/bpf/syscall.c