Lines Matching refs:off_arr
617 kfree(map->off_arr); in bpf_map_free_deferred()
926 u32 *off_base = map->off_arr->field_off; in map_off_arr_swap()
930 sz_a = map->off_arr->field_sz + (a - off_base); in map_off_arr_swap()
931 sz_b = map->off_arr->field_sz + (b - off_base); in map_off_arr_swap()
942 struct bpf_map_off_arr *off_arr; in bpf_map_alloc_off_arr() local
946 map->off_arr = NULL; in bpf_map_alloc_off_arr()
950 off_arr = kmalloc(sizeof(*map->off_arr), GFP_KERNEL | __GFP_NOWARN); in bpf_map_alloc_off_arr()
951 if (!off_arr) in bpf_map_alloc_off_arr()
953 map->off_arr = off_arr; in bpf_map_alloc_off_arr()
955 off_arr->cnt = 0; in bpf_map_alloc_off_arr()
957 i = off_arr->cnt; in bpf_map_alloc_off_arr()
959 off_arr->field_off[i] = map->spin_lock_off; in bpf_map_alloc_off_arr()
960 off_arr->field_sz[i] = sizeof(struct bpf_spin_lock); in bpf_map_alloc_off_arr()
961 off_arr->cnt++; in bpf_map_alloc_off_arr()
964 i = off_arr->cnt; in bpf_map_alloc_off_arr()
966 off_arr->field_off[i] = map->timer_off; in bpf_map_alloc_off_arr()
967 off_arr->field_sz[i] = sizeof(struct bpf_timer); in bpf_map_alloc_off_arr()
968 off_arr->cnt++; in bpf_map_alloc_off_arr()
972 u32 *off = &off_arr->field_off[off_arr->cnt]; in bpf_map_alloc_off_arr()
973 u8 *sz = &off_arr->field_sz[off_arr->cnt]; in bpf_map_alloc_off_arr()
979 off_arr->cnt += tab->nr_off; in bpf_map_alloc_off_arr()
982 if (off_arr->cnt == 1) in bpf_map_alloc_off_arr()
984 sort_r(off_arr->field_off, off_arr->cnt, sizeof(off_arr->field_off[0]), in bpf_map_alloc_off_arr()
1190 kfree(map->off_arr); in map_create()