Lines Matching refs:off_arr
615 kfree(map->off_arr); in bpf_map_free_deferred()
924 u32 *off_base = map->off_arr->field_off; in map_off_arr_swap()
928 sz_a = map->off_arr->field_sz + (a - off_base); in map_off_arr_swap()
929 sz_b = map->off_arr->field_sz + (b - off_base); in map_off_arr_swap()
940 struct bpf_map_off_arr *off_arr; in bpf_map_alloc_off_arr() local
944 map->off_arr = NULL; in bpf_map_alloc_off_arr()
948 off_arr = kmalloc(sizeof(*map->off_arr), GFP_KERNEL | __GFP_NOWARN); in bpf_map_alloc_off_arr()
949 if (!off_arr) in bpf_map_alloc_off_arr()
951 map->off_arr = off_arr; in bpf_map_alloc_off_arr()
953 off_arr->cnt = 0; in bpf_map_alloc_off_arr()
955 i = off_arr->cnt; in bpf_map_alloc_off_arr()
957 off_arr->field_off[i] = map->spin_lock_off; in bpf_map_alloc_off_arr()
958 off_arr->field_sz[i] = sizeof(struct bpf_spin_lock); in bpf_map_alloc_off_arr()
959 off_arr->cnt++; in bpf_map_alloc_off_arr()
962 i = off_arr->cnt; in bpf_map_alloc_off_arr()
964 off_arr->field_off[i] = map->timer_off; in bpf_map_alloc_off_arr()
965 off_arr->field_sz[i] = sizeof(struct bpf_timer); in bpf_map_alloc_off_arr()
966 off_arr->cnt++; in bpf_map_alloc_off_arr()
970 u32 *off = &off_arr->field_off[off_arr->cnt]; in bpf_map_alloc_off_arr()
971 u8 *sz = &off_arr->field_sz[off_arr->cnt]; in bpf_map_alloc_off_arr()
977 off_arr->cnt += tab->nr_off; in bpf_map_alloc_off_arr()
980 if (off_arr->cnt == 1) in bpf_map_alloc_off_arr()
982 sort_r(off_arr->field_off, off_arr->cnt, sizeof(off_arr->field_off[0]), in bpf_map_alloc_off_arr()
1188 kfree(map->off_arr); in map_create()