diff options
| author | Andrii Nakryiko <[email protected]> | 2021-11-24 19:32:33 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2021-11-25 22:37:38 +0000 |
| commit | 2fe256a429cb6c0b0064563af4158470143a363c (patch) | |
| tree | 59fc62a6e425abbf850165d17b62b5e4d84b6414 /tools/testing/selftests/bpf/prog_tests/sockmap_basic.c | |
| parent | libbpf: Prevent deprecation warnings in xsk.c (diff) | |
| download | kernel-2fe256a429cb6c0b0064563af4158470143a363c.tar.gz kernel-2fe256a429cb6c0b0064563af4158470143a363c.zip | |
selftests/bpf: Migrate selftests to bpf_map_create()
Conversion is straightforward for most cases. In few cases tests are
using mutable map_flags and attribute structs, but bpf_map_create_opts
can be used in the similar fashion, so there were no problems. Just lots
of repetitive conversions.
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/sockmap_basic.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/sockmap_basic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c b/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c index 1352ec104149..85db0f4cdd95 100644 --- a/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c @@ -91,9 +91,9 @@ static void test_sockmap_create_update_free(enum bpf_map_type map_type) if (CHECK_FAIL(s < 0)) return; - map = bpf_create_map(map_type, sizeof(int), sizeof(int), 1, 0); + map = bpf_map_create(map_type, NULL, sizeof(int), sizeof(int), 1, NULL); if (CHECK_FAIL(map < 0)) { - perror("bpf_create_map"); + perror("bpf_cmap_create"); goto out; } |
