/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | btf.c | 72 __u32 value_size; member 140 .value_size = 180, 195 .value_size = 68, 220 .value_size = 16, 328 .value_size = 4, 350 .value_size = 4, 372 .value_size = 4, 397 .value_size = 4, 422 .value_size = 4, 4108 create_attr.value_size = test->value_size; in do_test_raw() [all …]
|
/linux/kernel/bpf/ |
A D | queue_stack_maps.c | 53 attr->value_size == 0 || in queue_stack_map_alloc_check() 58 if (attr->value_size > KMALLOC_MAX_SIZE) in queue_stack_map_alloc_check() 74 queue_size = sizeof(*qs) + size * attr->value_size; in queue_stack_map_alloc() 109 memset(value, 0, qs->map.value_size); in __queue_map_get() 114 ptr = &qs->elements[qs->tail * qs->map.value_size]; in __queue_map_get() 115 memcpy(value, ptr, qs->map.value_size); in __queue_map_get() 139 memset(value, 0, qs->map.value_size); in __stack_map_get() 148 ptr = &qs->elements[index * qs->map.value_size]; in __stack_map_get() 149 memcpy(value, ptr, qs->map.value_size); in __stack_map_get() 213 dst = &qs->elements[qs->head * qs->map.value_size]; in queue_stack_map_push_elem() [all …]
|
A D | bloom_filter.c | 30 u32 value_size, u32 index) in hash() argument 38 h = jhash(value, value_size, bloom->hash_seed + index); in hash() 50 h = hash(bloom, value, map->value_size, i); in bloom_map_peek_elem() 68 h = hash(bloom, value, map->value_size, i); in bloom_map_push_elem() 94 if (attr->key_size != 0 || attr->value_size == 0 || in bloom_map_alloc() 150 if ((attr->value_size & (sizeof(u32) - 1)) == 0) in bloom_map_alloc() 152 attr->value_size / sizeof(u32); in bloom_map_alloc()
|
A D | map_iter.c | 105 u32 key_acc_size, value_acc_size, key_size, value_size; in bpf_iter_attach_map() local 130 value_size = map->value_size; in bpf_iter_attach_map() 132 value_size = round_up(map->value_size, 8) * num_possible_cpus(); in bpf_iter_attach_map() 134 if (key_acc_size > key_size || value_acc_size > value_size) { in bpf_iter_attach_map()
|
A D | stackmap.c | 67 (u64)smap->map.value_size; in prealloc_elems_and_freelist() 91 u32 value_size = attr->value_size; in stack_map_alloc() local 104 value_size < 8 || value_size % 8) in stack_map_alloc() 109 if (value_size % sizeof(struct bpf_stack_build_id) || in stack_map_alloc() 110 value_size / sizeof(struct bpf_stack_build_id) in stack_map_alloc() 113 } else if (value_size / 8 > sysctl_perf_event_max_stack) in stack_map_alloc() 122 cost += n_buckets * (value_size + sizeof(struct stack_map_bucket)); in stack_map_alloc() 128 smap->map.value_size = value_size; in stack_map_alloc() 264 u32 max_depth = map->value_size / stack_map_data_size(map); in __bpf_get_stackid() 340 u32 max_depth = map->value_size / stack_map_data_size(map); in BPF_CALL_3() [all …]
|
A D | map_in_map.c | 50 inner_map_meta->value_size = inner_map->value_size; in bpf_map_meta_alloc() 84 meta0->value_size == meta1->value_size && in bpf_map_meta_equal()
|
A D | local_storage.c | 167 map->value_size, in cgroup_storage_update_elem() 173 memcpy(&new->data[0], value, map->value_size); in cgroup_storage_update_elem() 201 size = round_up(_map->value_size, 8); in bpf_percpu_cgroup_storage_copy() 235 size = round_up(_map->value_size, 8); in bpf_percpu_cgroup_storage_update() 302 if (attr->value_size == 0) in cgroup_storage_map_alloc() 305 if (attr->value_size > max_value_size) in cgroup_storage_map_alloc() 481 size = sizeof(struct bpf_storage_buffer) + map->value_size; in bpf_cgroup_storage_calculate_size() 485 size = map->value_size; in bpf_cgroup_storage_calculate_size()
|
/linux/tools/testing/selftests/bpf/benchs/ |
A D | bench_bloom_filter_map.c | 41 __u8 value_size; member 45 .value_size = 8, 83 args.value_size = strtol(arg, NULL, 10); in parse_arg() 84 if (args.value_size < 2 || args.value_size > 256) { in parse_arg() 131 val_size = args.value_size; in map_prepare_thread() 238 if (args.value_size < 8) { in check_args() 239 __u64 nr_unique_entries = 1ULL << (args.value_size * 8); in check_args() 274 bpf_map__set_value_size(skel->maps.array_map, args.value_size); in setup_skeleton() 278 bpf_map__set_value_size(skel->maps.hashmap, args.value_size); in setup_skeleton() 281 bpf_map__set_key_size(skel->maps.hashmap, args.value_size); in setup_skeleton() [all …]
|
/linux/tools/bpf/bpftool/ |
A D | map.c | 98 return malloc(info->value_size); in alloc_value() 200 info->value_size); in print_entry_json() 291 if (info->value_size) { in print_entry_plain() 308 if (info->value_size) { in print_entry_plain() 313 info->value_size, " "); in print_entry_plain() 392 if (value_size) in parse_elem() 404 if (value_size != 4) { in parse_elem() 422 if (value_size != 4) { in parse_elem() 465 value_size, NULL, value_fd); in parse_elem() 881 info->value_size != 8) in map_dump() [all …]
|
/linux/tools/testing/selftests/bpf/map_tests/ |
A D | array_map_batch_ops.c | 76 .value_size = sizeof(__s64), in __test_map_lookup_and_update_batch() 82 int err, step, value_size; in __test_map_lookup_and_update_batch() local 94 value_size = sizeof(__s64); in __test_map_lookup_and_update_batch() 96 value_size *= nr_cpus; in __test_map_lookup_and_update_batch() 99 values = calloc(max_entries, value_size); in __test_map_lookup_and_update_batch() 110 memset(values, 0, max_entries * value_size); in __test_map_lookup_and_update_batch() 121 values + total * value_size, in __test_map_lookup_and_update_batch()
|
A D | htab_map_batch_ops.c | 83 int err, step, value_size; in __test_map_lookup_and_delete_batch() local 91 .value_size = sizeof(int), in __test_map_lookup_and_delete_batch() 103 value_size = is_pcpu ? sizeof(value) : sizeof(int); in __test_map_lookup_and_delete_batch() 131 memset(values, 0, max_entries * value_size); in __test_map_lookup_and_delete_batch() 150 memset(values, 0, max_entries * value_size); in __test_map_lookup_and_delete_batch() 162 total * value_size, in __test_map_lookup_and_delete_batch() 216 memset(values, 0, max_entries * value_size); in __test_map_lookup_and_delete_batch() 225 total * value_size, in __test_map_lookup_and_delete_batch()
|
/linux/tools/lib/bpf/ |
A D | libbpf_probes.c | 204 int key_size, value_size, max_entries, map_flags; in bpf_probe_map_type() local 210 value_size = sizeof(__u32); in bpf_probe_map_type() 216 value_size = sizeof(__u64); in bpf_probe_map_type() 220 value_size = sizeof(__u64); in bpf_probe_map_type() 226 value_size = sizeof(__u64); in bpf_probe_map_type() 238 value_size = 8; in bpf_probe_map_type() 247 value_size = 0; in bpf_probe_map_type() 293 attr.value_size = value_size; in bpf_probe_map_type()
|
/linux/drivers/net/ethernet/mellanox/mlxsw/ |
A D | spectrum_dpipe.c | 137 match_value->value_size = sizeof(u32); in mlxsw_sp_erif_entry_prepare() 143 action_value->value_size = sizeof(u32); in mlxsw_sp_erif_entry_prepare() 421 match_value->value_size = sizeof(u32); in mlxsw_sp_dpipe_table_host_entry_prepare() 432 match_value->value_size = sizeof(u32); in mlxsw_sp_dpipe_table_host_entry_prepare() 447 action_value->value_size = sizeof(u64); in mlxsw_sp_dpipe_table_host_entry_prepare() 474 memcpy(value->value, dip, value->value_size); in __mlxsw_sp_dpipe_table_host_entry_fill() 988 match_value->value_size = sizeof(u32); in mlxsw_sp_dpipe_table_adj_entry_prepare() 997 match_value->value_size = sizeof(u32); in mlxsw_sp_dpipe_table_adj_entry_prepare() 1006 match_value->value_size = sizeof(u32); in mlxsw_sp_dpipe_table_adj_entry_prepare() 1015 action_value->value_size = sizeof(u64); in mlxsw_sp_dpipe_table_adj_entry_prepare() [all …]
|
/linux/drivers/md/persistent-data/ |
A D | dm-btree-internal.h | 35 __le32 value_size; member 120 uint32_t value_size = le32_to_cpu(n->header.value_size); in value_ptr() local 121 return value_base(n) + (value_size * index); in value_ptr()
|
A D | dm-btree-remove.c | 59 uint32_t value_size = le32_to_cpu(n->header.value_size); in node_shift() local 70 (nr_entries - shift) * value_size); in node_shift() 78 nr_entries * value_size); in node_shift() 85 uint32_t value_size = le32_to_cpu(left->header.value_size); in node_copy() local 86 BUG_ON(value_size != le32_to_cpu(right->header.value_size)); in node_copy() 96 shift * value_size); in node_copy() 104 shift * value_size); in node_copy() 115 uint32_t value_size = le32_to_cpu(n->header.value_size); in delete_at() local 125 nr_to_copy * value_size); in delete_at()
|
A D | dm-btree.c | 115 size_t elt_size = sizeof(uint64_t) + value_size; /* key + value */ in calc_max_entries() 144 n->header.value_size = cpu_to_le32(info->value_type.size); in dm_btree_empty() 340 uint64_t *result_key, void *v, size_t value_size) in btree_lookup_raw() argument 364 memcpy(v, value_ptr(ro_node(s), i), value_size); in btree_lookup_raw() 507 size_t value_size = le32_to_cpu(dest->header.value_size); in copy_entries() local 520 size_t value_size = le32_to_cpu(dest->header.value_size); in move_entries() local 663 rn->header.value_size = ln->header.value_size; in split_one_into_two() 763 mn->header.value_size = ln->header.value_size; in split_two_into_three() 853 ln->header.value_size = pn->header.value_size; in btree_split_beneath() 870 rn->header.value_size = pn->header.value_size; in btree_split_beneath() [all …]
|
/linux/tools/bpf/bpftool/skeleton/ |
A D | profiler.bpf.c | 11 __uint(value_size, sizeof(int)); 18 __uint(value_size, sizeof(struct bpf_perf_event_value)); 25 __uint(value_size, sizeof(struct bpf_perf_event_value)); 32 __uint(value_size, sizeof(u64));
|
/linux/tools/perf/util/bpf_skel/ |
A D | bperf_leader.bpf.c | 10 __uint(value_size, sizeof(int)); 17 __uint(value_size, sizeof(struct bpf_perf_event_value)); 24 __uint(value_size, sizeof(struct bpf_perf_event_value));
|
A D | bperf_follower.bpf.c | 11 __uint(value_size, sizeof(struct bpf_perf_event_value)); 18 __uint(value_size, sizeof(struct bpf_perf_event_value)); 25 __uint(value_size, sizeof(__u32));
|
A D | bperf_cgroup.bpf.c | 19 __uint(value_size, sizeof(int)); 27 __uint(value_size, sizeof(__u32)); 35 __uint(value_size, sizeof(struct bpf_perf_event_value)); 43 __uint(value_size, sizeof(struct bpf_perf_event_value));
|
A D | bpf_prog_profiler.bpf.c | 11 __uint(value_size, sizeof(int)); 18 __uint(value_size, sizeof(struct bpf_perf_event_value)); 26 __uint(value_size, sizeof(struct bpf_perf_event_value));
|
/linux/scripts/dtc/ |
A D | fdtput.c | 60 int value_size = 0; /* size of holding area */ in encode_value() local 83 if (upto + len > value_size) { in encode_value() 84 value_size = (upto + len) + 500; in encode_value() 85 value = realloc(value, value_size); in encode_value() 88 "%d bytes\n", value_size); in encode_value()
|
/linux/drivers/gpu/drm/radeon/ |
A D | radeon_kms.c | 243 uint32_t *value, value_tmp, *value_ptr, value_size; in radeon_info_ioctl() local 250 value_size = sizeof(uint32_t); in radeon_info_ioctl() 448 value_size = sizeof(uint64_t); in radeon_info_ioctl() 501 value_size = sizeof(uint32_t)*32; in radeon_info_ioctl() 504 value_size = sizeof(uint32_t)*32; in radeon_info_ioctl() 513 value_size = sizeof(uint32_t)*16; in radeon_info_ioctl() 547 value_size = sizeof(uint64_t); in radeon_info_ioctl() 552 value_size = sizeof(uint64_t); in radeon_info_ioctl() 557 value_size = sizeof(uint64_t); in radeon_info_ioctl() 615 if (copy_to_user(value_ptr, (char*)value, value_size)) { in radeon_info_ioctl()
|
/linux/tools/testing/selftests/bpf/progs/ |
A D | sample_map_ret0.c | 8 .value_size = sizeof(long), 15 .value_size = sizeof(long),
|
A D | map_ptr_kern.c | 33 __u32 value_size; member 39 __u32 value_size, __u32 max_entries) in check_bpf_map_fields() argument 43 VERIFY(map->value_size == value_size); in check_bpf_map_fields() 55 VERIFY(indirect->value_size == direct->value_size); in check_bpf_map_ptr() 63 __u32 key_size, __u32 value_size, __u32 max_entries) in check() argument 66 VERIFY(check_bpf_map_fields(indirect, key_size, value_size, in check()
|