| /tools/testing/selftests/net/tcp_ao/lib/ |
| D | netlink.c | 142 } req; in __add_veth() local 146 memset(&req, 0, sizeof(req)); in __add_veth() 147 req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info)); in __add_veth() 148 req.nh.nlmsg_type = RTM_NEWLINK; in __add_veth() 149 req.nh.nlmsg_flags = flags; in __add_veth() 150 req.nh.nlmsg_seq = seq; in __add_veth() 151 req.info.ifi_family = AF_UNSPEC; in __add_veth() 152 req.info.ifi_change = 0xFFFFFFFF; in __add_veth() 154 if (rtattr_pack(&req.nh, sizeof(req), IFLA_IFNAME, name, strlen(name))) in __add_veth() 157 if (rtattr_pack(&req.nh, sizeof(req), IFLA_NET_NS_FD, &ns_a, sizeof(ns_a))) in __add_veth() [all …]
|
| /tools/testing/selftests/net/ |
| D | ipsec.c | 316 } req; in veth_add() local 320 memset(&req, 0, sizeof(req)); in veth_add() 321 req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info)); in veth_add() 322 req.nh.nlmsg_type = RTM_NEWLINK; in veth_add() 323 req.nh.nlmsg_flags = flags; in veth_add() 324 req.nh.nlmsg_seq = seq; in veth_add() 325 req.info.ifi_family = AF_UNSPEC; in veth_add() 326 req.info.ifi_change = 0xFFFFFFFF; in veth_add() 328 if (rtattr_pack(&req.nh, sizeof(req), IFLA_IFNAME, peera, strlen(peera))) in veth_add() 331 if (rtattr_pack(&req.nh, sizeof(req), IFLA_NET_NS_FD, &ns_a, sizeof(ns_a))) in veth_add() [all …]
|
| D | tap.c | 91 } req; in dev_create() local 101 memset(&req, 0, sizeof(req)); in dev_create() 102 req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info)); in dev_create() 103 req.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE; in dev_create() 104 req.nh.nlmsg_type = RTM_NEWLINK; in dev_create() 106 req.info.ifi_family = AF_UNSPEC; in dev_create() 107 req.info.ifi_type = 1; in dev_create() 108 req.info.ifi_index = 0; in dev_create() 109 req.info.ifi_flags = IFF_BROADCAST | IFF_UP; in dev_create() 110 req.info.ifi_change = 0xffffffff; in dev_create() [all …]
|
| D | tun.c | 73 } req; in tun_delete() local 83 memset(&req, 0, sizeof(req)); in tun_delete() 84 req.nh.nlmsg_len = NLMSG_ALIGN(NLMSG_LENGTH(sizeof(req.ifm))); in tun_delete() 85 req.nh.nlmsg_flags = NLM_F_REQUEST; in tun_delete() 86 req.nh.nlmsg_type = RTM_DELLINK; in tun_delete() 88 req.ifm.ifi_family = AF_UNSPEC; in tun_delete() 90 rta = (struct rtattr *)(((char *)&req) + NLMSG_ALIGN(req.nh.nlmsg_len)); in tun_delete() 93 req.nh.nlmsg_len += rta->rta_len; in tun_delete() 96 ret = send(rtnl, &req, req.nh.nlmsg_len, 0); in tun_delete() 99 ret = (unsigned int)ret != req.nh.nlmsg_len; in tun_delete()
|
| D | txring_overwrite.c | 89 struct tpacket_req req = {}; in setup_tx() local 105 req.tp_block_size = getpagesize(); in setup_tx() 106 req.tp_block_nr = 1; in setup_tx() 107 req.tp_frame_size = getpagesize(); in setup_tx() 108 req.tp_frame_nr = 1; in setup_tx() 111 (void *)&req, sizeof(req))) in setup_tx() 114 *ring = mmap(0, req.tp_block_size * req.tp_block_nr, in setup_tx()
|
| D | ipv6_flowlabel_mgr.c | 50 struct in6_flowlabel_req req = { in flowlabel_get() local 58 req.flr_dst.s6_addr[0] = 0xfd; in flowlabel_get() 59 req.flr_dst.s6_addr[15] = 0x1; in flowlabel_get() 61 return setsockopt(fd, SOL_IPV6, IPV6_FLOWLABEL_MGR, &req, sizeof(req)); in flowlabel_get() 66 struct in6_flowlabel_req req = { in flowlabel_put() local 71 return setsockopt(fd, SOL_IPV6, IPV6_FLOWLABEL_MGR, &req, sizeof(req)); in flowlabel_put()
|
| /tools/net/ynl/samples/ |
| D | ovs.c | 19 struct ovs_datapath_new_req *req; in main() local 21 req = ovs_datapath_new_req_alloc(); in main() 22 if (!req) in main() 25 ovs_datapath_new_req_set_upcall_pid(req, 1); in main() 26 ovs_datapath_new_req_set_name(req, argv[1]); in main() 28 err = ovs_datapath_new(ys, req); in main() 29 ovs_datapath_new_req_free(req); in main() 33 struct ovs_datapath_get_req_dump *req; in main() local 37 req = ovs_datapath_get_req_dump_alloc(); in main() 39 dps = ovs_datapath_get_dump(ys, req); in main() [all …]
|
| D | netdev.c | 88 struct netdev_dev_get_req *req; in main() local 91 req = netdev_dev_get_req_alloc(); in main() 92 netdev_dev_get_req_set_ifindex(req, ifindex); in main() 94 d = netdev_dev_get(ys, req); in main() 95 netdev_dev_get_req_free(req); in main()
|
| /tools/testing/selftests/gpio/ |
| D | gpio-mockup-cdev.c | 24 struct gpio_v2_line_request req; in request_line_v2() local 27 memset(&req, 0, sizeof(req)); in request_line_v2() 28 req.num_lines = 1; in request_line_v2() 29 req.offsets[0] = offset; in request_line_v2() 30 req.config.flags = flags; in request_line_v2() 31 strcpy(req.consumer, CONSUMER); in request_line_v2() 33 req.config.num_attrs = 1; in request_line_v2() 34 req.config.attrs[0].mask = 1; in request_line_v2() 35 req.config.attrs[0].attr.id = GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES; in request_line_v2() 37 req.config.attrs[0].attr.values = 1; in request_line_v2() [all …]
|
| /tools/lib/bpf/ |
| D | netlink.c | 222 static int libbpf_netlink_send_recv(struct libbpf_nla_req *req, in libbpf_netlink_send_recv() argument 234 req->nh.nlmsg_pid = 0; in libbpf_netlink_send_recv() 235 req->nh.nlmsg_seq = time(NULL); in libbpf_netlink_send_recv() 237 if (send(sock, req, req->nh.nlmsg_len, 0) < 0) { in libbpf_netlink_send_recv() 242 ret = libbpf_netlink_recv(sock, nl_pid, req->nh.nlmsg_seq, in libbpf_netlink_send_recv() 269 struct libbpf_nla_req req = { in libbpf_netlink_resolve_genl_family_id() local 278 err = nlattr_add(&req, CTRL_ATTR_FAMILY_NAME, name, len); in libbpf_netlink_resolve_genl_family_id() 282 return libbpf_netlink_send_recv(&req, NETLINK_GENERIC, in libbpf_netlink_resolve_genl_family_id() 291 struct libbpf_nla_req req; in __bpf_set_link_xdp_fd_replace() local 293 memset(&req, 0, sizeof(req)); in __bpf_set_link_xdp_fd_replace() [all …]
|
| D | nlattr.h | 136 static inline struct nlattr *req_tail(struct libbpf_nla_req *req) in req_tail() argument 138 return (struct nlattr *)((void *)req + NLMSG_ALIGN(req->nh.nlmsg_len)); in req_tail() 141 static inline int nlattr_add(struct libbpf_nla_req *req, int type, in nlattr_add() argument 146 if (NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(NLA_HDRLEN + len) > sizeof(*req)) in nlattr_add() 151 nla = req_tail(req); in nlattr_add() 156 req->nh.nlmsg_len = NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(nla->nla_len); in nlattr_add() 160 static inline struct nlattr *nlattr_begin_nested(struct libbpf_nla_req *req, int type) in nlattr_begin_nested() argument 164 tail = req_tail(req); in nlattr_begin_nested() 165 if (nlattr_add(req, type | NLA_F_NESTED, NULL, 0)) in nlattr_begin_nested() 170 static inline void nlattr_end_nested(struct libbpf_nla_req *req, in nlattr_end_nested() argument [all …]
|
| /tools/testing/selftests/filesystems/statmount/ |
| D | statmount.h | 14 struct mnt_id_req req = { in statmount() local 21 req.size = MNT_ID_REQ_SIZE_VER1; in statmount() 22 req.mnt_ns_id = mnt_ns_id; in statmount() 25 return syscall(__NR_statmount, &req, buf, bufsize, flags); in statmount() 32 struct mnt_id_req req = { in listmount() local 39 req.size = MNT_ID_REQ_SIZE_VER1; in listmount() 40 req.mnt_ns_id = mnt_ns_id; in listmount() 43 return syscall(__NR_listmount, &req, list, num, flags); in listmount()
|
| /tools/testing/selftests/tdx/ |
| D | tdx_guest_test.c | 133 struct tdx_report_req req; in TEST() local 142 req.reportdata[i] = i; in TEST() 145 ASSERT_EQ(0, ioctl(devfd, TDX_CMD_GET_REPORT0, &req)); in TEST() 149 req.reportdata, sizeof(req.reportdata)); in TEST() 152 req.tdreport, sizeof(req.tdreport)); in TEST() 156 tdreport = (struct tdreport *)req.tdreport; in TEST() 158 req.reportdata, sizeof(req.reportdata))); in TEST()
|
| /tools/power/x86/x86_energy_perf_policy/ |
| D | x86_energy_perf_policy.c | 894 struct msr_hwp_request req; in print_cpu_msrs() local 905 read_hwp_request(cpu, &req, MSR_HWP_REQUEST); in print_cpu_msrs() 906 print_hwp_request(cpu, &req, ""); in print_cpu_msrs() 916 struct msr_hwp_request req; in print_pkg_msrs() local 922 read_hwp_request(first_cpu_in_pkg[pkg], &req, MSR_HWP_REQUEST_PKG); in print_pkg_msrs() 923 print_hwp_request_pkg(pkg, &req, ""); in print_pkg_msrs() 1013 int verify_hwp_req_self_consistency(int cpu, struct msr_hwp_request *req) in verify_hwp_req_self_consistency() argument 1016 if (req->hwp_min > req->hwp_max) { in verify_hwp_req_self_consistency() 1018 cpu, req->hwp_min, req->hwp_max); in verify_hwp_req_self_consistency() 1022 if (req->hwp_desired && (req->hwp_desired > req->hwp_max)) { in verify_hwp_req_self_consistency() [all …]
|
| /tools/power/x86/intel-speed-select/ |
| D | isst-core-mbox.c | 538 unsigned int req, resp; in mbox_get_get_trl() local 541 req = level | (avx_level << 16); in mbox_get_get_trl() 543 CONFIG_TDP_GET_TURBO_LIMIT_RATIOS, 0, req, in mbox_get_get_trl() 550 id->cpu, req, resp); in mbox_get_get_trl() 557 req = level | BIT(8) | (avx_level << 16); in mbox_get_get_trl() 559 CONFIG_TDP_GET_TURBO_LIMIT_RATIOS, 0, req, in mbox_get_get_trl() 565 req, resp); in mbox_get_get_trl() 631 unsigned int req, resp; in mbox_get_pbf_info() local 658 req = level; in mbox_get_pbf_info() 660 CONFIG_TDP_PBF_GET_P1HI_P1LO_INFO, 0, req, in mbox_get_pbf_info() [all …]
|
| /tools/testing/selftests/arm64/fp/ |
| D | assembler.h | 8 .macro __for from:req, to:req 17 .macro _for var:req, from:req, to:req, insn:vararg 18 .macro _for__body \var:req
|
| /tools/testing/crypto/chacha20-s390/ |
| D | test-cipher.c | 46 struct skcipher_request *req; member 107 rc = crypto_wait_req(crypto_skcipher_encrypt(sk->req), in test_skcipher_encdec() 115 rc = crypto_wait_req(crypto_skcipher_decrypt(sk->req), in test_skcipher_encdec() 130 struct skcipher_request *req = NULL; in test_skcipher() local 141 req = skcipher_request_alloc(skcipher, GFP_KERNEL); in test_skcipher() 142 if (!req) { in test_skcipher() 148 skcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, in test_skcipher() 170 sk.req = req; in test_skcipher() 175 skcipher_request_set_crypt(req, &sk.sginp, &sk.sgout, in test_skcipher() 199 skcipher_request_set_crypt(req, &sk.sginp, &sk.sgout, in test_skcipher() [all …]
|
| /tools/gpio/ |
| D | gpio-utils.c | 62 struct gpio_v2_line_request req; in gpiotools_request_line() local 80 memset(&req, 0, sizeof(req)); in gpiotools_request_line() 82 req.offsets[i] = lines[i]; in gpiotools_request_line() 84 req.config = *config; in gpiotools_request_line() 85 strcpy(req.consumer, consumer); in gpiotools_request_line() 86 req.num_lines = num_lines; in gpiotools_request_line() 88 ret = ioctl(fd, GPIO_V2_GET_LINE_IOCTL, &req); in gpiotools_request_line() 99 return ret < 0 ? ret : req.fd; in gpiotools_request_line()
|
| D | gpio-watch.c | 26 struct gpio_v2_line_info req; in main() local 42 memset(&req, 0, sizeof(req)); in main() 44 req.offset = strtoul(argv[j], &end, 0); in main() 48 ret = ioctl(fd, GPIO_V2_GET_LINEINFO_WATCH_IOCTL, &req); in main()
|
| /tools/perf/bench/ |
| D | sched-seccomp-notify.c | 71 struct seccomp_notif req; in user_notification_sync_loop() local 75 memset(&req, 0, sizeof(req)); in user_notification_sync_loop() 76 if (ioctl(listener, SECCOMP_IOCTL_NOTIF_RECV, &req)) in user_notification_sync_loop() 79 if (req.data.nr != __NR_gettid) in user_notification_sync_loop() 80 errx(EXIT_FAILURE, "unexpected syscall: %d", req.data.nr); in user_notification_sync_loop() 82 resp.id = req.id; in user_notification_sync_loop()
|
| /tools/testing/selftests/bpf/progs/ |
| D | bpf_iter_tcp4.c | 175 struct inet_request_sock *irsk = &treq->req; in dump_req_sock() 176 struct request_sock *req = &irsk->req; in dump_req_sock() local 179 ttd = req->rsk_timer.expires - bpf_jiffies64(); in dump_req_sock() 190 req->num_timeout, uid, 0, 0, 0, req); in dump_req_sock() 201 struct tcp_request_sock *req; in dump_tcp4() local 228 req = bpf_skc_to_tcp_request_sock(sk_common); in dump_tcp4() 229 if (req) in dump_tcp4() 230 return dump_req_sock(seq, req, uid, seq_num); in dump_tcp4()
|
| D | bpf_iter_tcp6.c | 184 struct inet_request_sock *irsk = &treq->req; in dump_req_sock() 185 struct request_sock *req = &irsk->req; in dump_req_sock() local 189 ttd = req->rsk_timer.expires - bpf_jiffies64(); in dump_req_sock() 206 req->num_timeout, uid, 0, 0, 0, req); in dump_req_sock() 217 struct tcp_request_sock *req; in dump_tcp6() local 244 req = bpf_skc_to_tcp_request_sock(sk_common); in dump_tcp6() 245 if (req) in dump_tcp6() 246 return dump_req_sock(seq, req, uid, seq_num); in dump_tcp6()
|
| D | bpf_tracing_net.h | 112 #define ir_loc_addr req.__req_common.skc_rcv_saddr 113 #define ir_num req.__req_common.skc_num 114 #define ir_rmt_addr req.__req_common.skc_daddr 115 #define ir_rmt_port req.__req_common.skc_dport 116 #define ir_v6_rmt_addr req.__req_common.skc_v6_daddr 117 #define ir_v6_loc_addr req.__req_common.skc_v6_rcv_saddr
|
| /tools/testing/nvdimm/test/ |
| D | iomap.c | 228 struct nfit_test_request *req; in nfit_test_release_region() local 238 list_for_each_entry(req, &nfit_res->requests, list) in nfit_test_release_region() 239 if (req->res.start == start) { in nfit_test_release_region() 240 res = &req->res; in nfit_test_release_region() 241 list_del(&req->list); in nfit_test_release_region() 250 kfree(req); in nfit_test_release_region() 266 struct nfit_test_request *req; in nfit_test_request_region() local 278 list_for_each_entry(req, &nfit_res->requests, list) in nfit_test_request_region() 279 if (start == req->res.start) { in nfit_test_request_region() 280 res = &req->res; in nfit_test_request_region() [all …]
|
| /tools/usb/usbip/src/ |
| D | usbipd.c | 93 struct op_import_request req; in recv_request_import() local 101 memset(&req, 0, sizeof(req)); in recv_request_import() 103 rc = usbip_net_recv(sockfd, &req, sizeof(req)); in recv_request_import() 108 PACK_OP_IMPORT_REQUEST(0, &req); in recv_request_import() 112 if (!strncmp(req.busid, edev->udev.busid, SYSFS_BUS_ID_SIZE)) { in recv_request_import() 113 info("found requested device: %s", req.busid); in recv_request_import() 128 info("requested device not found: %s", req.busid); in recv_request_import() 139 dbg("import request busid %s: failed", req.busid); in recv_request_import() 152 dbg("import request busid %s: complete", req.busid); in recv_request_import() 231 struct op_devlist_request req; in recv_request_devlist() local [all …]
|