diff options
author | 2021-11-24 11:32:33 -0800 | |
---|---|---|
committer | 2021-11-25 23:37:38 +0100 | |
commit | 2fe256a429cb6c0b0064563af4158470143a363c (patch) | |
tree | 59fc62a6e425abbf850165d17b62b5e4d84b6414 /tools/testing/selftests/bpf/prog_tests/sockmap_listen.c | |
parent | libbpf: Prevent deprecation warnings in xsk.c (diff) | |
download | linux-2fe256a429cb6c0b0064563af4158470143a363c.tar.gz linux-2fe256a429cb6c0b0064563af4158470143a363c.tar.bz2 linux-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 <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211124193233.3115996-5-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/sockmap_listen.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/sockmap_listen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c index 2a9cb951bfd6..7e21bfab6358 100644 --- a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c @@ -502,8 +502,8 @@ static void test_lookup_32_bit_value(int family, int sotype, int mapfd) if (s < 0) return; - mapfd = bpf_create_map(BPF_MAP_TYPE_SOCKMAP, sizeof(key), - sizeof(value32), 1, 0); + mapfd = bpf_map_create(BPF_MAP_TYPE_SOCKMAP, NULL, sizeof(key), + sizeof(value32), 1, NULL); if (mapfd < 0) { FAIL_ERRNO("map_create"); goto close; |