• Home
  • Raw
  • Download

Lines Matching refs:err

11 	int err, map_fd, prog_fd, main_fd, i, j;  in test_tailcall_1()  local
19 err = bpf_prog_load("tailcall1.o", BPF_PROG_TYPE_SCHED_CLS, &obj, in test_tailcall_1()
21 if (CHECK_FAIL(err)) in test_tailcall_1()
51 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_1()
52 if (CHECK_FAIL(err)) in test_tailcall_1()
57 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_1()
59 CHECK(err || retval != i, "tailcall", in test_tailcall_1()
60 "err %d errno %d retval %d\n", err, errno, retval); in test_tailcall_1()
62 err = bpf_map_delete_elem(map_fd, &i); in test_tailcall_1()
63 if (CHECK_FAIL(err)) in test_tailcall_1()
67 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_1()
69 CHECK(err || retval != 3, "tailcall", "err %d errno %d retval %d\n", in test_tailcall_1()
70 err, errno, retval); in test_tailcall_1()
83 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_1()
84 if (CHECK_FAIL(err)) in test_tailcall_1()
88 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_1()
90 CHECK(err || retval != 0, "tailcall", "err %d errno %d retval %d\n", in test_tailcall_1()
91 err, errno, retval); in test_tailcall_1()
105 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_1()
106 if (CHECK_FAIL(err)) in test_tailcall_1()
113 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_1()
115 CHECK(err || retval != j, "tailcall", in test_tailcall_1()
116 "err %d errno %d retval %d\n", err, errno, retval); in test_tailcall_1()
118 err = bpf_map_delete_elem(map_fd, &i); in test_tailcall_1()
119 if (CHECK_FAIL(err)) in test_tailcall_1()
123 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_1()
125 CHECK(err || retval != 3, "tailcall", "err %d errno %d retval %d\n", in test_tailcall_1()
126 err, errno, retval); in test_tailcall_1()
129 err = bpf_map_delete_elem(map_fd, &i); in test_tailcall_1()
130 if (CHECK_FAIL(err >= 0 || errno != ENOENT)) in test_tailcall_1()
133 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_1()
135 CHECK(err || retval != 3, "tailcall", in test_tailcall_1()
136 "err %d errno %d retval %d\n", err, errno, retval); in test_tailcall_1()
149 int err, map_fd, prog_fd, main_fd, i; in test_tailcall_2() local
157 err = bpf_prog_load("tailcall2.o", BPF_PROG_TYPE_SCHED_CLS, &obj, in test_tailcall_2()
159 if (CHECK_FAIL(err)) in test_tailcall_2()
189 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_2()
190 if (CHECK_FAIL(err)) in test_tailcall_2()
194 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_2()
196 CHECK(err || retval != 2, "tailcall", "err %d errno %d retval %d\n", in test_tailcall_2()
197 err, errno, retval); in test_tailcall_2()
200 err = bpf_map_delete_elem(map_fd, &i); in test_tailcall_2()
201 if (CHECK_FAIL(err)) in test_tailcall_2()
204 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_2()
206 CHECK(err || retval != 1, "tailcall", "err %d errno %d retval %d\n", in test_tailcall_2()
207 err, errno, retval); in test_tailcall_2()
210 err = bpf_map_delete_elem(map_fd, &i); in test_tailcall_2()
211 if (CHECK_FAIL(err)) in test_tailcall_2()
214 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_2()
216 CHECK(err || retval != 3, "tailcall", "err %d errno %d retval %d\n", in test_tailcall_2()
217 err, errno, retval); in test_tailcall_2()
227 int err, map_fd, prog_fd, main_fd, data_fd, i, val; in test_tailcall_3() local
234 err = bpf_prog_load("tailcall3.o", BPF_PROG_TYPE_SCHED_CLS, &obj, in test_tailcall_3()
236 if (CHECK_FAIL(err)) in test_tailcall_3()
264 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_3()
265 if (CHECK_FAIL(err)) in test_tailcall_3()
268 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_3()
270 CHECK(err || retval != 1, "tailcall", "err %d errno %d retval %d\n", in test_tailcall_3()
271 err, errno, retval); in test_tailcall_3()
282 err = bpf_map_lookup_elem(data_fd, &i, &val); in test_tailcall_3()
283 CHECK(err || val != 33, "tailcall count", "err %d errno %d count %d\n", in test_tailcall_3()
284 err, errno, val); in test_tailcall_3()
287 err = bpf_map_delete_elem(map_fd, &i); in test_tailcall_3()
288 if (CHECK_FAIL(err)) in test_tailcall_3()
291 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_3()
293 CHECK(err || retval != 0, "tailcall", "err %d errno %d retval %d\n", in test_tailcall_3()
294 err, errno, retval); in test_tailcall_3()
305 int err, map_fd, prog_fd, main_fd, data_fd, i; in test_tailcall_4() local
314 err = bpf_prog_load("tailcall4.o", BPF_PROG_TYPE_SCHED_CLS, &obj, in test_tailcall_4()
316 if (CHECK_FAIL(err)) in test_tailcall_4()
354 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_4()
355 if (CHECK_FAIL(err)) in test_tailcall_4()
360 err = bpf_map_update_elem(data_fd, &zero, &i, BPF_ANY); in test_tailcall_4()
361 if (CHECK_FAIL(err)) in test_tailcall_4()
364 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_4()
366 CHECK(err || retval != i, "tailcall", in test_tailcall_4()
367 "err %d errno %d retval %d\n", err, errno, retval); in test_tailcall_4()
371 err = bpf_map_update_elem(data_fd, &zero, &i, BPF_ANY); in test_tailcall_4()
372 if (CHECK_FAIL(err)) in test_tailcall_4()
375 err = bpf_map_delete_elem(map_fd, &i); in test_tailcall_4()
376 if (CHECK_FAIL(err)) in test_tailcall_4()
379 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_4()
381 CHECK(err || retval != 3, "tailcall", in test_tailcall_4()
382 "err %d errno %d retval %d\n", err, errno, retval); in test_tailcall_4()
393 int err, map_fd, prog_fd, main_fd, data_fd, i, key[] = { 1111, 1234, 5678 }; in test_tailcall_5() local
402 err = bpf_prog_load("tailcall5.o", BPF_PROG_TYPE_SCHED_CLS, &obj, in test_tailcall_5()
404 if (CHECK_FAIL(err)) in test_tailcall_5()
442 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_5()
443 if (CHECK_FAIL(err)) in test_tailcall_5()
448 err = bpf_map_update_elem(data_fd, &zero, &key[i], BPF_ANY); in test_tailcall_5()
449 if (CHECK_FAIL(err)) in test_tailcall_5()
452 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_5()
454 CHECK(err || retval != i, "tailcall", in test_tailcall_5()
455 "err %d errno %d retval %d\n", err, errno, retval); in test_tailcall_5()
459 err = bpf_map_update_elem(data_fd, &zero, &key[i], BPF_ANY); in test_tailcall_5()
460 if (CHECK_FAIL(err)) in test_tailcall_5()
463 err = bpf_map_delete_elem(map_fd, &i); in test_tailcall_5()
464 if (CHECK_FAIL(err)) in test_tailcall_5()
467 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_5()
469 CHECK(err || retval != 3, "tailcall", in test_tailcall_5()
470 "err %d errno %d retval %d\n", err, errno, retval); in test_tailcall_5()
481 int err, map_fd, prog_fd, main_fd, i; in test_tailcall_bpf2bpf_1() local
488 err = bpf_prog_load("tailcall_bpf2bpf1.o", BPF_PROG_TYPE_SCHED_CLS, in test_tailcall_bpf2bpf_1()
490 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_1()
521 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_bpf2bpf_1()
522 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_1()
526 err = bpf_prog_test_run(main_fd, 1, &pkt_v4, sizeof(pkt_v4), 0, in test_tailcall_bpf2bpf_1()
528 CHECK(err || retval != 1, "tailcall", in test_tailcall_bpf2bpf_1()
529 "err %d errno %d retval %d\n", err, errno, retval); in test_tailcall_bpf2bpf_1()
533 err = bpf_map_delete_elem(map_fd, &i); in test_tailcall_bpf2bpf_1()
534 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_1()
537 err = bpf_prog_test_run(main_fd, 1, &pkt_v4, sizeof(pkt_v4), 0, in test_tailcall_bpf2bpf_1()
539 CHECK(err || retval != 0, "tailcall", "err %d errno %d retval %d\n", in test_tailcall_bpf2bpf_1()
540 err, errno, retval); in test_tailcall_bpf2bpf_1()
546 err = bpf_map_delete_elem(map_fd, &i); in test_tailcall_bpf2bpf_1()
547 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_1()
550 err = bpf_prog_test_run(main_fd, 1, &pkt_v4, sizeof(pkt_v4), 0, in test_tailcall_bpf2bpf_1()
552 CHECK(err || retval != sizeof(pkt_v4) * 2, in test_tailcall_bpf2bpf_1()
554 err, errno, retval); in test_tailcall_bpf2bpf_1()
565 int err, map_fd, prog_fd, main_fd, data_fd, i, val; in test_tailcall_bpf2bpf_2() local
572 err = bpf_prog_load("tailcall_bpf2bpf2.o", BPF_PROG_TYPE_SCHED_CLS, in test_tailcall_bpf2bpf_2()
574 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_2()
602 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_bpf2bpf_2()
603 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_2()
606 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_bpf2bpf_2()
608 CHECK(err || retval != 1, "tailcall", "err %d errno %d retval %d\n", in test_tailcall_bpf2bpf_2()
609 err, errno, retval); in test_tailcall_bpf2bpf_2()
620 err = bpf_map_lookup_elem(data_fd, &i, &val); in test_tailcall_bpf2bpf_2()
621 CHECK(err || val != 33, "tailcall count", "err %d errno %d count %d\n", in test_tailcall_bpf2bpf_2()
622 err, errno, val); in test_tailcall_bpf2bpf_2()
625 err = bpf_map_delete_elem(map_fd, &i); in test_tailcall_bpf2bpf_2()
626 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_2()
629 err = bpf_prog_test_run(main_fd, 1, buff, sizeof(buff), 0, in test_tailcall_bpf2bpf_2()
631 CHECK(err || retval != 0, "tailcall", "err %d errno %d retval %d\n", in test_tailcall_bpf2bpf_2()
632 err, errno, retval); in test_tailcall_bpf2bpf_2()
643 int err, map_fd, prog_fd, main_fd, i; in test_tailcall_bpf2bpf_3() local
650 err = bpf_prog_load("tailcall_bpf2bpf3.o", BPF_PROG_TYPE_SCHED_CLS, in test_tailcall_bpf2bpf_3()
652 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_3()
682 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_bpf2bpf_3()
683 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_3()
687 err = bpf_prog_test_run(main_fd, 1, &pkt_v4, sizeof(pkt_v4), 0, in test_tailcall_bpf2bpf_3()
689 CHECK(err || retval != sizeof(pkt_v4) * 3, in test_tailcall_bpf2bpf_3()
691 err, errno, retval); in test_tailcall_bpf2bpf_3()
694 err = bpf_map_delete_elem(map_fd, &i); in test_tailcall_bpf2bpf_3()
695 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_3()
698 err = bpf_prog_test_run(main_fd, 1, &pkt_v4, sizeof(pkt_v4), 0, in test_tailcall_bpf2bpf_3()
700 CHECK(err || retval != sizeof(pkt_v4), in test_tailcall_bpf2bpf_3()
702 err, errno, retval); in test_tailcall_bpf2bpf_3()
705 err = bpf_map_delete_elem(map_fd, &i); in test_tailcall_bpf2bpf_3()
706 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_3()
709 err = bpf_prog_test_run(main_fd, 1, &pkt_v4, sizeof(pkt_v4), 0, in test_tailcall_bpf2bpf_3()
711 CHECK(err || retval != sizeof(pkt_v4) * 2, in test_tailcall_bpf2bpf_3()
713 err, errno, retval); in test_tailcall_bpf2bpf_3()
739 int err, map_fd, prog_fd, main_fd, data_fd, i; in test_tailcall_bpf2bpf_4() local
747 err = bpf_prog_load("tailcall_bpf2bpf4.o", BPF_PROG_TYPE_SCHED_CLS, in test_tailcall_bpf2bpf_4()
749 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_4()
779 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_bpf2bpf_4()
780 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_4()
795 err = bpf_map_update_elem(data_fd, &i, &val, BPF_ANY); in test_tailcall_bpf2bpf_4()
796 if (CHECK_FAIL(err)) in test_tailcall_bpf2bpf_4()
799 err = bpf_prog_test_run(main_fd, 1, &pkt_v4, sizeof(pkt_v4), 0, in test_tailcall_bpf2bpf_4()
801 CHECK(err || retval != sizeof(pkt_v4) * 3, "tailcall", "err %d errno %d retval %d\n", in test_tailcall_bpf2bpf_4()
802 err, errno, retval); in test_tailcall_bpf2bpf_4()
805 err = bpf_map_lookup_elem(data_fd, &i, &val); in test_tailcall_bpf2bpf_4()
806 CHECK(err || val.count != 31, "tailcall count", "err %d errno %d count %d\n", in test_tailcall_bpf2bpf_4()
807 err, errno, val.count); in test_tailcall_bpf2bpf_4()