Lines Matching refs:tattr
70 struct bpf_prog_test_run_attr tattr = { in test_xdp_adjust_tail_grow2() local
78 err = bpf_prog_load(file, BPF_PROG_TYPE_XDP, &obj, &tattr.prog_fd); in test_xdp_adjust_tail_grow2()
84 tattr.data_size_in = 64; /* Determine test case via pkt size */ in test_xdp_adjust_tail_grow2()
85 tattr.data_size_out = 128; /* Limit copy_size */ in test_xdp_adjust_tail_grow2()
87 err = bpf_prog_test_run_xattr(&tattr); in test_xdp_adjust_tail_grow2()
90 || tattr.retval != XDP_TX in test_xdp_adjust_tail_grow2()
91 || tattr.data_size_out != 192, /* Expected grow size */ in test_xdp_adjust_tail_grow2()
94 err, errno, tattr.retval, tattr.data_size_out); in test_xdp_adjust_tail_grow2()
97 CHECK_ATTR(tattr.data_size_out != 192 in test_xdp_adjust_tail_grow2()
103 err, errno, tattr.retval, tattr.data_size_out); in test_xdp_adjust_tail_grow2()
107 tattr.data_size_in = 128; /* Determine test case via pkt size */ in test_xdp_adjust_tail_grow2()
108 tattr.data_size_out = sizeof(buf); /* Copy everything */ in test_xdp_adjust_tail_grow2()
109 err = bpf_prog_test_run_xattr(&tattr); in test_xdp_adjust_tail_grow2()
113 || tattr.retval != XDP_TX in test_xdp_adjust_tail_grow2()
114 || tattr.data_size_out != max_grow,/* Expect max grow size */ in test_xdp_adjust_tail_grow2()
117 err, errno, tattr.retval, tattr.data_size_out, max_grow); in test_xdp_adjust_tail_grow2()
124 CHECK_ATTR((cnt != (max_grow - tattr.data_size_in)) /* Grow increase */ in test_xdp_adjust_tail_grow2()
125 || tattr.data_size_out != max_grow, /* Total grow size */ in test_xdp_adjust_tail_grow2()
128 err, errno, tattr.retval, tattr.data_size_out, cnt); in test_xdp_adjust_tail_grow2()