diff options
author | Toke Høiland-Jørgensen <toke@redhat.com> | 2019-11-09 21:37:32 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-11-11 04:26:30 +0100 |
commit | 1a734efe06948c17122808f74f0c8cc550c10cf5 (patch) | |
tree | 051f5faf97bf712570b11f65b035a812daab7703 /tools/lib/bpf/libbpf.map | |
parent | libbpf: Add bpf_get_link_xdp_info() function to get more XDP information (diff) | |
download | linux-1a734efe06948c17122808f74f0c8cc550c10cf5.tar.xz linux-1a734efe06948c17122808f74f0c8cc550c10cf5.zip |
libbpf: Add getter for program size
This adds a new getter for the BPF program size (in bytes). This is useful
for a caller that is trying to predict how much memory will be locked by
loading a BPF object into the kernel.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/157333185272.88376.10996937115395724683.stgit@toke.dk
Diffstat (limited to 'tools/lib/bpf/libbpf.map')
-rw-r--r-- | tools/lib/bpf/libbpf.map | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map index d1a782a3a58d..9f39ee06b2d4 100644 --- a/tools/lib/bpf/libbpf.map +++ b/tools/lib/bpf/libbpf.map @@ -203,4 +203,5 @@ LIBBPF_0.0.6 { bpf_program__get_type; bpf_program__is_tracing; bpf_program__set_tracing; + bpf_program__size; } LIBBPF_0.0.5; |