]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bpf: offload map memory usage
authorYafang Shao <laoar.shao@gmail.com>
Sun, 5 Mar 2023 12:46:14 +0000 (12:46 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 7 Mar 2023 17:33:43 +0000 (09:33 -0800)
commit9629363cd05642fe43aded44938adec067ad1da3
treea539fb65397d42388846a5f4691e6a15091f36e3
parentb4fd0d672bca001632d7291b5b162b08e065b815
bpf: offload map memory usage

A new helper is introduced to calculate offload map memory usage. But
currently the memory dynamically allocated in netdev dev_ops, like
nsim_map_update_elem, is not counted. Let's just put it aside now.

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