Home
last modified time | relevance | path

Searched refs:new_sz (Results 1 – 12 of 12) sorted by relevance

/Linux-v6.6/tools/perf/util/
Dutil.c514 size_t new_sz = *arr_sz; in do_realloc_array_as_needed() local
518 if (!new_sz) in do_realloc_array_as_needed()
519 new_sz = msz >= 64 ? 1 : roundup(64, msz); /* Start with at least 64 bytes */ in do_realloc_array_as_needed()
520 while (x >= new_sz) { in do_realloc_array_as_needed()
521 if (check_mul_overflow(new_sz, (size_t)2, &new_sz)) in do_realloc_array_as_needed()
524 if (new_sz == *arr_sz) in do_realloc_array_as_needed()
526 new_arr = calloc(new_sz, msz); in do_realloc_array_as_needed()
532 for (i = *arr_sz; i < new_sz; i++) in do_realloc_array_as_needed()
536 *arr_sz = new_sz; in do_realloc_array_as_needed()
Dthread-stack.c121 size_t sz, new_sz; in thread_stack__grow() local
123 new_sz = ts->sz + STACK_GROWTH; in thread_stack__grow()
124 sz = new_sz * sizeof(struct thread_stack_entry); in thread_stack__grow()
131 ts->sz = new_sz; in thread_stack__grow()
180 unsigned int new_sz = 1; in thread_stack__new() local
183 new_sz = roundup_pow_of_two(cpu + 1); in thread_stack__new()
185 if (!ts || new_sz > old_sz) { in thread_stack__new()
186 new_ts = calloc(new_sz, sizeof(*ts)); in thread_stack__new()
191 new_ts->arr_sz = new_sz; in thread_stack__new()
/Linux-v6.6/net/core/
Dnetprio_cgroup.c44 size_t new_sz, new_len; in extend_netdev_table() local
56 new_sz = PRIOMAP_MIN_SZ; in extend_netdev_table()
58 new_len = (new_sz - offsetof(struct netprio_map, priomap)) / in extend_netdev_table()
62 new_sz *= 2; in extend_netdev_table()
64 if (WARN_ON(new_sz < PRIOMAP_MIN_SZ)) in extend_netdev_table()
69 new = kzalloc(new_sz, GFP_KERNEL); in extend_netdev_table()
/Linux-v6.6/tools/testing/selftests/bpf/prog_tests/
Dglobal_map_resize.c25 size_t array_len, actual_sz, new_sz; in global_map_resize_bss_subtest() local
45 new_sz = sizeof(skel->data_percpu_arr->percpu_arr[0]) * libbpf_num_possible_cpus(); in global_map_resize_bss_subtest()
46 err = bpf_map__set_value_size(skel->maps.data_percpu_arr, new_sz); in global_map_resize_bss_subtest()
94 size_t array_len, actual_sz, new_sz; in global_map_resize_data_subtest() local
115 new_sz = sizeof(skel->data_percpu_arr->percpu_arr[0]) * libbpf_num_possible_cpus(); in global_map_resize_data_subtest()
116 err = bpf_map__set_value_size(skel->maps.data_percpu_arr, new_sz); in global_map_resize_data_subtest()
/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/en/
Dmod_hdr.c164 size_t new_sz, old_sz; in mlx5e_mod_hdr_alloc() local
177 new_sz = MLX5_MH_ACT_SZ * new_num_actions; in mlx5e_mod_hdr_alloc()
181 ret = kzalloc(new_sz, GFP_KERNEL); in mlx5e_mod_hdr_alloc()
187 ret = krealloc(mod_hdr_acts->actions, new_sz, GFP_KERNEL); in mlx5e_mod_hdr_alloc()
189 memset(ret + old_sz, 0, new_sz - old_sz); in mlx5e_mod_hdr_alloc()
/Linux-v6.6/tools/lib/bpf/
Drelo_core.h67 __u32 new_sz; member
Drelo_core.c893 res->orig_sz = res->new_sz = 0; in bpf_core_calc_relo()
901 &res->new_val, &res->new_sz, in bpf_core_calc_relo()
910 if (res->orig_sz != res->new_sz) { in bpf_core_calc_relo()
1092 if (res->new_sz != res->orig_sz) { in bpf_core_patch_insn()
1102 insn_bpf_sz = insn_bytes_to_bpf_size(res->new_sz); in bpf_core_patch_insn()
1105 prog_name, relo_idx, insn_idx, res->new_sz); in bpf_core_patch_insn()
1111 prog_name, relo_idx, insn_idx, res->orig_sz, res->new_sz); in bpf_core_patch_insn()
Dlibbpf.c1522 static int bpf_map_mmap_resize(struct bpf_map *map, size_t old_sz, size_t new_sz) in bpf_map_mmap_resize() argument
1529 if (old_sz == new_sz) in bpf_map_mmap_resize()
1532 mmaped = mmap(NULL, new_sz, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); in bpf_map_mmap_resize()
1536 memcpy(mmaped, map->mmaped, min(old_sz, new_sz)); in bpf_map_mmap_resize()
6059 size_t old_sz, new_sz; in adjust_prog_btf_ext_info() local
6089 new_sz = old_sz + (copy_end - copy_start); in adjust_prog_btf_ext_info()
6090 new_prog_info = realloc(*prog_info, new_sz); in adjust_prog_btf_ext_info()
6094 *prog_rec_cnt = new_sz / ext_info->rec_size; in adjust_prog_btf_ext_info()
6105 rec_end = new_prog_info + new_sz; in adjust_prog_btf_ext_info()
6597 int i, j, nrels, new_sz; in bpf_object__collect_map_relos() local
[all …]
/Linux-v6.6/fs/ntfs3/
Dxattr.c325 u64 new_sz; in ntfs_set_ea() local
454 new_sz = size; in ntfs_set_ea()
455 err = attr_set_size(ni, ATTR_EA, NULL, 0, &ea_run, new_sz, &new_sz, in ntfs_set_ea()
Dfslog.c3031 struct NEW_ATTRIBUTE_SIZES *new_sz; in do_action() local
3351 new_sz = data; in do_action()
3355 attr->nres.alloc_size = new_sz->alloc_size; in do_action()
3356 attr->nres.data_size = new_sz->data_size; in do_action()
3357 attr->nres.valid_size = new_sz->valid_size; in do_action()
3360 attr->nres.total_size = new_sz->total_size; in do_action()
/Linux-v6.6/fs/ubifs/
Ddir.c1294 int unlink = !!new_inode, new_sz, old_sz; in do_rename() local
1343 new_sz = CALC_DENT_SIZE(fname_len(&new_nm)); in do_rename()
1461 new_dir->i_size += new_sz; in do_rename()
1517 new_dir->i_size -= new_sz; in do_rename()
/Linux-v6.6/drivers/infiniband/hw/bnxt_re/
Dqplib_fp.c2158 u32 pg_sz, lvl, new_sz; in bnxt_qplib_resize_cq() local
2178 new_sz = (new_cqes << CMDQ_RESIZE_CQ_NEW_CQ_SIZE_SFT) & in bnxt_qplib_resize_cq()
2180 req.new_cq_size_pg_size_lvl = cpu_to_le32(new_sz | pg_sz | lvl); in bnxt_qplib_resize_cq()