Lines Matching refs:instances
188 } instances; member
262 if (prog->instances.nr > 0) { in bpf_program__unload()
263 for (i = 0; i < prog->instances.nr; i++) in bpf_program__unload()
264 zclose(prog->instances.fds[i]); in bpf_program__unload()
265 } else if (prog->instances.nr != -1) { in bpf_program__unload()
267 prog->instances.nr); in bpf_program__unload()
270 prog->instances.nr = -1; in bpf_program__unload()
271 zfree(&prog->instances.fds); in bpf_program__unload()
322 prog->instances.fds = NULL; in bpf_program__init()
323 prog->instances.nr = -1; in bpf_program__init()
1075 if (prog->instances.nr < 0 || !prog->instances.fds) { in bpf_program__load()
1082 prog->instances.fds = malloc(sizeof(int)); in bpf_program__load()
1083 if (!prog->instances.fds) { in bpf_program__load()
1087 prog->instances.nr = 1; in bpf_program__load()
1088 prog->instances.fds[0] = -1; in bpf_program__load()
1092 if (prog->instances.nr != 1) { in bpf_program__load()
1094 prog->section_name, prog->instances.nr); in bpf_program__load()
1099 prog->instances.fds[0] = fd; in bpf_program__load()
1103 for (i = 0; i < prog->instances.nr; i++) { in bpf_program__load()
1119 prog->instances.fds[i] = -1; in bpf_program__load()
1137 prog->instances.fds[i] = fd; in bpf_program__load()
1319 if (instance < 0 || instance >= prog->instances.nr) { in bpf_program__pin_instance()
1321 instance, prog->section_name, prog->instances.nr); in bpf_program__pin_instance()
1325 if (bpf_obj_pin(prog->instances.fds[instance], path)) { in bpf_program__pin_instance()
1359 if (prog->instances.nr <= 0) { in bpf_program__pin()
1369 for (i = 0; i < prog->instances.nr; i++) { in bpf_program__pin()
1608 if (prog->instances.nr > 0 || prog->instances.fds) { in bpf_program__set_prep()
1622 prog->instances.nr = nr_instances; in bpf_program__set_prep()
1623 prog->instances.fds = instances_fds; in bpf_program__set_prep()
1632 if (n >= prog->instances.nr || n < 0) { in bpf_program__nth_fd()
1634 n, prog->section_name, prog->instances.nr); in bpf_program__nth_fd()
1638 fd = prog->instances.fds[n]; in bpf_program__nth_fd()