Lines Matching refs:array

54 	struct reuseport_array *array = reuseport_array(map);  in reuseport_array_lookup_elem()  local
57 if (unlikely(index >= array->map.max_entries)) in reuseport_array_lookup_elem()
60 return rcu_dereference(array->ptrs[index]); in reuseport_array_lookup_elem()
66 struct reuseport_array *array = reuseport_array(map); in reuseport_array_delete_elem() local
74 if (!rcu_access_pointer(array->ptrs[index])) in reuseport_array_delete_elem()
79 sk = rcu_dereference_protected(array->ptrs[index], in reuseport_array_delete_elem()
84 RCU_INIT_POINTER(array->ptrs[index], NULL); in reuseport_array_delete_elem()
98 struct reuseport_array *array = reuseport_array(map); in reuseport_array_free() local
129 sk = rcu_dereference(array->ptrs[i]); in reuseport_array_free()
139 RCU_INIT_POINTER(array->ptrs[i], NULL); in reuseport_array_free()
148 bpf_map_area_free(array); in reuseport_array_free()
154 struct reuseport_array *array; in reuseport_array_alloc() local
160 array_size = sizeof(*array); in reuseport_array_alloc()
164 array = bpf_map_area_alloc(array_size, numa_node); in reuseport_array_alloc()
165 if (!array) in reuseport_array_alloc()
169 bpf_map_init_from_attr(&array->map, attr); in reuseport_array_alloc()
171 return &array->map; in reuseport_array_alloc()
197 reuseport_array_update_check(const struct reuseport_array *array, in reuseport_array_update_check() argument
244 struct reuseport_array *array = reuseport_array(map); in bpf_fd_reuseport_array_update_elem() local
279 err = reuseport_array_update_check(array, nsk, in bpf_fd_reuseport_array_update_elem()
280 rcu_access_pointer(array->ptrs[index]), in bpf_fd_reuseport_array_update_elem()
294 osk = rcu_dereference_protected(array->ptrs[index], in bpf_fd_reuseport_array_update_elem()
298 err = reuseport_array_update_check(array, nsk, osk, reuse, map_flags); in bpf_fd_reuseport_array_update_elem()
302 sk_user_data = (uintptr_t)&array->ptrs[index] | SK_USER_DATA_NOCOPY | in bpf_fd_reuseport_array_update_elem()
305 rcu_assign_pointer(array->ptrs[index], nsk); in bpf_fd_reuseport_array_update_elem()
328 struct reuseport_array *array = reuseport_array(map); in reuseport_array_get_next_key() local
332 if (index >= array->map.max_entries) { in reuseport_array_get_next_key()
337 if (index == array->map.max_entries - 1) in reuseport_array_get_next_key()