/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/ |
H A D | btf.c | 67 enum bpf_map_type map_type; member 134 .map_type = BPF_MAP_TYPE_ARRAY, 189 .map_type = BPF_MAP_TYPE_ARRAY, 214 .map_type = BPF_MAP_TYPE_ARRAY, 255 .map_type = BPF_MAP_TYPE_ARRAY, 300 .map_type = BPF_MAP_TYPE_ARRAY, 322 .map_type = BPF_MAP_TYPE_ARRAY, 344 .map_type = BPF_MAP_TYPE_ARRAY, 366 .map_type = BPF_MAP_TYPE_ARRAY, 391 .map_type 5190 enum bpf_map_type map_type; global() member [all...] |
H A D | sockmap_ktls.c | 136 enum bpf_map_type map_type) in fmt_test_name() 149 static void run_tests(int family, enum bpf_map_type map_type) in run_tests() argument 153 map = bpf_map_create(map_type, NULL, sizeof(int), sizeof(int), 1, NULL); in run_tests() 157 if (test__start_subtest(fmt_test_name("disconnect_after_delete", family, map_type))) in run_tests() 159 if (test__start_subtest(fmt_test_name("update_fails_when_sock_has_ulp", family, map_type))) in run_tests() 135 fmt_test_name(const char *subtest_name, int family, enum bpf_map_type map_type) fmt_test_name() argument
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/ |
H A D | test_lru_map.c | 29 static int create_map(int map_type, int map_flags, unsigned int size) in create_map() argument 33 map_fd = bpf_create_map(map_type, sizeof(unsigned long long), in create_map() 68 map.map_type = BPF_MAP_TYPE_ARRAY; in bpf_map_lookup_elem_with_ref_bit() 159 static void test_lru_sanity0(int map_type, int map_flags) in test_lru_sanity0() argument 165 printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type, in test_lru_sanity0() 171 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity0() 173 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity0() 248 static void test_lru_sanity1(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity1() argument 260 printf("%s (map_type in test_lru_sanity1() 324 test_lru_sanity2(int map_type, int map_flags, unsigned int tgt_free) test_lru_sanity2() argument 432 test_lru_sanity3(int map_type, int map_flags, unsigned int tgt_free) test_lru_sanity3() argument 496 test_lru_sanity4(int map_type, int map_flags, unsigned int tgt_free) test_lru_sanity4() argument 573 test_lru_sanity5(int map_type, int map_flags) test_lru_sanity5() argument 620 test_lru_sanity6(int map_type, int map_flags, int tgt_free) test_lru_sanity6() argument 687 test_lru_sanity7(int map_type, int map_flags) test_lru_sanity7() argument 783 test_lru_sanity8(int map_type, int map_flags) test_lru_sanity8() argument [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/ |
H A D | test_lru_map.c | 28 static int create_map(int map_type, int map_flags, unsigned int size) in create_map() argument 33 map_fd = bpf_map_create(map_type, NULL, sizeof(unsigned long long), in create_map() 148 static void test_lru_sanity0(int map_type, int map_flags) in test_lru_sanity0() argument 154 printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type, in test_lru_sanity0() 160 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity0() 162 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity0() 239 static void test_lru_sanity1(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity1() argument 251 printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type, in test_lru_sanity1() 315 test_lru_sanity2(int map_type, int map_flags, unsigned int tgt_free) test_lru_sanity2() argument 422 test_lru_sanity3(int map_type, int map_flags, unsigned int tgt_free) test_lru_sanity3() argument 486 test_lru_sanity4(int map_type, int map_flags, unsigned int tgt_free) test_lru_sanity4() argument 562 test_lru_sanity5(int map_type, int map_flags) test_lru_sanity5() argument 609 test_lru_sanity6(int map_type, int map_flags, int tgt_free) test_lru_sanity6() argument 676 test_lru_sanity7(int map_type, int map_flags) test_lru_sanity7() argument 767 test_lru_sanity8(int map_type, int map_flags) test_lru_sanity8() argument [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
H A D | btf.c | 70 enum bpf_map_type map_type; member 137 .map_type = BPF_MAP_TYPE_ARRAY, 192 .map_type = BPF_MAP_TYPE_ARRAY, 217 .map_type = BPF_MAP_TYPE_ARRAY, 258 .map_type = BPF_MAP_TYPE_ARRAY, 303 .map_type = BPF_MAP_TYPE_ARRAY, 325 .map_type = BPF_MAP_TYPE_ARRAY, 347 .map_type = BPF_MAP_TYPE_ARRAY, 369 .map_type = BPF_MAP_TYPE_ARRAY, 394 .map_type 4541 enum bpf_map_type map_type; global() member [all...] |
H A D | sockmap_basic.c | 84 static void test_sockmap_create_update_free(enum bpf_map_type map_type) in test_sockmap_create_update_free() argument 93 map = bpf_create_map(map_type, sizeof(int), sizeof(int), 1, 0); in test_sockmap_create_update_free() 110 static void test_skmsg_helpers(enum bpf_map_type map_type) in test_skmsg_helpers() argument 139 static void test_sockmap_update(enum bpf_map_type map_type) in test_sockmap_update() argument 159 if (map_type == BPF_MAP_TYPE_SOCKMAP) in test_sockmap_update() 198 static void test_sockmap_copy(enum bpf_map_type map_type) in test_sockmap_copy() argument 214 if (map_type == BPF_MAP_TYPE_SOCKMAP) { in test_sockmap_copy()
|
H A D | sockmap_ktls.c | 95 static void run_tests(int family, enum bpf_map_type map_type) in run_tests() argument 100 map = bpf_create_map(map_type, sizeof(int), sizeof(int), 1, 0); in run_tests() 109 map_type == BPF_MAP_TYPE_SOCKMAP ? "SOCKMAP" : "SOCKHASH"); in run_tests()
|
/kernel/linux/linux-5.10/samples/bpf/ |
H A D | test_lru_dist.c | 208 static int create_map(int map_type, int map_flags, unsigned int size) in create_map() argument 212 map_fd = bpf_create_map(map_type, sizeof(unsigned long long), in create_map() 310 static void test_parallel_lru_dist(int map_type, int map_flags, in test_parallel_lru_dist() argument 316 printf("%s (map_type:%d map_flags:0x%X):\n", __func__, map_type, in test_parallel_lru_dist() 320 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist() 323 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist() 335 static void test_lru_loss0(int map_type, int map_flags) in test_lru_loss0() argument 343 printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type, in test_lru_loss0() 389 test_lru_loss1(int map_type, int map_flags) test_lru_loss1() argument 468 test_parallel_lru_loss(int map_type, int map_flags, int nr_tasks) test_parallel_lru_loss() argument [all...] |
/kernel/linux/linux-6.6/samples/bpf/ |
H A D | test_lru_dist.c | 202 static int create_map(int map_type, int map_flags, unsigned int size) in create_map() argument 209 map_fd = bpf_map_create(map_type, NULL, sizeof(unsigned long long), in create_map() 307 static void test_parallel_lru_dist(int map_type, int map_flags, in test_parallel_lru_dist() argument 313 printf("%s (map_type:%d map_flags:0x%X):\n", __func__, map_type, in test_parallel_lru_dist() 317 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist() 320 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist() 332 static void test_lru_loss0(int map_type, int map_flags) in test_lru_loss0() argument 340 printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type, in test_lru_loss0() 386 test_lru_loss1(int map_type, int map_flags) test_lru_loss1() argument 465 test_parallel_lru_loss(int map_type, int map_flags, int nr_tasks) test_parallel_lru_loss() argument [all...] |
/kernel/linux/linux-6.6/include/trace/events/ |
H A D | xdp.h | 95 enum bpf_map_type map_type, 98 TP_ARGS(dev, xdp, tgt, err, map_type, map_id, index), 113 if (map_type == BPF_MAP_TYPE_DEVMAP || map_type == BPF_MAP_TYPE_DEVMAP_HASH) { 119 } else if (map_type == BPF_MAP_TYPE_UNSPEC && map_id == INT_MAX) { 145 enum bpf_map_type map_type, 147 TP_ARGS(dev, xdp, tgt, err, map_type, map_id, index) 154 enum bpf_map_type map_type, 156 TP_ARGS(dev, xdp, tgt, err, map_type, map_id, index) 165 #define _trace_xdp_redirect_map(dev, xdp, to, map_type, map_i [all...] |
/kernel/linux/linux-5.10/kernel/bpf/ |
H A D | map_iter.c | 117 if (map->map_type == BPF_MAP_TYPE_PERCPU_HASH || in bpf_iter_attach_map() 118 map->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH || in bpf_iter_attach_map() 119 map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY) in bpf_iter_attach_map() 121 else if (map->map_type != BPF_MAP_TYPE_HASH && in bpf_iter_attach_map() 122 map->map_type != BPF_MAP_TYPE_LRU_HASH && in bpf_iter_attach_map() 123 map->map_type != BPF_MAP_TYPE_ARRAY) in bpf_iter_attach_map()
|
H A D | map_in_map.c | 47 inner_map_meta->map_type = inner_map->map_type; in bpf_map_meta_alloc() 74 /* No need to compare ops because it is covered by map_type */ in bpf_map_meta_equal() 75 return meta0->map_type == meta1->map_type && in bpf_map_meta_equal()
|
H A D | syscall.c | 35 #define IS_FD_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PERF_EVENT_ARRAY || \ 36 (map)->map_type == BPF_MAP_TYPE_CGROUP_ARRAY || \ 37 (map)->map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS) 38 #define IS_FD_PROG_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PROG_ARRAY) 39 #define IS_FD_HASH(map) ((map)->map_type == BPF_MAP_TYPE_HASH_OF_MAPS) 105 u32 type = attr->map_type; in find_and_alloc_map() 127 map->map_type = type; in find_and_alloc_map() 148 if (map->map_type == BPF_MAP_TYPE_PERCPU_HASH || in bpf_map_value_size() 149 map->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH || in bpf_map_value_size() 150 map->map_type in bpf_map_value_size() [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/map_tests/ |
H A D | map_in_map_batch_ops.c | 31 static void create_inner_maps(enum bpf_map_type map_type, in create_inner_maps() argument 41 map_fd = bpf_map_create(map_type, map_name, sizeof(__u32), in create_inner_maps() 45 "map_type=(%d) map_name(%s), error:%s\n", in create_inner_maps() 46 map_type, map_name, strerror(errno)); in create_inner_maps() 61 "map_type=(%d) map_name(%s), error:%s\n", in create_inner_maps() 62 map_type, map_name, strerror(errno)); in create_inner_maps() 66 static int create_outer_map(enum bpf_map_type map_type, __u32 inner_map_fd) in create_outer_map() argument 72 outer_map_fd = bpf_map_create(map_type, "outer_map", sizeof(__u32), in create_outer_map() 77 "map_type=(%d), error:%s\n", in create_outer_map() 78 map_type, strerro in create_outer_map() [all...] |
H A D | map_percpu_stats.c | 128 static bool is_lru(__u32 map_type) in is_lru() argument 130 return map_type == BPF_MAP_TYPE_LRU_HASH || in is_lru() 131 map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH; in is_lru() 135 __u32 map_type; member 159 if (opts->map_type == BPF_MAP_TYPE_HASH_OF_MAPS) in patch_map_thread() 166 if (opts->map_type == BPF_MAP_TYPE_HASH_OF_MAPS) in patch_map_thread() 261 "n_iter=%u, expected %u (map_type=%s,map_flags=%08x)\n", in check_expected_number_elements() 273 opts.map_type = info.type; in __test() 279 if (opts.map_type != BPF_MAP_TYPE_HASH_OF_MAPS) in __test()
|
/kernel/linux/linux-5.10/fs/cifs/ |
H A D | cifs_unicode.c | 19 int map_type; in cifs_remap() local 22 map_type = SFM_MAP_UNI_RSVD; in cifs_remap() 24 map_type = SFU_MAP_UNI_RSVD; in cifs_remap() 26 map_type = NO_MAP_UNI_RSVD; in cifs_remap() 28 return map_type; in cifs_remap() 113 * @map_type - How should the 7 NTFS/SMB reserved characters be mapped to UCS2? 180 const struct nls_table *codepage, int map_type) in cifs_from_utf16() 215 charlen = cifs_mapchar(tmp, ftmp, codepage, map_type); in cifs_from_utf16() 221 charlen = cifs_mapchar(&to[outlen], ftmp, codepage, map_type); in cifs_from_utf16() 179 cifs_from_utf16(char *to, const __le16 *from, int tolen, int fromlen, const struct nls_table *codepage, int map_type) cifs_from_utf16() argument
|
/kernel/linux/linux-6.6/fs/smb/client/ |
H A D | cifs_unicode.c | 17 int map_type; in cifs_remap() local 20 map_type = SFM_MAP_UNI_RSVD; in cifs_remap() 22 map_type = SFU_MAP_UNI_RSVD; in cifs_remap() 24 map_type = NO_MAP_UNI_RSVD; in cifs_remap() 26 return map_type; in cifs_remap() 111 * @map_type - How should the 7 NTFS/SMB reserved characters be mapped to UCS2? 178 const struct nls_table *codepage, int map_type) in cifs_from_utf16() 213 charlen = cifs_mapchar(tmp, ftmp, codepage, map_type); in cifs_from_utf16() 219 charlen = cifs_mapchar(&to[outlen], ftmp, codepage, map_type); in cifs_from_utf16() 177 cifs_from_utf16(char *to, const __le16 *from, int tolen, int fromlen, const struct nls_table *codepage, int map_type) cifs_from_utf16() argument
|
/kernel/linux/linux-6.6/kernel/bpf/ |
H A D | map_iter.c | 116 if (map->map_type == BPF_MAP_TYPE_PERCPU_HASH || in bpf_iter_attach_map() 117 map->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH || in bpf_iter_attach_map() 118 map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY) in bpf_iter_attach_map() 120 else if (map->map_type != BPF_MAP_TYPE_HASH && in bpf_iter_attach_map() 121 map->map_type != BPF_MAP_TYPE_LRU_HASH && in bpf_iter_attach_map() 122 map->map_type != BPF_MAP_TYPE_ARRAY) in bpf_iter_attach_map()
|
H A D | syscall.c | 42 #define IS_FD_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PERF_EVENT_ARRAY || \ 43 (map)->map_type == BPF_MAP_TYPE_CGROUP_ARRAY || \ 44 (map)->map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS) 45 #define IS_FD_PROG_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PROG_ARRAY) 46 #define IS_FD_HASH(map) ((map)->map_type == BPF_MAP_TYPE_HASH_OF_MAPS) 131 if (map->map_type == BPF_MAP_TYPE_PERCPU_HASH || in bpf_map_value_size() 132 map->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH || in bpf_map_value_size() 133 map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY || in bpf_map_value_size() 134 map->map_type == BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE) in bpf_map_value_size() 148 if (map->map_type in maybe_wait_bpf_programs() 1128 u32 map_type = attr->map_type; map_create() local [all...] |
H A D | map_in_map.c | 44 inner_map_meta->map_type = inner_map->map_type; in bpf_map_meta_alloc() 100 /* No need to compare ops because it is covered by map_type */ in bpf_map_meta_equal() 101 return meta0->map_type == meta1->map_type && in bpf_map_meta_equal()
|
/kernel/linux/linux-5.10/tools/lib/bpf/ |
H A D | libbpf_probes.c | 202 bool bpf_probe_map_type(enum bpf_map_type map_type, __u32 ifindex) in bpf_probe_map_type() argument 214 switch (map_type) { in bpf_probe_map_type() 273 if (map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS || in bpf_probe_map_type() 274 map_type == BPF_MAP_TYPE_HASH_OF_MAPS) { in bpf_probe_map_type() 285 fd = bpf_create_map_in_map(map_type, NULL, sizeof(__u32), in bpf_probe_map_type() 290 attr.map_type = map_type; in bpf_probe_map_type()
|
H A D | bpf.h | 39 enum bpf_map_type map_type; member 57 LIBBPF_API int bpf_create_map_node(enum bpf_map_type map_type, const char *name, 60 LIBBPF_API int bpf_create_map_name(enum bpf_map_type map_type, const char *name, 63 LIBBPF_API int bpf_create_map(enum bpf_map_type map_type, int key_size, 65 LIBBPF_API int bpf_create_map_in_map_node(enum bpf_map_type map_type, 69 LIBBPF_API int bpf_create_map_in_map(enum bpf_map_type map_type,
|
H A D | bpf.c | 85 attr.map_type = create_attr->map_type; in bpf_create_map_xattr() 98 if (attr.map_type == BPF_MAP_TYPE_STRUCT_OPS) in bpf_create_map_xattr() 107 int bpf_create_map_node(enum bpf_map_type map_type, const char *name, in bpf_create_map_node() argument 114 map_attr.map_type = map_type; in bpf_create_map_node() 127 int bpf_create_map(enum bpf_map_type map_type, int key_size, in bpf_create_map() argument 132 map_attr.map_type = map_type; in bpf_create_map() 141 int bpf_create_map_name(enum bpf_map_type map_type, cons argument 157 bpf_create_map_in_map_node(enum bpf_map_type map_type, const char *name, int key_size, int inner_map_fd, int max_entries, __u32 map_flags, int node) bpf_create_map_in_map_node() argument 183 bpf_create_map_in_map(enum bpf_map_type map_type, const char *name, int key_size, int inner_map_fd, int max_entries, __u32 map_flags) bpf_create_map_in_map() argument [all...] |
/kernel/linux/linux-6.6/tools/lib/bpf/ |
H A D | libbpf_probes.c | 277 static int probe_map_create(enum bpf_map_type map_type) in probe_map_create() argument 288 switch (map_type) { in probe_map_create() 359 if (map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS || in probe_map_create() 360 map_type == BPF_MAP_TYPE_HASH_OF_MAPS) { in probe_map_create() 375 fd = bpf_map_create(map_type, NULL, key_size, value_size, max_entries, &opts); in probe_map_create() 392 int libbpf_probe_bpf_map_type(enum bpf_map_type map_type, const void *opts) in libbpf_probe_bpf_map_type() argument 399 ret = probe_map_create(map_type); in libbpf_probe_bpf_map_type()
|
/kernel/linux/linux-5.10/tools/bpf/bpftool/ |
H A D | feature.c | 526 probe_map_type(enum bpf_map_type map_type, const char *define_prefix, in probe_map_type() argument 530 const char *plain_comment = "eBPF map_type "; in probe_map_type() 534 res = bpf_probe_map_type(map_type, ifindex); in probe_map_type() 540 if (!map_type_name[map_type]) { in probe_map_type() 541 p_info("map type name not found (type %d)", map_type); in probe_map_type() 545 if (strlen(map_type_name[map_type]) > maxlen) { in probe_map_type() 550 sprintf(feat_name, "have_%s_map_type", map_type_name[map_type]); in probe_map_type() 551 sprintf(define_name, "%s_map_type", map_type_name[map_type]); in probe_map_type() 553 sprintf(plain_desc, "%s%s", plain_comment, map_type_name[map_type]); in probe_map_type()
|