Lines Matching refs:array

51 	struct reuseport_array *array = reuseport_array(map);  in reuseport_array_lookup_elem()  local
54 if (unlikely(index >= array->map.max_entries)) in reuseport_array_lookup_elem()
57 return rcu_dereference(array->ptrs[index]); in reuseport_array_lookup_elem()
63 struct reuseport_array *array = reuseport_array(map); in reuseport_array_delete_elem() local
71 if (!rcu_access_pointer(array->ptrs[index])) in reuseport_array_delete_elem()
76 sk = rcu_dereference_protected(array->ptrs[index], in reuseport_array_delete_elem()
81 RCU_INIT_POINTER(array->ptrs[index], NULL); in reuseport_array_delete_elem()
95 struct reuseport_array *array = reuseport_array(map); in reuseport_array_free() local
128 sk = rcu_dereference(array->ptrs[i]); in reuseport_array_free()
138 RCU_INIT_POINTER(array->ptrs[i], NULL); in reuseport_array_free()
147 bpf_map_area_free(array); in reuseport_array_free()
153 struct reuseport_array *array; in reuseport_array_alloc() local
160 array_size = sizeof(*array); in reuseport_array_alloc()
168 array = bpf_map_area_alloc(array_size, numa_node); in reuseport_array_alloc()
169 if (!array) { in reuseport_array_alloc()
175 bpf_map_init_from_attr(&array->map, attr); in reuseport_array_alloc()
176 bpf_map_charge_move(&array->map.memory, &mem); in reuseport_array_alloc()
178 return &array->map; in reuseport_array_alloc()
204 reuseport_array_update_check(const struct reuseport_array *array, in reuseport_array_update_check() argument
251 struct reuseport_array *array = reuseport_array(map); in bpf_fd_reuseport_array_update_elem() local
285 err = reuseport_array_update_check(array, nsk, in bpf_fd_reuseport_array_update_elem()
286 rcu_access_pointer(array->ptrs[index]), in bpf_fd_reuseport_array_update_elem()
300 osk = rcu_dereference_protected(array->ptrs[index], in bpf_fd_reuseport_array_update_elem()
304 err = reuseport_array_update_check(array, nsk, osk, reuse, map_flags); in bpf_fd_reuseport_array_update_elem()
313 WRITE_ONCE(nsk->sk_user_data, &array->ptrs[index]); in bpf_fd_reuseport_array_update_elem()
314 rcu_assign_pointer(array->ptrs[index], nsk); in bpf_fd_reuseport_array_update_elem()
337 struct reuseport_array *array = reuseport_array(map); in reuseport_array_get_next_key() local
341 if (index >= array->map.max_entries) { in reuseport_array_get_next_key()
346 if (index == array->map.max_entries - 1) in reuseport_array_get_next_key()