diff options
author | Andrii Nakryiko | 2021-12-01 15:28:23 -0800 |
---|---|---|
committer | Alexei Starovoitov | 2021-12-02 15:23:40 -0800 |
commit | c58f9815ba9735752d3735efb915e8878604684b (patch) | |
tree | 4af974bfbf16a9cf5739729d06f4621f5eccb927 /samples/bpf/test_cgrp2_array_pin.c | |
parent | 527024f7aeb683ce7ef49b07ef7ce9ecf015288d (diff) |
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.c | 4 |
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", |