Lines Matching refs:key

22 static bool assert_storage(struct bpf_map *map, const void *key,  in assert_storage()  argument
30 if (CHECK(bpf_map_lookup_elem(map_fd, key, &value) < 0, in assert_storage()
40 static bool assert_storage_noexist(struct bpf_map *map, const void *key) in assert_storage_noexist() argument
47 if (CHECK(bpf_map_lookup_elem(map_fd, key, &value) == 0, in assert_storage_noexist()
92 struct bpf_cgroup_storage_key key; in test_egress_only() local
96 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_egress_only()
117 key.cgroup_inode_id = get_cgroup_id(PARENT_CGROUP); in test_egress_only()
120 &key, &expected_cgroup_value)) in test_egress_only()
122 key.cgroup_inode_id = get_cgroup_id(CHILD_CGROUP); in test_egress_only()
123 if (assert_storage_noexist(obj->maps.cgroup_storage, &key)) in test_egress_only()
140 key.cgroup_inode_id = get_cgroup_id(PARENT_CGROUP); in test_egress_only()
143 &key, &expected_cgroup_value)) in test_egress_only()
145 key.cgroup_inode_id = get_cgroup_id(CHILD_CGROUP); in test_egress_only()
148 &key, &expected_cgroup_value)) in test_egress_only()
162 struct bpf_cgroup_storage_key key; in test_isolated() local
195 key.cgroup_inode_id = get_cgroup_id(PARENT_CGROUP); in test_isolated()
196 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
199 &key, &expected_cgroup_value)) in test_isolated()
201 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
204 &key, &expected_cgroup_value)) in test_isolated()
206 key.cgroup_inode_id = get_cgroup_id(CHILD_CGROUP); in test_isolated()
207 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
208 if (assert_storage_noexist(obj->maps.cgroup_storage, &key)) in test_isolated()
210 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
211 if (assert_storage_noexist(obj->maps.cgroup_storage, &key)) in test_isolated()
237 key.cgroup_inode_id = get_cgroup_id(PARENT_CGROUP); in test_isolated()
238 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
241 &key, &expected_cgroup_value)) in test_isolated()
243 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
246 &key, &expected_cgroup_value)) in test_isolated()
248 key.cgroup_inode_id = get_cgroup_id(CHILD_CGROUP); in test_isolated()
249 key.attach_type = BPF_CGROUP_INET_EGRESS; in test_isolated()
252 &key, &expected_cgroup_value)) in test_isolated()
254 key.attach_type = BPF_CGROUP_INET_INGRESS; in test_isolated()
257 &key, &expected_cgroup_value)) in test_isolated()
275 __u64 key; in test_shared() local
308 key = get_cgroup_id(PARENT_CGROUP); in test_shared()
314 &key, &expected_cgroup_value)) in test_shared()
316 key = get_cgroup_id(CHILD_CGROUP); in test_shared()
317 if (assert_storage_noexist(obj->maps.cgroup_storage, &key)) in test_shared()
342 key = get_cgroup_id(PARENT_CGROUP); in test_shared()
348 &key, &expected_cgroup_value)) in test_shared()
350 key = get_cgroup_id(CHILD_CGROUP); in test_shared()
356 &key, &expected_cgroup_value)) in test_shared()