Lines Matching refs:obj

8 __u32 get_map_id(struct bpf_object *obj, const char *name)  in get_map_id()  argument
17 map = bpf_object__find_map_by_name(obj, name); in get_map_id()
38 struct bpf_object *obj; in test_pinning() local
46 obj = bpf_object__open_file(file_invalid, NULL); in test_pinning()
47 err = libbpf_get_error(obj); in test_pinning()
49 obj = NULL; in test_pinning()
54 obj = bpf_object__open_file(file, NULL); in test_pinning()
55 err = libbpf_get_error(obj); in test_pinning()
57 obj = NULL; in test_pinning()
61 err = bpf_object__load(obj); in test_pinning()
82 map_id = get_map_id(obj, "pinmap"); in test_pinning()
86 bpf_object__close(obj); in test_pinning()
88 obj = bpf_object__open_file(file, NULL); in test_pinning()
89 if (CHECK_FAIL(libbpf_get_error(obj))) { in test_pinning()
90 obj = NULL; in test_pinning()
94 err = bpf_object__load(obj); in test_pinning()
99 map_id2 = get_map_id(obj, "pinmap"); in test_pinning()
105 map = bpf_object__find_map_by_name(obj, "pinmap"); in test_pinning()
119 err = bpf_object__unpin_maps(obj, NULL); in test_pinning()
124 err = bpf_object__pin_maps(obj, NULL); in test_pinning()
133 map = bpf_object__find_map_by_name(obj, "nopinmap"); in test_pinning()
147 err = bpf_object__pin_maps(obj, NULL); in test_pinning()
165 bpf_object__close(obj); in test_pinning()
168 obj = bpf_object__open_file(file, NULL); in test_pinning()
169 err = libbpf_get_error(obj); in test_pinning()
171 obj = NULL; in test_pinning()
179 bpf_object__for_each_map(map, obj) { in test_pinning()
192 err = bpf_object__load(obj); in test_pinning()
207 bpf_object__close(obj); in test_pinning()
210 obj = bpf_object__open_file(file, &opts); in test_pinning()
211 if (CHECK_FAIL(libbpf_get_error(obj))) { in test_pinning()
212 obj = NULL; in test_pinning()
216 err = bpf_object__load(obj); in test_pinning()
234 bpf_object__close(obj); in test_pinning()
237 obj = bpf_object__open_file(file, NULL); in test_pinning()
238 err = libbpf_get_error(obj); in test_pinning()
240 obj = NULL; in test_pinning()
249 map = bpf_object__find_map_by_name(obj, "pinmap"); in test_pinning()
261 err = bpf_object__load(obj); in test_pinning()
278 if (obj) in test_pinning()
279 bpf_object__close(obj); in test_pinning()