Home
last modified time | relevance | path

Searched refs:topts (Results 1 – 25 of 63) sorted by relevance

123

/linux/tools/testing/selftests/bpf/prog_tests/
H A Dxdp_adjust_tail.c12 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_xdp_adjust_tail_shrink()
24 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp_adjust_tail_shrink()
26 ASSERT_EQ(topts.retval, XDP_DROP, "ipv4 retval"); in test_xdp_adjust_tail_shrink()
29 topts.data_in = &pkt_v6; in test_xdp_adjust_tail_shrink()
30 topts.data_size_in = sizeof(pkt_v6); in test_xdp_adjust_tail_shrink()
31 topts.data_size_out = sizeof(buf); in test_xdp_adjust_tail_shrink()
32 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp_adjust_tail_shrink()
34 ASSERT_EQ(topts.retval, XDP_TX, "ipv6 retval"); in test_xdp_adjust_tail_shrink()
35 ASSERT_EQ(topts.data_size_out, expect_sz, "ipv6 size"); in test_xdp_adjust_tail_shrink()
47 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_xdp_adjust_tail_grow()
[all...]
H A Dxdp_adjust_frags.c14 LIBBPF_OPTS(bpf_test_run_opts, topts); in test_xdp_update_frags()
36 topts.data_in = buf; in test_xdp_update_frags()
37 topts.data_out = buf; in test_xdp_update_frags()
38 topts.data_size_in = 128; in test_xdp_update_frags()
39 topts.data_size_out = 128; in test_xdp_update_frags()
41 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp_update_frags()
45 ASSERT_EQ(topts.retval, XDP_PASS, "xdp_update_frag retval"); in test_xdp_update_frags()
61 topts.data_in = buf; in test_xdp_update_frags()
62 topts.data_out = buf; in test_xdp_update_frags()
63 topts in test_xdp_update_frags()
[all...]
H A Darena_atomics.c8 LIBBPF_OPTS(bpf_test_run_opts, topts); in test_add()
13 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_add()
16 if (!ASSERT_OK(topts.retval, "test_run_opts retval")) in test_add()
33 LIBBPF_OPTS(bpf_test_run_opts, topts); in test_sub()
38 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_sub()
41 if (!ASSERT_OK(topts.retval, "test_run_opts retval")) in test_sub()
58 LIBBPF_OPTS(bpf_test_run_opts, topts); in test_and()
63 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_and()
66 if (!ASSERT_OK(topts.retval, "test_run_opts retval")) in test_and()
75 LIBBPF_OPTS(bpf_test_run_opts, topts); in test_or()
[all...]
H A Dres_spin_lock.c20 LIBBPF_OPTS(bpf_test_run_opts, topts, in spin_lock_thread()
27 err = bpf_prog_test_run_opts(prog_fd, &topts); in spin_lock_thread()
28 if (err || topts.retval) { in spin_lock_thread()
30 ASSERT_OK(topts.retval, "test_run retval"); in spin_lock_thread()
39 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_res_spin_lock_success()
59 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_res_spin_lock_success()
61 ASSERT_OK(topts.retval, "retval"); in test_res_spin_lock_success()
64 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_res_spin_lock_success()
66 ASSERT_OK(topts.retval, "retval"); in test_res_spin_lock_success()
79 topts in test_res_spin_lock_success()
[all...]
H A Datomics.c10 LIBBPF_OPTS(bpf_test_run_opts, topts); in test_add()
14 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_add()
17 if (!ASSERT_OK(topts.retval, "test_run_opts retval")) in test_add()
35 LIBBPF_OPTS(bpf_test_run_opts, topts); in test_sub()
39 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_sub()
42 if (!ASSERT_OK(topts.retval, "test_run_opts retval")) in test_sub()
60 LIBBPF_OPTS(bpf_test_run_opts, topts); in test_and()
64 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_and()
67 if (!ASSERT_OK(topts.retval, "test_run_opts retval")) in test_and()
82 LIBBPF_OPTS(bpf_test_run_opts, topts); in test_or()
[all...]
H A Dkfunc_call.c93 LIBBPF_OPTS(bpf_test_run_opts, topts); in verify_success()
104 topts.ctx_in = &args; in verify_success()
105 topts.ctx_size_in = sizeof(args); in verify_success()
110 topts.data_in = &pkt_v4; in verify_success()
111 topts.data_size_in = sizeof(pkt_v4); in verify_success()
112 topts.repeat = 1; in verify_success()
126 err = bpf_prog_test_run_opts(prog_fd, &topts); in verify_success()
130 if (!ASSERT_EQ(topts.retval, param->retval, "retval")) in verify_success()
141 err = bpf_prog_test_run_opts(prog_fd, &topts); in verify_success()
145 ASSERT_EQ(topts in verify_success()
[all...]
H A Dprog_run_opts.c30 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_prog_run_opts()
48 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_prog_run_opts()
51 ASSERT_OK(topts.retval, "test_run retval"); in test_prog_run_opts()
53 ASSERT_EQ(topts.data_size_out, sizeof(pkt_v4), "test_run data_size_out"); in test_prog_run_opts()
56 run_cnt += topts.repeat; in test_prog_run_opts()
59 topts.data_out = NULL; in test_prog_run_opts()
60 topts.data_size_out = 0; in test_prog_run_opts()
61 topts.repeat = 2; in test_prog_run_opts()
64 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_prog_run_opts()
67 ASSERT_OK(topts in test_prog_run_opts()
[all...]
H A Dl4lb_all.c31 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_l4lb()
56 topts.data_in = &pkt_v4; in test_l4lb()
57 topts.data_size_in = sizeof(pkt_v4); in test_l4lb()
59 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_l4lb()
61 ASSERT_EQ(topts.retval, 7 /*TC_ACT_REDIRECT*/, "ipv4 test_run retval"); in test_l4lb()
62 ASSERT_EQ(topts.data_size_out, 54, "ipv4 test_run data_size_out"); in test_l4lb()
65 topts.data_in = &pkt_v6; in test_l4lb()
66 topts.data_size_in = sizeof(pkt_v6); in test_l4lb()
67 topts.data_size_out = sizeof(buf); /* reset out size */ in test_l4lb()
69 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_l4lb()
[all...]
H A Dxdp_noinline.c32 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_xdp_noinline()
48 err = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.balancer_ingress_v4), &topts); in test_xdp_noinline()
50 ASSERT_EQ(topts.retval, 1, "ipv4 test_run retval"); in test_xdp_noinline()
51 ASSERT_EQ(topts.data_size_out, 54, "ipv4 test_run data_size_out"); in test_xdp_noinline()
54 topts.data_in = &pkt_v6; in test_xdp_noinline()
55 topts.data_size_in = sizeof(pkt_v6); in test_xdp_noinline()
56 topts.data_out = buf; in test_xdp_noinline()
57 topts.data_size_out = sizeof(buf); in test_xdp_noinline()
59 err = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.balancer_ingress_v6), &topts); in test_xdp_noinline()
61 ASSERT_EQ(topts in test_xdp_noinline()
[all...]
H A Dpkt_access.c10 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_pkt_access()
20 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_pkt_access()
22 ASSERT_OK(topts.retval, "ipv4 test_run_opts retval"); in test_pkt_access()
24 topts.data_in = &pkt_v6; in test_pkt_access()
25 topts.data_size_in = sizeof(pkt_v6); in test_pkt_access()
26 topts.data_size_out = 0; /* reset from last call */ in test_pkt_access()
27 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_pkt_access()
29 ASSERT_OK(topts.retval, "ipv6 test_run_opts retval"); in test_pkt_access()
H A Dxdp.c17 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_xdp()
35 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp()
38 ASSERT_EQ(topts.retval, XDP_TX, "ipv4 test_run retval"); in test_xdp()
39 ASSERT_EQ(topts.data_size_out, 74, "ipv4 test_run data_size_out"); in test_xdp()
42 topts.data_in = &pkt_v6; in test_xdp()
43 topts.data_size_in = sizeof(pkt_v6); in test_xdp()
44 topts.data_size_out = sizeof(buf); in test_xdp()
46 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp()
49 ASSERT_EQ(topts.retval, XDP_TX, "ipv6 test_run retval"); in test_xdp()
50 ASSERT_EQ(topts in test_xdp()
[all...]
H A Dtailcalls.c24 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_tailcall_1()
68 err = bpf_prog_test_run_opts(main_fd, &topts); in test_tailcall_1()
70 ASSERT_EQ(topts.retval, i, "tailcall retval"); in test_tailcall_1()
77 err = bpf_prog_test_run_opts(main_fd, &topts); in test_tailcall_1()
79 ASSERT_EQ(topts.retval, 3, "tailcall retval"); in test_tailcall_1()
97 err = bpf_prog_test_run_opts(main_fd, &topts); in test_tailcall_1()
99 ASSERT_OK(topts.retval, "tailcall retval"); in test_tailcall_1()
121 err = bpf_prog_test_run_opts(main_fd, &topts); in test_tailcall_1()
123 ASSERT_EQ(topts.retval, j, "tailcall retval"); in test_tailcall_1()
130 err = bpf_prog_test_run_opts(main_fd, &topts); in test_tailcall_1()
[all...]
H A Dfor_each.c21 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_hash_map()
55 err = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_pkt_access), &topts); in test_hash_map()
56 duration = topts.duration; in test_hash_map()
57 if (CHECK(err || topts.retval, "ipv4", "err %d errno %d retval %d\n", in test_hash_map()
58 err, errno, topts.retval)) in test_hash_map()
87 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_array_map()
125 err = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_pkt_access), &topts); in test_array_map()
126 duration = topts.duration; in test_array_map()
127 if (CHECK(err || topts.retval, "ipv4", "err %d errno %d retval %d\n", in test_array_map()
128 err, errno, topts in test_array_map()
[all...]
H A Dksyms_module.c13 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_ksyms_module_lskel()
27 err = bpf_prog_test_run_opts(skel->progs.load.prog_fd, &topts); in test_ksyms_module_lskel()
30 ASSERT_EQ(topts.retval, 0, "retval"); in test_ksyms_module_lskel()
40 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_ksyms_module_libbpf()
54 err = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.load), &topts); in test_ksyms_module_libbpf()
57 ASSERT_EQ(topts.retval, 0, "retval"); in test_ksyms_module_libbpf()
H A Dpro_epilogue.c17 LIBBPF_OPTS(bpf_test_run_opts, topts); in test_tailcall()
26 topts.ctx_in = &args; in test_tailcall()
27 topts.ctx_size_in = sizeof(args); in test_tailcall()
45 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_tailcall()
48 ASSERT_EQ(topts.retval, 10001 * 2, "topts.retval"); in test_tailcall()
H A Dparse_tcp_hdr_opt.c35 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_parse_opt()
50 err = bpf_prog_test_run_opts(bpf_program__fd(prog), &topts); in test_parse_opt()
52 ASSERT_EQ(topts.retval, XDP_PASS, "ipv6 test_run retval"); in test_parse_opt()
65 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_parse_opt_dynptr()
80 err = bpf_prog_test_run_opts(bpf_program__fd(prog), &topts); in test_parse_opt_dynptr()
82 ASSERT_EQ(topts.retval, XDP_PASS, "ipv6 test_run retval"); in test_parse_opt_dynptr()
H A Dxdp_bpf2bpf.c50 LIBBPF_OPTS(bpf_test_run_opts, topts); in run_xdp_bpf2bpf_pkt_size()
76 topts.data_in = buf_in; in run_xdp_bpf2bpf_pkt_size()
77 topts.data_size_in = pkt_size; in run_xdp_bpf2bpf_pkt_size()
78 topts.data_out = buf; in run_xdp_bpf2bpf_pkt_size()
79 topts.data_size_out = BUF_SZ; in run_xdp_bpf2bpf_pkt_size()
81 err = bpf_prog_test_run_opts(pkt_fd, &topts); in run_xdp_bpf2bpf_pkt_size()
84 ASSERT_EQ(topts.retval, XDP_PASS, "ipv4 retval"); in run_xdp_bpf2bpf_pkt_size()
85 ASSERT_EQ(topts.data_size_out, pkt_size, "ipv4 size"); in run_xdp_bpf2bpf_pkt_size()
H A Dtimer.c12 LIBBPF_OPTS(bpf_test_run_opts, topts); in spin_lock_thread()
15 err = bpf_prog_test_run_opts(prog_fd, &topts); in spin_lock_thread()
17 !ASSERT_OK(topts.retval, "test_run_opts retval")) in spin_lock_thread()
27 LIBBPF_OPTS(bpf_test_run_opts, topts); in timer()
40 err = bpf_prog_test_run_opts(prog_fd, &topts); in timer()
42 ASSERT_EQ(topts.retval, 0, "test_run"); in timer()
H A Dtype_cast.c13 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_xdp()
31 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp()
33 ASSERT_EQ(topts.retval, XDP_PASS, "xdp test_run retval"); in test_xdp()
49 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_tc()
65 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_tc()
67 ASSERT_EQ(topts.retval, 0, "tc test_run retval"); in test_tc()
H A Dxdp_perf.c10 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_xdp_perf()
22 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp_perf()
24 ASSERT_EQ(topts.retval, XDP_PASS, "test_run retval"); in test_xdp_perf()
25 ASSERT_EQ(topts.data_size_out, 128, "test_run data_size_out"); in test_xdp_perf()
H A Dglobal_data.c137 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_global_data()
147 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_global_data()
149 ASSERT_OK(topts.retval, "pass global data run retval"); in test_global_data()
151 test_global_data_number(obj, topts.duration); in test_global_data()
152 test_global_data_string(obj, topts.duration); in test_global_data()
153 test_global_data_struct(obj, topts.duration); in test_global_data()
154 test_global_data_rdonly(obj, topts.duration); in test_global_data()
H A Dflow_dissector_load_bytes.c29 LIBBPF_OPTS(bpf_test_run_opts, topts, in serial_test_flow_dissector_load_bytes()
43 err = bpf_prog_test_run_opts(fd, &topts); in serial_test_flow_dissector_load_bytes()
45 ASSERT_EQ(topts.data_size_out, sizeof(flow_keys), in serial_test_flow_dissector_load_bytes()
47 ASSERT_EQ(topts.retval, BPF_OK, "test_run retval"); in serial_test_flow_dissector_load_bytes()
H A Dprepare.c25 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_prepare_no_load()
53 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_prepare_load()
80 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_prepare_load()
84 if (!ASSERT_OK(topts.retval, "test_run_opts retval")) in test_prepare_load()
H A Dpkt_md_access.c10 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_pkt_md_access()
20 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_pkt_md_access()
22 ASSERT_OK(topts.retval, "test_run_opts retval"); in test_pkt_md_access()
H A Dcgroup_skb_direct_packet_access.c12 LIBBPF_OPTS(bpf_test_run_opts, topts, in test_cgroup_skb_prog_run_direct_packet_access()
21 err = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.direct_packet_access), &topts); in test_cgroup_skb_prog_run_direct_packet_access()
23 ASSERT_EQ(topts.retval, 1, "retval"); in test_cgroup_skb_prog_run_direct_packet_access()

123