summaryrefslogtreecommitdiff
path: root/samples/bpf/test_cgrp2_array_pin.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-12-02 02:28:23 +0300
committerAlexei Starovoitov <ast@kernel.org>2021-12-03 02:23:40 +0300
commitc58f9815ba9735752d3735efb915e8878604684b (patch)
tree4af974bfbf16a9cf5739729d06f4621f5eccb927 /samples/bpf/test_cgrp2_array_pin.c
parent527024f7aeb683ce7ef49b07ef7ce9ecf015288d (diff)
downloadlinux-c58f9815ba9735752d3735efb915e8878604684b.tar.xz
samples/bpf: Get rid of deprecated libbpf API uses
Replace deprecated APIs with new ones. Also mute source code using deprecated AF_XDP (xsk.h). Figuring out what to do with all the AF_XDP stuff is a separate problem that should be solved with its own set of changes. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20211201232824.3166325-9-andrii@kernel.org
Diffstat (limited to 'samples/bpf/test_cgrp2_array_pin.c')
-rw-r--r--samples/bpf/test_cgrp2_array_pin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/bpf/test_cgrp2_array_pin.c b/samples/bpf/test_cgrp2_array_pin.c
index 6d564aa75447..05e88aa63009 100644
--- a/samples/bpf/test_cgrp2_array_pin.c
+++ b/samples/bpf/test_cgrp2_array_pin.c
@@ -64,9 +64,9 @@ int main(int argc, char **argv)
}
if (create_array) {
- array_fd = bpf_create_map(BPF_MAP_TYPE_CGROUP_ARRAY,
+ array_fd = bpf_map_create(BPF_MAP_TYPE_CGROUP_ARRAY, NULL,
sizeof(uint32_t), sizeof(uint32_t),
- 1, 0);
+ 1, NULL);
if (array_fd < 0) {
fprintf(stderr,
"bpf_create_map(BPF_MAP_TYPE_CGROUP_ARRAY,...): %s(%d)\n",