mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
bpf: Mark BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE deprecated
Now 'BPF_MAP_TYPE_CGRP_STORAGE + local percpu ptr' can cover all BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE functionality and more. So mark BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE deprecated. Also make changes in selftests/bpf/test_bpftool_synctypes.py and selftest libbpf_str to fix otherwise test errors. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20230827152837.2003563-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
committed by
Alexei Starovoitov
parent
1bd7931728
commit
9bc95a95ab
@@ -142,10 +142,14 @@ static void test_libbpf_bpf_map_type_str(void)
|
||||
/* Special case for map_type_name BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED
|
||||
* where it and BPF_MAP_TYPE_CGROUP_STORAGE have the same enum value
|
||||
* (map_type). For this enum value, libbpf_bpf_map_type_str() picks
|
||||
* BPF_MAP_TYPE_CGROUP_STORAGE.
|
||||
* BPF_MAP_TYPE_CGROUP_STORAGE. The same for
|
||||
* BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED and
|
||||
* BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE.
|
||||
*/
|
||||
if (strcmp(map_type_name, "BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED") == 0)
|
||||
continue;
|
||||
if (strcmp(map_type_name, "BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED") == 0)
|
||||
continue;
|
||||
|
||||
ASSERT_STREQ(buf, map_type_name, "exp_str_value");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user