Lines Matching refs:topts
12 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()
59 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp_adjust_tail_grow()
61 ASSERT_EQ(topts.retval, XDP_DROP, "ipv4 retval"); in test_xdp_adjust_tail_grow()
64 topts.data_in = &pkt_v6; in test_xdp_adjust_tail_grow()
65 topts.data_size_in = sizeof(pkt_v6); in test_xdp_adjust_tail_grow()
66 topts.data_size_out = sizeof(buf); in test_xdp_adjust_tail_grow()
67 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp_adjust_tail_grow()
69 ASSERT_EQ(topts.retval, XDP_TX, "ipv6 retval"); in test_xdp_adjust_tail_grow()
70 ASSERT_EQ(topts.data_size_out, expect_sz, "ipv6 size"); in test_xdp_adjust_tail_grow()
150 LIBBPF_OPTS(bpf_test_run_opts, topts); in test_xdp_adjust_frags_tail_shrink()
173 topts.data_in = buf; in test_xdp_adjust_frags_tail_shrink()
174 topts.data_out = buf; in test_xdp_adjust_frags_tail_shrink()
175 topts.data_size_in = 9000; in test_xdp_adjust_frags_tail_shrink()
176 topts.data_size_out = 9000; in test_xdp_adjust_frags_tail_shrink()
177 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp_adjust_frags_tail_shrink()
180 ASSERT_EQ(topts.retval, XDP_TX, "9Kb-10b retval"); in test_xdp_adjust_frags_tail_shrink()
181 ASSERT_EQ(topts.data_size_out, exp_size, "9Kb-10b size"); in test_xdp_adjust_frags_tail_shrink()
187 topts.data_size_out = 9000; /* reset from previous invocation */ in test_xdp_adjust_frags_tail_shrink()
188 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp_adjust_frags_tail_shrink()
191 ASSERT_EQ(topts.retval, XDP_TX, "9Kb-4Kb retval"); in test_xdp_adjust_frags_tail_shrink()
192 ASSERT_EQ(topts.data_size_out, exp_size, "9Kb-4Kb size"); in test_xdp_adjust_frags_tail_shrink()
197 topts.data_size_out = 9000; /* reset from previous invocation */ in test_xdp_adjust_frags_tail_shrink()
198 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp_adjust_frags_tail_shrink()
201 ASSERT_EQ(topts.retval, XDP_TX, "9Kb-9Kb retval"); in test_xdp_adjust_frags_tail_shrink()
202 ASSERT_EQ(topts.data_size_out, exp_size, "9Kb-9Kb size"); in test_xdp_adjust_frags_tail_shrink()
217 LIBBPF_OPTS(bpf_test_run_opts, topts); in test_xdp_adjust_frags_tail_grow()
237 topts.data_in = buf; in test_xdp_adjust_frags_tail_grow()
238 topts.data_out = buf; in test_xdp_adjust_frags_tail_grow()
239 topts.data_size_in = 9000; in test_xdp_adjust_frags_tail_grow()
240 topts.data_size_out = 16384; in test_xdp_adjust_frags_tail_grow()
241 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp_adjust_frags_tail_grow()
244 ASSERT_EQ(topts.retval, XDP_TX, "9Kb+10b retval"); in test_xdp_adjust_frags_tail_grow()
245 ASSERT_EQ(topts.data_size_out, exp_size, "9Kb+10b size"); in test_xdp_adjust_frags_tail_grow()
260 topts.data_in = topts.data_out = buf; in test_xdp_adjust_frags_tail_grow()
261 topts.data_size_in = 9001; in test_xdp_adjust_frags_tail_grow()
262 topts.data_size_out = 16384; in test_xdp_adjust_frags_tail_grow()
263 err = bpf_prog_test_run_opts(prog_fd, &topts); in test_xdp_adjust_frags_tail_grow()
266 ASSERT_EQ(topts.retval, XDP_DROP, "9Kb+10b retval"); in test_xdp_adjust_frags_tail_grow()
267 ASSERT_EQ(topts.data_size_out, exp_size, "9Kb+10b size"); in test_xdp_adjust_frags_tail_grow()