/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | skeleton.c | 34 bss = skel->bss; in test_skeleton() 49 CHECK(bss->in3 != 0, "in3", "got %d != exp %d\n", bss->in3, 0); in test_skeleton() 50 CHECK(bss->out3 != 0, "out3", "got %d != exp %d\n", bss->out3, 0); in test_skeleton() 55 CHECK(bss->out6 != 0, "out6", "got %d != exp %d\n", bss->out6, 0); in test_skeleton() 66 bss->in3 = 12; in test_skeleton() 67 bss->in4 = 13; in test_skeleton() 81 CHECK(bss->in3 != 12, "in3", "got %d != exp %d\n", bss->in3, 12); in test_skeleton() 92 bss->in3 = 3; in test_skeleton() 93 bss->in4 = 4; in test_skeleton() 94 bss->in5.a = 5; in test_skeleton() [all …]
|
A D | ringbuf.c | 66 skel->bss->dropped = 0; in trigger_samples() 67 skel->bss->total = 0; in trigger_samples() 68 skel->bss->discarded = 0; in trigger_samples() 71 skel->bss->value = 333; in trigger_samples() 73 skel->bss->value = 777; in trigger_samples() 150 skel->bss->pid = getpid(); in test_ringbuf() 241 skel->bss->flags = 0; in test_ringbuf() 257 skel->bss->dropped = 0; in test_ringbuf() 258 skel->bss->total = 0; in test_ringbuf() 261 skel->bss->value = 333; in test_ringbuf() [all …]
|
A D | btf_skc_cls_ingress.c | 77 memset(&skel->bss->srv_sa6, 0, sizeof(skel->bss->srv_sa6)); in reset_test() 81 skel->bss->gen_cookie = 0; in reset_test() 82 skel->bss->linum = 0; in reset_test() 87 if (skel->bss->linum) in print_err_line() 123 skel->bss->listen_tp_sport, skel->bss->req_sk_sport, in test_conn() 127 if (CHECK(skel->bss->gen_cookie || skel->bss->recv_cookie, in test_conn() 130 skel->bss->gen_cookie, skel->bss->recv_cookie)) in test_conn() 134 skel->bss->linum); in test_conn() 187 skel->bss->gen_cookie != skel->bss->recv_cookie, in test_syncookie() 190 skel->bss->gen_cookie, skel->bss->recv_cookie)) in test_syncookie() [all …]
|
A D | endian.c | 20 struct test_endian__bss *bss; in test_endian() local 26 bss = skel->bss; in test_endian() 28 bss->in16 = IN16; in test_endian() 29 bss->in32 = IN32; in test_endian() 30 bss->in64 = IN64; in test_endian() 39 (__u64)bss->out16, (__u64)OUT16); in test_endian() 41 (__u64)bss->out32, (__u64)OUT32); in test_endian() 43 (__u64)bss->out64, (__u64)OUT64); in test_endian() 46 (__u64)bss->const16, (__u64)OUT16); in test_endian() 48 (__u64)bss->const32, (__u64)OUT32); in test_endian() [all …]
|
A D | link_pinning.c | 12 struct test_link_pinning__bss *bss) in test_link_pinning_subtest() argument 23 bss->in = 1; in test_link_pinning_subtest() 25 CHECK(bss->out != 1, "res_check1", "exp %d, got %d\n", 1, bss->out); in test_link_pinning_subtest() 40 bss->in = 2; in test_link_pinning_subtest() 42 CHECK(bss->out != 2, "res_check2", "exp %d, got %d\n", 2, bss->out); in test_link_pinning_subtest() 48 bss->in = 3; in test_link_pinning_subtest() 50 CHECK(bss->out != 3, "res_check3", "exp %d, got %d\n", 3, bss->out); in test_link_pinning_subtest() 66 bss->in = 4; in test_link_pinning_subtest() 68 CHECK(bss->out != 4, "res_check4", "exp %d, got %d\n", 4, bss->out); in test_link_pinning_subtest() 79 bss->in = i; in test_link_pinning_subtest() [all …]
|
A D | snprintf.c | 46 skel->bss->pid = getpid(); in test_snprintf_positive() 54 ASSERT_STREQ(skel->bss->num_out, EXP_NUM_OUT, "num_out"); in test_snprintf_positive() 55 ASSERT_EQ(skel->bss->num_ret, EXP_NUM_RET, "num_ret"); in test_snprintf_positive() 57 ASSERT_STREQ(skel->bss->ip_out, EXP_IP_OUT, "ip_out"); in test_snprintf_positive() 58 ASSERT_EQ(skel->bss->ip_ret, EXP_IP_RET, "ip_ret"); in test_snprintf_positive() 60 ASSERT_OK(memcmp(skel->bss->sym_out, exp_sym_out, in test_snprintf_positive() 62 ASSERT_LT(MIN_SYM_RET, skel->bss->sym_ret, "sym_ret"); in test_snprintf_positive() 64 ASSERT_OK(memcmp(skel->bss->addr_out, exp_addr_out, in test_snprintf_positive() 66 ASSERT_EQ(skel->bss->addr_ret, EXP_ADDR_RET, "addr_ret"); in test_snprintf_positive() 69 ASSERT_EQ(skel->bss->str_ret, EXP_STR_RET, "str_ret"); in test_snprintf_positive() [all …]
|
A D | d_path.c | 104 struct test_d_path__bss *bss; in test_d_path() local 116 bss = skel->bss; in test_d_path() 117 bss->my_pid = getpid(); in test_d_path() 123 if (CHECK(!bss->called_stat, in test_d_path() 128 if (CHECK(!bss->called_close, in test_d_path() 143 CHECK(bss->rets_stat[i] != strlen(bss->paths_stat[i]) + 1, in test_d_path() 146 i, bss->rets_stat[i], strlen(bss->paths_stat[i]) + 1, in test_d_path() 147 bss->paths_stat[i]); in test_d_path() 148 CHECK(bss->rets_close[i] != strlen(bss->paths_stat[i]) + 1, in test_d_path() 151 i, bss->rets_close[i], strlen(bss->paths_close[i]) + 1, in test_d_path() [all …]
|
A D | module_attach.c | 45 struct test_module_attach__bss *bss; in test_module_attach() local 62 bss = skel->bss; in test_module_attach() 72 ASSERT_EQ(bss->raw_tp_read_sz, READ_SZ, "raw_tp"); in test_module_attach() 74 ASSERT_EQ(bss->tp_btf_read_sz, READ_SZ, "tp_btf"); in test_module_attach() 75 ASSERT_EQ(bss->fentry_read_sz, READ_SZ, "fentry"); in test_module_attach() 77 ASSERT_EQ(bss->fexit_read_sz, READ_SZ, "fexit"); in test_module_attach() 78 ASSERT_EQ(bss->fexit_ret, -EIO, "fexit_tet"); in test_module_attach() 79 ASSERT_EQ(bss->fmod_ret_read_sz, READ_SZ, "fmod_ret"); in test_module_attach() 81 bss->raw_tp_writable_bare_early_ret = true; in test_module_attach() 82 bss->raw_tp_writable_bare_out_val = 0xf1f2f3f4; in test_module_attach() [all …]
|
A D | core_read_macros.c | 27 struct test_core_read_macros__bss *bss; in test_core_read_macros() local 34 bss = skel->bss; in test_core_read_macros() 35 bss->my_pid = getpid(); in test_core_read_macros() 38 bss->k_probe_in.func = (void *)(long)0x1234; in test_core_read_macros() 39 bss->k_core_in.func = (void *)(long)0xabcd; in test_core_read_macros() 43 bss->u_probe_in = &u_probe_in; in test_core_read_macros() 47 bss->u_core_in = &u_core_in; in test_core_read_macros() 56 ASSERT_EQ(bss->k_probe_out, 0x1234, "k_probe_out"); in test_core_read_macros() 57 ASSERT_EQ(bss->k_core_out, 0xabcd, "k_core_out"); in test_core_read_macros() 59 ASSERT_EQ(bss->u_probe_out, 0x5678, "u_probe_out"); in test_core_read_macros() [all …]
|
A D | atomics.c | 25 ASSERT_EQ(skel->bss->add64_result, 1, "add64_result"); in test_add() 28 ASSERT_EQ(skel->bss->add32_result, 1, "add32_result"); in test_add() 31 ASSERT_EQ(skel->bss->add_stack_result, 1, "add_stack_result"); in test_add() 58 ASSERT_EQ(skel->bss->sub64_result, 1, "sub64_result"); in test_sub() 61 ASSERT_EQ(skel->bss->sub32_result, 1, "sub32_result"); in test_sub() 93 ASSERT_EQ(skel->bss->and32_result, 0x110, "and32_result"); in test_and() 122 ASSERT_EQ(skel->bss->or32_result, 0x110, "or32_result"); in test_or() 150 ASSERT_EQ(skel->bss->xor32_result, 0x110, "xor32_result"); in test_xor() 204 ASSERT_EQ(skel->bss->xchg64_result, 1, "xchg64_result"); in test_xchg() 207 ASSERT_EQ(skel->bss->xchg32_result, 1, "xchg32_result"); in test_xchg() [all …]
|
A D | snprintf_btf.c | 12 struct netif_receive_skb__bss *bss; in serial_test_snprintf_btf() local 23 bss = skel->bss; in serial_test_snprintf_btf() 34 if (bss->skip) { in serial_test_snprintf_btf() 45 if (!ASSERT_GT(bss->ret, 0, "bpf_snprintf_ret")) in serial_test_snprintf_btf() 48 if (CHECK(bss->ran_subtests == 0, "check if subtests ran", in serial_test_snprintf_btf() 52 if (CHECK(bss->num_subtests != bss->ran_subtests, in serial_test_snprintf_btf() 54 "only ran %d of %d tests\n", bss->num_subtests, in serial_test_snprintf_btf() 55 bss->ran_subtests)) in serial_test_snprintf_btf()
|
A D | rdonly_maps.c | 4 struct bss { struct 30 struct bss bss; in test_rdonly_maps() local 55 memset(&bss, 0, sizeof(bss)); in test_rdonly_maps() 56 err = bpf_map_update_elem(bpf_map__fd(bss_map), &zero, &bss, 0); in test_rdonly_maps() 70 err = bpf_map_lookup_elem(bpf_map__fd(bss_map), &zero, &bss); in test_rdonly_maps() 73 if (CHECK(bss.did_run == 0, "check_run", in test_rdonly_maps() 76 if (CHECK(bss.iters != t->exp_iters, "check_iters", in test_rdonly_maps() 78 t->prog_name, bss.iters, t->exp_iters)) in test_rdonly_maps() 80 if (CHECK(bss.sum != t->exp_sum, "check_sum", in test_rdonly_maps() 82 t->prog_name, bss.sum, t->exp_sum)) in test_rdonly_maps()
|
A D | varlen.c | 16 struct test_varlen__bss *bss; in test_varlen() local 27 bss = skel->bss; in test_varlen() 34 bss->test_pid = getpid(); in test_varlen() 37 memcpy(bss->buf_in1, str1, size1); in test_varlen() 38 memcpy(bss->buf_in2, str2, size2); in test_varlen() 39 bss->capture = true; in test_varlen() 41 bss->capture = false; in test_varlen() 43 CHECK_VAL(bss->payload1_len1, size1); in test_varlen() 44 CHECK_VAL(bss->payload1_len2, size2); in test_varlen() 45 CHECK_VAL(bss->total1, size1 + size2); in test_varlen() [all …]
|
A D | ringbuf_multi.c | 81 skel->bss->pid = getpid(); in test_ringbuf_multi() 98 skel->bss->target_ring = 0; in test_ringbuf_multi() 99 skel->bss->value = 333; in test_ringbuf_multi() 103 skel->bss->target_ring = 1; in test_ringbuf_multi() 104 skel->bss->value = 555; in test_ringbuf_multi() 107 skel->bss->target_ring = 2; in test_ringbuf_multi() 108 skel->bss->value = 777; in test_ringbuf_multi() 122 0L, skel->bss->dropped); in test_ringbuf_multi() 124 1L, skel->bss->skipped); in test_ringbuf_multi() 125 CHECK(skel->bss->total != 2, "err_total", "exp %ld, got %ld\n", in test_ringbuf_multi() [all …]
|
A D | linked_vars.c | 17 skel->bss->input_bss1 = 1000; in test_linked_vars() 18 skel->bss->input_bss2 = 2000; in test_linked_vars() 19 skel->bss->input_bss_weak = 3000; in test_linked_vars() 32 ASSERT_EQ(skel->bss->output_bss1, 1000 + 2000 + 3000, "output_bss1"); in test_linked_vars() 33 ASSERT_EQ(skel->bss->output_bss2, 1000 + 2000 + 3000, "output_bss2"); in test_linked_vars() 35 ASSERT_EQ(skel->bss->output_data1, 1 + 2 + 10, "output_bss1"); in test_linked_vars() 36 ASSERT_EQ(skel->bss->output_data2, 1 + 2 + 10, "output_bss2"); in test_linked_vars() 38 ASSERT_EQ(skel->bss->output_rodata1, 11 + 22 + 100, "output_weak1"); in test_linked_vars() 39 ASSERT_EQ(skel->bss->output_rodata2, 11 + 22 + 100, "output_weak2"); in test_linked_vars()
|
A D | tcp_hdr_options.c | 289 skel->bss->active_fin_out = exp_passive_fin_in; in prepare_out() 290 skel->bss->passive_fin_out = exp_active_fin_in; in prepare_out() 302 memset(&skel->bss->passive_fin_in, 0, optsize); in reset_test() 308 memset(&skel->bss->active_fin_in, 0, optsize); in reset_test() 310 skel->bss->inherit_cb_flags = 0; in reset_test() 535 misc_skel->bss->nr_syn); in misc() 539 nr_data, misc_skel->bss->nr_data); in misc() 542 CHECK(misc_skel->bss->nr_pure_ack != 1 && in misc() 543 misc_skel->bss->nr_pure_ack != 2, in misc() 546 misc_skel->bss->nr_pure_ack); in misc() [all …]
|
A D | vmlinux.c | 21 struct test_vmlinux__bss *bss; in test_vmlinux() local 26 bss = skel->bss; in test_vmlinux() 35 CHECK(!bss->tp_called, "tp", "not called\n"); in test_vmlinux() 36 CHECK(!bss->raw_tp_called, "raw_tp", "not called\n"); in test_vmlinux() 37 CHECK(!bss->tp_btf_called, "tp_btf", "not called\n"); in test_vmlinux() 38 CHECK(!bss->kprobe_called, "kprobe", "not called\n"); in test_vmlinux() 39 CHECK(!bss->fentry_called, "fentry", "not called\n"); in test_vmlinux()
|
A D | ns_current_pid_tgid.c | 21 struct test_ns_current_pid_tgid__bss *bss; in test_current_pid_tgid() local 38 bss = skel->bss; in test_current_pid_tgid() 39 bss->dev = st.st_dev; in test_current_pid_tgid() 40 bss->ino = st.st_ino; in test_current_pid_tgid() 41 bss->user_pid = 0; in test_current_pid_tgid() 42 bss->user_tgid = 0; in test_current_pid_tgid() 50 ASSERT_EQ(bss->user_pid, pid, "pid"); in test_current_pid_tgid() 51 ASSERT_EQ(bss->user_tgid, tgid, "tgid"); in test_current_pid_tgid()
|
A D | subprogs.c | 26 CHECK(skel->bss->res1 != 12, "res1", "got %d, exp %d\n", skel->bss->res1, 12); in test_subprogs() 27 CHECK(skel->bss->res2 != 17, "res2", "got %d, exp %d\n", skel->bss->res2, 17); in test_subprogs() 28 CHECK(skel->bss->res3 != 19, "res3", "got %d, exp %d\n", skel->bss->res3, 19); in test_subprogs() 29 CHECK(skel->bss->res4 != 36, "res4", "got %d, exp %d\n", skel->bss->res4, 36); in test_subprogs()
|
A D | bpf_iter.c | 172 skel->bss->tgid = getpid(); in test_task_file() 198 struct bpf_iter_task_btf__bss *bss = skel->bss; in do_btf_read() local 213 if (bss->skip) { in do_btf_read() 235 struct bpf_iter_task_btf__bss *bss; in test_task_btf() local 244 bss = skel->bss; in test_task_btf() 510 skel->bss->map1_id = map_info.id; in test_overflow() 516 skel->bss->map2_id = map_info.id; in test_overflow() 572 CHECK(skel->bss->map2_seqnum1 != skel->bss->map2_seqnum2, in test_overflow() 574 skel->bss->map2_seqnum1, skel->bss->map2_seqnum2); in test_overflow() 611 skel->bss->in_test_mode = true; in test_bpf_hash_map() [all …]
|
A D | for_each.c | 52 ASSERT_EQ(skel->bss->hashmap_output, 4, "hashmap_output"); in test_hash_map() 53 ASSERT_EQ(skel->bss->hashmap_elems, max_entries, "hashmap_elems"); in test_hash_map() 59 ASSERT_EQ(skel->bss->percpu_called, 1, "percpu_called"); in test_hash_map() 60 ASSERT_LT(skel->bss->cpu, num_cpus, "num_cpus"); in test_hash_map() 61 ASSERT_EQ(skel->bss->percpu_map_elems, 1, "percpu_map_elems"); in test_hash_map() 62 ASSERT_EQ(skel->bss->percpu_key, 1, "percpu_key"); in test_hash_map() 63 ASSERT_EQ(skel->bss->percpu_val, skel->bss->cpu + 1, "percpu_val"); in test_hash_map() 64 ASSERT_EQ(skel->bss->percpu_output, 100, "percpu_output"); in test_hash_map() 116 ASSERT_EQ(skel->bss->arraymap_output, expected_total, "array_output"); in test_array_map() 117 ASSERT_EQ(skel->bss->cpu + 1, skel->bss->percpu_val, "percpu_val"); in test_array_map()
|
A D | trace_vprintk.c | 13 struct trace_vprintk_lskel__bss *bss; in serial_test_trace_vprintk() local 24 bss = skel->bss; in serial_test_trace_vprintk() 41 if (!ASSERT_GT(bss->trace_vprintk_ran, 0, "bss->trace_vprintk_ran")) in serial_test_trace_vprintk() 44 if (!ASSERT_GT(bss->trace_vprintk_ret, 0, "bss->trace_vprintk_ret")) in serial_test_trace_vprintk() 51 if (found == bss->trace_vprintk_ran) in serial_test_trace_vprintk() 57 if (!ASSERT_EQ(found, bss->trace_vprintk_ran, "found")) in serial_test_trace_vprintk() 60 if (!ASSERT_LT(bss->null_data_vprintk_ret, 0, "bss->null_data_vprintk_ret")) in serial_test_trace_vprintk()
|
A D | attach_probe.c | 50 if (CHECK(!skel->bss, "check_bss", ".bss wasn't mmap()-ed\n")) in test_attach_probe() 98 if (CHECK(skel->bss->kprobe_res != 1, "check_kprobe_res", in test_attach_probe() 99 "wrong kprobe res: %d\n", skel->bss->kprobe_res)) in test_attach_probe() 101 if (CHECK(skel->bss->kretprobe_res != 2, "check_kretprobe_res", in test_attach_probe() 102 "wrong kretprobe res: %d\n", skel->bss->kretprobe_res)) in test_attach_probe() 108 if (CHECK(skel->bss->uprobe_res != 3, "check_uprobe_res", in test_attach_probe() 109 "wrong uprobe res: %d\n", skel->bss->uprobe_res)) in test_attach_probe() 111 if (CHECK(skel->bss->uretprobe_res != 4, "check_uretprobe_res", in test_attach_probe() 112 "wrong uretprobe res: %d\n", skel->bss->uretprobe_res)) in test_attach_probe()
|
/linux/drivers/net/wireless/intersil/orinoco/ |
A D | scan.c | 75 const union hermes_scan_info *bss) in orinoco_add_hostscan_result() argument 90 len = le16_to_cpu(bss->a.essid_len); in orinoco_add_hostscan_result() 95 memcpy(&ie_buf[2], bss->a.essid, len); in orinoco_add_hostscan_result() 118 bss->a.channel, freq); in orinoco_add_hostscan_result() 127 bss->a.bssid, timestamp, capability, in orinoco_add_hostscan_result() 134 struct agere_ext_scan_info *bss, in orinoco_add_extscan_result() argument 148 ie_len = len - sizeof(*bss); in orinoco_add_extscan_result() 154 timestamp = le64_to_cpu(bss->timestamp); in orinoco_add_extscan_result() 157 ie = bss->data; in orinoco_add_extscan_result() 158 signal = SIGNAL_TO_MBM(bss->level); in orinoco_add_extscan_result() [all …]
|
/linux/net/wireless/ |
A D | scan.c | 137 kfree(bss); in bss_free() 145 bss->refcount++; in bss_ref_get() 147 bss = container_of(bss->pub.hidden_beacon_bss, in bss_ref_get() 153 bss = container_of(bss->pub.transmitted_bss, in bss_ref_get() 186 bss->refcount--; in bss_ref_put() 188 bss_free(bss); in bss_ref_put() 476 oldest = bss; in cfg80211_bss_expire_oldest() 1454 res = bss; in cfg80211_get_bss() 1511 return bss; in rb_find_bss() 2175 if (!bss) in cfg80211_parse_mbssid_data() [all …]
|