Lines Matching refs:attr
166 union bpf_attr *attr; in update_outer_map() local
168 attr = bpf_map_lookup_elem((struct bpf_map *)&bpf_attr_array, &zero); in update_outer_map()
169 if (!attr) in update_outer_map()
172 memset(attr, 0, attr_sz); in update_outer_map()
173 attr->map_id = ((struct bpf_map *)&outer_array_map)->id; in update_outer_map()
174 outer_fd = bpf_sys_bpf(BPF_MAP_GET_FD_BY_ID, attr, attr_sz); in update_outer_map()
178 memset(attr, 0, attr_sz); in update_outer_map()
179 attr->map_type = BPF_MAP_TYPE_ARRAY; in update_outer_map()
180 attr->key_size = 4; in update_outer_map()
181 attr->value_size = 4; in update_outer_map()
182 attr->max_entries = 1; in update_outer_map()
183 inner_fd = bpf_sys_bpf(BPF_MAP_CREATE, attr, attr_sz); in update_outer_map()
187 memset(attr, 0, attr_sz); in update_outer_map()
188 attr->map_fd = outer_fd; in update_outer_map()
189 attr->key = ptr_to_u64(&zero); in update_outer_map()
190 attr->value = ptr_to_u64(&inner_fd); in update_outer_map()
191 err = bpf_sys_bpf(BPF_MAP_UPDATE_ELEM, attr, attr_sz); in update_outer_map()
195 memset(attr, 0, attr_sz); in update_outer_map()
196 attr->map_fd = outer_fd; in update_outer_map()
197 attr->key = ptr_to_u64(&zero); in update_outer_map()
198 err = bpf_sys_bpf(BPF_MAP_DELETE_ELEM, attr, attr_sz); in update_outer_map()