/Linux-v5.10/tools/testing/selftests/bpf/prog_tests/ |
D | skeleton.c | 17 struct test_skeleton__bss *bss; in test_skeleton() local 29 bss = skel->bss; in test_skeleton() 39 CHECK(bss->in3 != 0, "in3", "got %d != exp %d\n", bss->in3, 0); in test_skeleton() 40 CHECK(bss->out3 != 0, "out3", "got %d != exp %d\n", bss->out3, 0); in test_skeleton() 41 CHECK(bss->in4 != 0, "in4", "got %lld != exp %lld\n", bss->in4, 0LL); in test_skeleton() 42 CHECK(bss->out4 != 0, "out4", "got %lld != exp %lld\n", bss->out4, 0LL); in test_skeleton() 45 CHECK(bss->out6 != 0, "out6", "got %d != exp %d\n", bss->out6, 0); in test_skeleton() 50 bss->in3 = 12; in test_skeleton() 51 bss->in4 = 13; in test_skeleton() 61 CHECK(bss->in3 != 12, "in3", "got %d != exp %d\n", bss->in3, 12); in test_skeleton() [all …]
|
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() 96 skel->bss->pid = getpid(); in test_ringbuf() 110 CHECK(skel->bss->avail_data != 3 * rec_sz, in test_ringbuf() 112 3L * rec_sz, skel->bss->avail_data); in test_ringbuf() 113 CHECK(skel->bss->ring_size != 4096, in test_ringbuf() 115 4096L, skel->bss->ring_size); in test_ringbuf() [all …]
|
D | btf_skc_cls_ingress.c | 77 memset(&skel->bss->srv_sa6, 0, sizeof(skel->bss->srv_sa6)); in reset_test() 78 skel->bss->listen_tp_sport = 0; in reset_test() 79 skel->bss->req_sk_sport = 0; in reset_test() 80 skel->bss->recv_cookie = 0; 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() 88 printf("bpf prog error at line %u\n", skel->bss->linum); in print_err_line() 108 memcpy(&skel->bss->srv_sa6, &srv_sa6, sizeof(srv_sa6)); in test_conn() 115 if (CHECK(skel->bss->listen_tp_sport != srv_port || in test_conn() [all …]
|
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() 38 CHECK(bss->out16 != OUT16, "out16", "got 0x%llx != exp 0x%llx\n", in test_endian() 39 (__u64)bss->out16, (__u64)OUT16); in test_endian() 40 CHECK(bss->out32 != OUT32, "out32", "got 0x%llx != exp 0x%llx\n", in test_endian() 41 (__u64)bss->out32, (__u64)OUT32); in test_endian() 42 CHECK(bss->out64 != OUT64, "out16", "got 0x%llx != exp 0x%llx\n", in test_endian() [all …]
|
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 …]
|
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() 119 err = trigger_fstat_events(bss->my_pid); in test_d_path() 123 if (CHECK(!bss->called_stat, in test_d_path() 128 if (CHECK(!bss->called_close, in test_d_path() 134 CHECK(strncmp(src.paths[i], bss->paths_stat[i], MAX_PATH_LEN), in test_d_path() 137 i, src.paths[i], bss->paths_stat[i]); in test_d_path() 138 CHECK(strncmp(src.paths[i], bss->paths_close[i], MAX_PATH_LEN), in test_d_path() 141 i, src.paths[i], bss->paths_close[i]); in test_d_path() [all …]
|
D | snprintf_btf.c | 12 struct netif_receive_skb__bss *bss; in test_snprintf_btf() local 23 bss = skel->bss; in test_snprintf_btf() 34 if (bss->skip) { in test_snprintf_btf() 45 if (CHECK(bss->ret <= 0, in test_snprintf_btf() 47 "ret <= 0 %ld test %d\n", bss->ret, bss->ran_subtests)) in test_snprintf_btf() 50 if (CHECK(bss->ran_subtests == 0, "check if subtests ran", in test_snprintf_btf() 54 if (CHECK(bss->num_subtests != bss->ran_subtests, in test_snprintf_btf() 56 "only ran %d of %d tests\n", bss->num_subtests, in test_snprintf_btf() 57 bss->ran_subtests)) in test_snprintf_btf()
|
D | ringbuf_multi.c | 52 skel->bss->pid = getpid(); in test_ringbuf_multi() 69 skel->bss->target_ring = 0; in test_ringbuf_multi() 70 skel->bss->value = 333; in test_ringbuf_multi() 74 skel->bss->target_ring = 1; in test_ringbuf_multi() 75 skel->bss->value = 555; in test_ringbuf_multi() 78 skel->bss->target_ring = 2; in test_ringbuf_multi() 79 skel->bss->value = 777; in test_ringbuf_multi() 92 CHECK(skel->bss->dropped != 0, "err_dropped", "exp %ld, got %ld\n", in test_ringbuf_multi() 93 0L, skel->bss->dropped); in test_ringbuf_multi() 94 CHECK(skel->bss->skipped != 1, "err_skipped", "exp %ld, got %ld\n", in test_ringbuf_multi() [all …]
|
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 …]
|
D | ns_current_pid_tgid.c | 9 struct bss { struct 25 struct bss bss; in test_ns_current_pid_tgid() argument 46 memset(&bss, 0, sizeof(bss)); in test_ns_current_pid_tgid() 51 bss.user_pid_tgid = id; in test_ns_current_pid_tgid() 58 bss.dev = st.st_dev; in test_ns_current_pid_tgid() 59 bss.ino = st.st_ino; in test_ns_current_pid_tgid() 61 err = bpf_map_update_elem(bpf_map__fd(bss_map), &key, &bss, 0); in test_ns_current_pid_tgid() 75 err = bpf_map_lookup_elem(bpf_map__fd(bss_map), &key, &bss); in test_ns_current_pid_tgid() 79 if (CHECK(id != bss.pid_tgid, "Compare user pid/tgid vs. bpf pid/tgid", in test_ns_current_pid_tgid() 80 "User pid/tgid %llu BPF pid/tgid %llu\n", id, bss.pid_tgid)) in test_ns_current_pid_tgid()
|
D | rdonly_maps.c | 4 struct bss { struct 30 struct bss bss; in test_rdonly_maps() argument 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() 73 err = bpf_map_lookup_elem(bpf_map__fd(bss_map), &zero, &bss); in test_rdonly_maps() 76 if (CHECK(bss.did_run == 0, "check_run", in test_rdonly_maps() 79 if (CHECK(bss.iters != t->exp_iters, "check_iters", in test_rdonly_maps() 81 t->prog_name, bss.iters, t->exp_iters)) in test_rdonly_maps() 83 if (CHECK(bss.sum != t->exp_sum, "check_sum", in test_rdonly_maps() 85 t->prog_name, bss.sum, t->exp_sum)) in test_rdonly_maps()
|
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()
|
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()
|
D | tcp_hdr_options.c | 251 if (CHECK(expected_inherit_cb_flags != skel->bss->inherit_cb_flags, in check_hdr_and_close_fds() 253 skel->bss->inherit_cb_flags, expected_inherit_cb_flags)) in check_hdr_and_close_fds() 264 if (check_hdr_opt(&exp_passive_estab_in, &skel->bss->passive_estab_in, in check_hdr_and_close_fds() 268 if (check_hdr_opt(&exp_active_estab_in, &skel->bss->active_estab_in, in check_hdr_and_close_fds() 272 if (check_hdr_opt(&exp_passive_fin_in, &skel->bss->passive_fin_in, in check_hdr_and_close_fds() 276 check_hdr_opt(&exp_active_fin_in, &skel->bss->active_fin_in, in check_hdr_and_close_fds() 286 skel->bss->active_syn_out = exp_passive_estab_in; in prepare_out() 287 skel->bss->passive_synack_out = exp_active_estab_in; in prepare_out() 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() [all …]
|
D | bpf_iter.c | 152 skel->bss->tgid = getpid(); in test_task_file() 164 CHECK(skel->bss->count != 0, "check_count", in test_task_file() 165 "invalid non pthread file visit count %d\n", skel->bss->count); in test_task_file() 178 struct bpf_iter_task_btf__bss *bss = skel->bss; in do_btf_read() local 200 if (bss->skip) { in do_btf_read() 222 struct bpf_iter_task_btf__bss *bss; in test_task_btf() local 231 bss = skel->bss; in test_task_btf() 237 if (CHECK(bss->tasks == 0, "check if iterated over tasks", in test_task_btf() 241 CHECK(bss->seq_err != 0, "check for unexpected err", in test_task_btf() 242 "bpf_seq_printf_btf returned %ld", bss->seq_err); in test_task_btf() [all …]
|
D | trace_printk.c | 14 struct trace_printk__bss *bss; in test_trace_printk() local 28 bss = skel->bss; in test_trace_printk() 46 if (CHECK(bss->trace_printk_ran == 0, in test_trace_printk() 48 "ran == %d", bss->trace_printk_ran)) in test_trace_printk() 51 if (CHECK(bss->trace_printk_ret <= 0, in test_trace_printk() 53 "got %d", bss->trace_printk_ret)) in test_trace_printk() 60 if (found == bss->trace_printk_ran) in test_trace_printk()
|
D | attach_probe.c | 44 if (CHECK(!skel->bss, "check_bss", ".bss wasn't mmap()-ed\n")) in test_attach_probe() 86 if (CHECK(skel->bss->kprobe_res != 1, "check_kprobe_res", in test_attach_probe() 87 "wrong kprobe res: %d\n", skel->bss->kprobe_res)) in test_attach_probe() 89 if (CHECK(skel->bss->kretprobe_res != 2, "check_kretprobe_res", in test_attach_probe() 90 "wrong kretprobe res: %d\n", skel->bss->kretprobe_res)) in test_attach_probe() 96 if (CHECK(skel->bss->uprobe_res != 3, "check_uprobe_res", in test_attach_probe() 97 "wrong uprobe res: %d\n", skel->bss->uprobe_res)) in test_attach_probe() 99 if (CHECK(skel->bss->uretprobe_res != 4, "check_uretprobe_res", in test_attach_probe() 100 "wrong uretprobe res: %d\n", skel->bss->uretprobe_res)) in test_attach_probe()
|
D | test_lsm.c | 69 err = exec_cmd(&skel->bss->monitored_pid); in test_test_lsm() 73 CHECK(skel->bss->bprm_count != 1, "bprm_count", "bprm_count = %d\n", in test_test_lsm() 74 skel->bss->bprm_count); in test_test_lsm() 76 skel->bss->monitored_pid = getpid(); in test_test_lsm() 83 CHECK(skel->bss->mprotect_count != 1, "mprotect_count", in test_test_lsm() 84 "mprotect_count = %d\n", skel->bss->mprotect_count); in test_test_lsm() 90 CHECK(skel->bss->copy_test != 3, "copy_test", in test_test_lsm() 91 "copy_test = %d\n", skel->bss->copy_test); in test_test_lsm()
|
D | probe_read_user_str.c | 20 skel->bss->user_ptr = buf; in test_one_str() 26 if (CHECK(skel->bss->ret < 0, "prog_ret", "prog returned: %ld\n", in test_one_str() 27 skel->bss->ret)) in test_one_str() 31 err = memcmp(skel->bss->buf, str, len); in test_one_str() 37 err = memcmp(skel->bss->buf + len, buf, sizeof(buf) - len); in test_one_str() 55 skel->bss->pid = getpid(); in test_probe_read_user_str()
|
D | perf_branches.c | 12 int written_global = skel->bss->written_global_out; in check_good_sample() 13 int required_size = skel->bss->required_size_out; in check_good_sample() 14 int written_stack = skel->bss->written_stack_out; in check_good_sample() 18 if (CHECK(!skel->bss->valid, "output not valid", in check_good_sample() 43 int written_global = skel->bss->written_global_out; in check_bad_sample() 44 int required_size = skel->bss->required_size_out; in check_bad_sample() 45 int written_stack = skel->bss->written_stack_out; in check_bad_sample() 48 if (CHECK(!skel->bss->valid, "output not valid", in check_bad_sample()
|
/Linux-v5.10/drivers/net/wireless/intersil/orinoco/ |
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() 101 ie_len += symbol_build_supp_rates(ie, bss->s.rates); in orinoco_add_hostscan_result() 105 ie_len += prism_build_supp_rates(ie, bss->p.rates); in orinoco_add_hostscan_result() 114 le16_to_cpu(bss->a.channel), NL80211_BAND_2GHZ); in orinoco_add_hostscan_result() 118 bss->a.channel, freq); in orinoco_add_hostscan_result() 122 capability = le16_to_cpu(bss->a.capabilities); in orinoco_add_hostscan_result() 123 beacon_interval = le16_to_cpu(bss->a.beacon_interv); in orinoco_add_hostscan_result() 124 signal = SIGNAL_TO_MBM(le16_to_cpu(bss->a.level)); in orinoco_add_hostscan_result() [all …]
|
/Linux-v5.10/tools/testing/selftests/bpf/ |
D | test_current_pid_tgid_new_ns.c | 24 struct bss { struct 92 struct bss bss; in main() local 113 memset(&bss, 0, sizeof(bss)); in main() 118 bss.user_pid_tgid = id; in main() 124 bss.dev = st.st_dev; in main() 125 bss.ino = st.st_ino; in main() 127 err = bpf_map_update_elem(bpf_map__fd(bss_map), &key, &bss, 0); in main() 141 err = bpf_map_lookup_elem(bpf_map__fd(bss_map), &key, &bss); in main() 145 if (CHECK_NEWNS(id != bss.pid_tgid, "Compare user pid/tgid vs. bpf pid/tgid", in main() 146 "User pid/tgid %llu BPF pid/tgid %llu\n", id, bss.pid_tgid)) in main()
|
/Linux-v5.10/net/wireless/ |
D | scan.c | 116 static void bss_free(struct cfg80211_internal_bss *bss) in bss_free() argument 120 if (WARN_ON(atomic_read(&bss->hold))) in bss_free() 123 ies = (void *)rcu_access_pointer(bss->pub.beacon_ies); in bss_free() 124 if (ies && !bss->pub.hidden_beacon_bss) in bss_free() 126 ies = (void *)rcu_access_pointer(bss->pub.proberesp_ies); in bss_free() 134 if (!list_empty(&bss->hidden_list)) in bss_free() 135 list_del(&bss->hidden_list); in bss_free() 137 kfree(bss); in bss_free() 141 struct cfg80211_internal_bss *bss) in bss_ref_get() argument 145 bss->refcount++; in bss_ref_get() [all …]
|
/Linux-v5.10/drivers/net/wireless/intersil/hostap/ |
D | hostap_80211_rx.c | 330 struct hostap_bss_info *bss; in __hostap_get_bss() local 333 bss = list_entry(ptr, struct hostap_bss_info, list); in __hostap_get_bss() 334 if (memcmp(bss->bssid, bssid, ETH_ALEN) == 0 && in __hostap_get_bss() 336 (ssid_len == bss->ssid_len && in __hostap_get_bss() 337 memcmp(ssid, bss->ssid, ssid_len) == 0))) { in __hostap_get_bss() 338 list_move(&bss->list, &local->bss_list); in __hostap_get_bss() 339 return bss; in __hostap_get_bss() 350 struct hostap_bss_info *bss; in __hostap_add_bss() local 353 bss = list_entry(local->bss_list.prev, in __hostap_add_bss() 355 list_del(&bss->list); in __hostap_add_bss() [all …]
|
/Linux-v5.10/drivers/net/wireless/ath/wcn36xx/ |
D | smd.c | 249 struct wcn36xx_hal_config_bss_params_v1 *bss) in wcn36xx_smd_set_bss_vht_params() argument 252 bss->vht_capable = 1; in wcn36xx_smd_set_bss_vht_params() 1511 struct wcn36xx_hal_config_bss_params *bss) in wcn36xx_smd_set_bss_params() argument 1517 memcpy(&bss->bssid, bssid, ETH_ALEN); in wcn36xx_smd_set_bss_params() 1519 memcpy(bss->self_mac_addr, vif->addr, ETH_ALEN); in wcn36xx_smd_set_bss_params() 1522 bss->bss_type = WCN36XX_HAL_INFRASTRUCTURE_MODE; in wcn36xx_smd_set_bss_params() 1525 bss->oper_mode = 1; in wcn36xx_smd_set_bss_params() 1526 bss->wcn36xx_hal_persona = WCN36XX_HAL_STA_MODE; in wcn36xx_smd_set_bss_params() 1529 bss->bss_type = WCN36XX_HAL_INFRA_AP_MODE; in wcn36xx_smd_set_bss_params() 1532 bss->oper_mode = 0; in wcn36xx_smd_set_bss_params() [all …]
|