Home
last modified time | relevance | path

Searched refs:tattr (Results 1 - 23 of 23) sorted by relevance

/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/
H A Dxdp_adjust_tail.c70 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 in test_xdp_adjust_tail_grow2()
[all...]
H A Dprog_run_xattr.c11 struct bpf_prog_test_run_attr tattr = { in test_prog_run_xattr() local
20 &tattr.prog_fd); in test_prog_run_xattr()
26 err = bpf_prog_test_run_xattr(&tattr); in test_prog_run_xattr()
27 CHECK_ATTR(err != -1 || errno != ENOSPC || tattr.retval, "run", in test_prog_run_xattr()
28 "err %d errno %d retval %d\n", err, errno, tattr.retval); in test_prog_run_xattr()
30 CHECK_ATTR(tattr.data_size_out != sizeof(pkt_v4), "data_size_out", in test_prog_run_xattr()
32 sizeof(pkt_v4), tattr.data_size_out); in test_prog_run_xattr()
37 tattr.data_out = NULL; in test_prog_run_xattr()
38 tattr.data_size_out = 0; in test_prog_run_xattr()
41 err = bpf_prog_test_run_xattr(&tattr); in test_prog_run_xattr()
[all...]
H A Dskb_ctx.c21 struct bpf_prog_test_run_attr tattr = { in test_skb_ctx() local
34 &tattr.prog_fd); in test_skb_ctx()
40 tattr.ctx_size_in = 0; in test_skb_ctx()
41 err = bpf_prog_test_run_xattr(&tattr); in test_skb_ctx()
43 tattr.ctx_size_in = sizeof(skb); in test_skb_ctx()
47 tattr.ctx_size_out = 0; in test_skb_ctx()
48 err = bpf_prog_test_run_xattr(&tattr); in test_skb_ctx()
50 tattr.ctx_size_out = sizeof(skb); in test_skb_ctx()
55 err = bpf_prog_test_run_xattr(&tattr); in test_skb_ctx()
60 err = bpf_prog_test_run_xattr(&tattr); in test_skb_ctx()
[all...]
H A Dcls_redirect.c164 static bool was_decapsulated(struct bpf_prog_test_run_attr *tattr) in was_decapsulated() argument
166 return tattr->data_size_out < tattr->data_size_in; in was_decapsulated()
370 struct bpf_prog_test_run_attr tattr = {}; in test_cls_redirect_common() local
397 tattr.prog_fd = bpf_program__fd(prog); in test_cls_redirect_common()
410 tattr.data_out = tmp; in test_cls_redirect_common()
411 tattr.data_size_out = sizeof(tmp); in test_cls_redirect_common()
413 tattr.data_in = input; in test_cls_redirect_common()
414 tattr.data_size_in = build_input(test, input, tuple); in test_cls_redirect_common()
415 if (CHECK_FAIL(!tattr in test_cls_redirect_common()
[all...]
H A Dkfree_skb.c54 struct bpf_prog_test_run_attr tattr = { in test_kfree_skb() local
77 &obj, &tattr.prog_fd); in test_kfree_skb()
123 err = bpf_prog_test_run_xattr(&tattr); in test_kfree_skb()
124 duration = tattr.duration; in test_kfree_skb()
125 CHECK(err || tattr.retval, "ipv6", in test_kfree_skb()
127 err, errno, tattr.retval, duration); in test_kfree_skb()
H A Dskb_helpers.c12 struct bpf_prog_test_run_attr tattr = { in test_skb_helpers() local
24 &tattr.prog_fd); in test_skb_helpers()
27 err = bpf_prog_test_run_xattr(&tattr); in test_skb_helpers()
H A Dflow_dissector.c490 struct bpf_prog_test_run_attr tattr = {}; in run_tests_skb_less() local
576 struct bpf_prog_test_run_attr tattr = { in test_flow_dissector() local
585 tattr.ctx_in = &ctx; in test_flow_dissector()
586 tattr.ctx_size_in = sizeof(ctx); in test_flow_dissector()
590 err = bpf_prog_test_run_xattr(&tattr); in test_flow_dissector()
591 CHECK_ATTR(tattr.data_size_out != sizeof(flow_keys) || in test_flow_dissector()
592 err || tattr.retval != 1, in test_flow_dissector()
595 err, errno, tattr.retval, tattr.duration, in test_flow_dissector()
596 tattr in test_flow_dissector()
[all...]
H A Dsockmap_basic.c141 struct bpf_prog_test_run_attr tattr; in test_sockmap_update() local
168 tattr = (struct bpf_prog_test_run_attr){ in test_sockmap_update()
175 err = bpf_prog_test_run_xattr(&tattr); in test_sockmap_update()
176 if (CHECK_ATTR(err || !tattr.retval, "bpf_prog_test_run", in test_sockmap_update()
177 "errno=%u retval=%u\n", errno, tattr.retval)) in test_sockmap_update()
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/
H A Dskb_ctx.c23 LIBBPF_OPTS(bpf_test_run_opts, tattr, in test_skb_ctx()
41 tattr.ctx_size_in = 0; in test_skb_ctx()
42 err = bpf_prog_test_run_opts(prog_fd, &tattr); in test_skb_ctx()
44 tattr.ctx_size_in = sizeof(skb); in test_skb_ctx()
48 tattr.ctx_size_out = 0; in test_skb_ctx()
49 err = bpf_prog_test_run_opts(prog_fd, &tattr); in test_skb_ctx()
51 tattr.ctx_size_out = sizeof(skb); in test_skb_ctx()
56 err = bpf_prog_test_run_opts(prog_fd, &tattr); in test_skb_ctx()
61 err = bpf_prog_test_run_opts(prog_fd, &tattr); in test_skb_ctx()
68 err = bpf_prog_test_run_opts(prog_fd, &tattr); in test_skb_ctx()
[all...]
H A Dxdp_adjust_tail.c89 LIBBPF_OPTS(bpf_test_run_opts, tattr, in test_xdp_adjust_tail_grow2()
103 tattr.data_size_in = 64; /* Determine test case via pkt size */ in test_xdp_adjust_tail_grow2()
104 tattr.data_size_out = 128; /* Limit copy_size */ in test_xdp_adjust_tail_grow2()
106 err = bpf_prog_test_run_opts(prog_fd, &tattr); in test_xdp_adjust_tail_grow2()
109 ASSERT_EQ(tattr.retval, XDP_TX, "case-64 retval"); in test_xdp_adjust_tail_grow2()
110 ASSERT_EQ(tattr.data_size_out, 192, "case-64 data_size_out"); /* Expected grow size */ in test_xdp_adjust_tail_grow2()
122 tattr.data_size_in = 128; /* Determine test case via pkt size */ in test_xdp_adjust_tail_grow2()
123 tattr.data_size_out = sizeof(buf); /* Copy everything */ in test_xdp_adjust_tail_grow2()
124 err = bpf_prog_test_run_opts(prog_fd, &tattr); in test_xdp_adjust_tail_grow2()
128 ASSERT_EQ(tattr in test_xdp_adjust_tail_grow2()
[all...]
H A Dcls_redirect.c165 static bool was_decapsulated(struct bpf_test_run_opts *tattr) in was_decapsulated() argument
167 return tattr->data_size_out < tattr->data_size_in; in was_decapsulated()
371 LIBBPF_OPTS(bpf_test_run_opts, tattr); in test_cls_redirect_common()
411 tattr.data_out = tmp; in test_cls_redirect_common()
412 tattr.data_size_out = sizeof(tmp); in test_cls_redirect_common()
414 tattr.data_in = input; in test_cls_redirect_common()
415 tattr.data_size_in = build_input(test, input, tuple); in test_cls_redirect_common()
416 if (CHECK_FAIL(!tattr.data_size_in)) in test_cls_redirect_common()
419 err = bpf_prog_test_run_opts(prog_fd, &tattr); in test_cls_redirect_common()
[all...]
H A Dempty_skb.c9 LIBBPF_OPTS(bpf_test_run_opts, tattr); in test_empty_skb()
122 tattr.data_in = tests[i].data_in; in test_empty_skb()
123 tattr.data_size_in = tests[i].data_size_in; in test_empty_skb()
125 tattr.data_size_out = 0; in test_empty_skb()
128 err = bpf_prog_test_run_opts(bpf_program__fd(prog), &tattr); in test_empty_skb()
H A Dskb_load_bytes.c12 LIBBPF_OPTS(bpf_test_run_opts, tattr, in test_skb_load_bytes()
28 err = bpf_prog_test_run_opts(prog_fd, &tattr); in test_skb_load_bytes()
36 err = bpf_prog_test_run_opts(prog_fd, &tattr); in test_skb_load_bytes()
H A Dsyscall.c23 LIBBPF_OPTS(bpf_test_run_opts, tattr, in test_syscall()
36 err = bpf_prog_test_run_opts(prog_fd, &tattr); in test_syscall()
38 ASSERT_EQ(tattr.retval, 1, "retval"); in test_syscall()
/kernel/linux/linux-6.6/samples/hid/
H A Dhid_surface_dial.c96 DECLARE_LIBBPF_OPTS(bpf_test_run_opts, tattr, in attach_prog()
108 err = bpf_prog_test_run_opts(attach_fd, &tattr); in attach_prog()
124 DECLARE_LIBBPF_OPTS(bpf_test_run_opts, tattr, in set_haptic()
135 err = bpf_prog_test_run_opts(haptic_fd, &tattr); in set_haptic()
H A Dhid_mouse.c87 DECLARE_LIBBPF_OPTS(bpf_test_run_opts, tattr, in main()
138 err = bpf_prog_test_run_opts(attach_fd, &tattr); in main()
/kernel/linux/linux-5.10/tools/firewire/
H A Dnosy-dump.c875 struct termios tattr; in set_input_mode() local
888 tcgetattr(STDIN_FILENO, &tattr); in set_input_mode()
889 tattr.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON and ECHO. */ in set_input_mode()
890 tattr.c_cc[VMIN] = 1; in set_input_mode()
891 tattr.c_cc[VTIME] = 0; in set_input_mode()
892 tcsetattr(STDIN_FILENO, TCSAFLUSH, &tattr); in set_input_mode()
/kernel/linux/linux-6.6/tools/firewire/
H A Dnosy-dump.c875 struct termios tattr; in set_input_mode() local
888 tcgetattr(STDIN_FILENO, &tattr); in set_input_mode()
889 tattr.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON and ECHO. */ in set_input_mode()
890 tattr.c_cc[VMIN] = 1; in set_input_mode()
891 tattr.c_cc[VTIME] = 0; in set_input_mode()
892 tcsetattr(STDIN_FILENO, TCSAFLUSH, &tattr); in set_input_mode()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/
H A Dtest_progs.h130 _CHECK(condition, tag, tattr.duration, format)
/kernel/linux/linux-6.6/tools/testing/selftests/hid/
H A Dhid_bpf.c518 DECLARE_LIBBPF_OPTS(bpf_test_run_opts, tattr, in load_programs()
556 err = bpf_prog_test_run_opts(attach_fd, &tattr); in load_programs()
/kernel/linux/linux-5.10/security/selinux/ss/
H A Dservices.c631 struct ebitmap *sattr, *tattr; in context_struct_compute_av() local
658 tattr = &policydb->type_attr_map_array[tcontext->type - 1]; in context_struct_compute_av()
660 ebitmap_for_each_positive_bit(tattr, tnode, j) { in context_struct_compute_av()
1028 struct ebitmap *sattr, *tattr; in security_compute_xperms_decision() local
1076 tattr = &policydb->type_attr_map_array[tcontext->type - 1]; in security_compute_xperms_decision()
1078 ebitmap_for_each_positive_bit(tattr, tnode, j) { in security_compute_xperms_decision()
/kernel/linux/linux-6.6/security/selinux/ss/
H A Dservices.c623 struct ebitmap *sattr, *tattr; in context_struct_compute_av() local
650 tattr = &policydb->type_attr_map_array[tcontext->type - 1]; in context_struct_compute_av()
652 ebitmap_for_each_positive_bit(tattr, tnode, j) { in context_struct_compute_av()
1013 struct ebitmap *sattr, *tattr; in security_compute_xperms_decision() local
1061 tattr = &policydb->type_attr_map_array[tcontext->type - 1]; in security_compute_xperms_decision()
1063 ebitmap_for_each_positive_bit(tattr, tnode, j) { in security_compute_xperms_decision()
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/
H A Dtest_progs.h215 _CHECK(condition, tag, tattr.duration, format)

Completed in 19 milliseconds