Home
last modified time | relevance | path

Searched refs:test_attr (Results 1 – 6 of 6) sorted by relevance

/Linux-v5.10/tools/testing/selftests/bpf/prog_tests/
Draw_tp_test_run.c12 struct bpf_prog_test_run_attr test_attr = {}; in test_raw_tp_test_run() local
49 test_attr.prog_fd = prog_fd; in test_raw_tp_test_run()
50 test_attr.ctx_in = args; in test_raw_tp_test_run()
51 test_attr.ctx_size_in = sizeof(__u64); in test_raw_tp_test_run()
53 err = bpf_prog_test_run_xattr(&test_attr); in test_raw_tp_test_run()
56 test_attr.ctx_size_in = sizeof(args); in test_raw_tp_test_run()
57 err = bpf_prog_test_run_xattr(&test_attr); in test_raw_tp_test_run()
59 CHECK(test_attr.retval != expected_retval, "check_retval", in test_raw_tp_test_run()
60 "expect 0x%x, got 0x%x\n", expected_retval, test_attr.retval); in test_raw_tp_test_run()
Dtest_profiler.c11 struct bpf_prog_test_run_attr test_attr = {}; in sanity_run() local
17 test_attr.prog_fd = prog_fd; in sanity_run()
18 test_attr.ctx_in = args; in sanity_run()
19 test_attr.ctx_size_in = sizeof(args); in sanity_run()
20 err = bpf_prog_test_run_xattr(&test_attr); in sanity_run()
21 if (CHECK(err || test_attr.retval, "test_run", in sanity_run()
23 err, errno, test_attr.retval, duration)) in sanity_run()
/Linux-v5.10/tools/bpf/bpftool/
Dprog.c1165 struct bpf_prog_test_run_attr test_attr = {0}; in do_run() local
1208 test_attr.data_size_out = strtoul(*argv, &endptr, 0); in do_run()
1236 test_attr.ctx_size_out = strtoul(*argv, &endptr, 0); in do_run()
1264 err = get_run_data(data_fname_in, &data_in, &test_attr.data_size_in); in do_run()
1269 if (!test_attr.data_size_out) in do_run()
1270 test_attr.data_size_out = default_size; in do_run()
1271 err = alloc_run_data(&data_out, test_attr.data_size_out); in do_run()
1276 err = get_run_data(ctx_fname_in, &ctx_in, &test_attr.ctx_size_in); in do_run()
1281 if (!test_attr.ctx_size_out) in do_run()
1282 test_attr.ctx_size_out = default_size; in do_run()
[all …]
/Linux-v5.10/tools/lib/bpf/
Dbpf.c699 int bpf_prog_test_run_xattr(struct bpf_prog_test_run_attr *test_attr) in bpf_prog_test_run_xattr() argument
704 if (!test_attr->data_out && test_attr->data_size_out > 0) in bpf_prog_test_run_xattr()
708 attr.test.prog_fd = test_attr->prog_fd; in bpf_prog_test_run_xattr()
709 attr.test.data_in = ptr_to_u64(test_attr->data_in); in bpf_prog_test_run_xattr()
710 attr.test.data_out = ptr_to_u64(test_attr->data_out); in bpf_prog_test_run_xattr()
711 attr.test.data_size_in = test_attr->data_size_in; in bpf_prog_test_run_xattr()
712 attr.test.data_size_out = test_attr->data_size_out; in bpf_prog_test_run_xattr()
713 attr.test.ctx_in = ptr_to_u64(test_attr->ctx_in); in bpf_prog_test_run_xattr()
714 attr.test.ctx_out = ptr_to_u64(test_attr->ctx_out); in bpf_prog_test_run_xattr()
715 attr.test.ctx_size_in = test_attr->ctx_size_in; in bpf_prog_test_run_xattr()
[all …]
Dbpf.h216 LIBBPF_API int bpf_prog_test_run_xattr(struct bpf_prog_test_run_attr *test_attr);
/Linux-v5.10/net/ethtool/
Dbitset.c487 const struct nlattr *test_attr; in ethnl_compact_sanity_checks() local
526 test_attr = no_mask ? tb[ETHTOOL_A_BITSET_VALUE] : in ethnl_compact_sanity_checks()
528 if (ethnl_bitmap32_not_zero(nla_data(test_attr), nbits, attr_nbits)) { in ethnl_compact_sanity_checks()
529 NL_SET_ERR_MSG_ATTR(extack, test_attr, in ethnl_compact_sanity_checks()