| /tools/testing/selftests/net/tcp_ao/lib/ |
| A D | netlink.c | 142 } req; in __add_veth() local 146 memset(&req, 0, sizeof(req)); in __add_veth() 177 if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) { in __add_veth() 205 } req; in __ip_addr_add() local 209 memset(&req, 0, sizeof(req)); in __ip_addr_add() 252 } req; in __ip_route_add() local 257 memset(&req, 0, sizeof(req)); in __ip_route_add() 314 } req; in __link_set_up() local 316 memset(&req, 0, sizeof(req)); in __link_set_up() 356 } req; in __add_vrf() local [all …]
|
| /tools/testing/selftests/net/ |
| A D | ipsec.c | 320 memset(&req, 0, sizeof(req)); in veth_add() 368 memset(&req, 0, sizeof(req)); in ip4_addr_set() 408 memset(&req, 0, sizeof(req)); in link_set_up() 436 memset(&req, 0, sizeof(req)); in ip4_route_set() 925 memset(&req, 0, sizeof(req)); in xfrm_state_add() 1024 memset(&req, 0, sizeof(req)); in xfrm_state_check() 1108 memset(&req, 0, sizeof(req)); in xfrm_policy_add() 1182 memset(&req, 0, sizeof(req)); in xfrm_policy_del() 1233 memset(&req, 0, sizeof(req)); in xfrm_state_del() 1289 memset(&req, 0, sizeof(req)); in xfrm_state_allocspi() [all …]
|
| A 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() 107 req.info.ifi_type = 1; in dev_create() 108 req.info.ifi_index = 0; in dev_create() 115 ret = fill_rtattr(&req.nh); in dev_create() 134 ret = send(rtnl, &req, req.nh.nlmsg_len, 0); in dev_create() 149 } req; in dev_delete() local 158 memset(&req, 0, sizeof(req)); in dev_delete() 159 req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info)); in dev_delete() [all …]
|
| A 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()
|
| A 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()
|
| A 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/ |
| A 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 …]
|
| A D | rt-link.c | 56 struct rt_link_newlink_req *req; in rt_link_create_netkit() local 61 if (!req) { in rt_link_create_netkit() 76 ret = rt_link_newlink(ys, req); in rt_link_create_netkit() 86 ret = rt_link_newlink(ys, req); in rt_link_create_netkit() 88 rt_link_newlink_req_free(req); in rt_link_create_netkit() 115 struct rt_link_dellink_req *req; in rt_link_del() local 118 if (!req) { in rt_link_del() 123 req->_hdr.ifi_index = ifindex; in rt_link_del() 124 if (rt_link_dellink(ys, req)) in rt_link_del() 131 rt_link_dellink_req_free(req); in rt_link_del() [all …]
|
| A D | rt-addr.c | 47 struct rt_addr_getaddr_req *req; in main() local 57 req = rt_addr_getaddr_req_alloc(); in main() 58 if (!req) in main() 61 rsp = rt_addr_getaddr_dump(ys, req); in main() 62 rt_addr_getaddr_req_free(req); in main()
|
| A D | rt-route.c | 46 struct rt_route_getroute_req_dump *req; in main() local 57 req = rt_route_getroute_req_dump_alloc(); in main() 58 if (!req) in main() 61 rsp = rt_route_getroute_dump(ys, req); in main() 62 rt_route_getroute_req_dump_free(req); in main()
|
| A D | tc.c | 46 struct tc_getqdisc_req_dump *req; in main() local 57 req = tc_getqdisc_req_dump_alloc(); in main() 58 if (!req) in main() 61 rsp = tc_getqdisc_dump(ys, req); in main() 62 tc_getqdisc_req_dump_free(req); in main()
|
| /tools/testing/selftests/gpio/ |
| A D | gpio-mockup-cdev.c | 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() 33 req.config.num_attrs = 1; in request_line_v2() 42 return req.fd; in request_line_v2() 65 memset(&req, 0, sizeof(req)); in request_line_v1() 66 req.lines = 1; in request_line_v1() 67 req.lineoffsets[0] = offset; in request_line_v1() 68 req.flags = flags; in request_line_v1() [all …]
|
| /tools/lib/bpf/ |
| A D | netlink.c | 234 req->nh.nlmsg_pid = 0; in libbpf_netlink_send_recv() 237 if (send(sock, req, req->nh.nlmsg_len, 0) < 0) { in libbpf_netlink_send_recv() 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() 483 memset(&req, 0, sizeof(req)); in bpf_xdp_query() 486 req.nh.nlmsg_type = id; in bpf_xdp_query() 488 req.gnl.version = 2; in bpf_xdp_query() 605 memset(&req, 0, sizeof(req)); in tc_qdisc_modify() 765 memset(&req, 0, sizeof(req)); in bpf_tc_attach() 842 memset(&req, 0, sizeof(req)); in __bpf_tc_detach() [all …]
|
| A 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/tdx/ |
| A 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/testing/selftests/filesystems/statmount/ |
| A D | statmount.h | 50 struct mnt_id_req req = { in statmount() local 57 req.size = MNT_ID_REQ_SIZE_VER1; in statmount() 58 req.mnt_ns_id = mnt_ns_id; in statmount() 61 return syscall(__NR_statmount, &req, buf, bufsize, flags); in statmount() 68 struct mnt_id_req req = { in listmount() local 75 req.size = MNT_ID_REQ_SIZE_VER1; in listmount() 76 req.mnt_ns_id = mnt_ns_id; in listmount() 79 return syscall(__NR_listmount, &req, list, num, flags); in listmount()
|
| /tools/power/x86/x86_energy_perf_policy/ |
| A D | x86_energy_perf_policy.c | 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() 1024 cpu, req->hwp_desired, req->hwp_max); in verify_hwp_req_self_consistency() 1027 if (req->hwp_desired && (req->hwp_desired < req->hwp_min)) { in verify_hwp_req_self_consistency() 1029 cpu, req->hwp_desired, req->hwp_min); in verify_hwp_req_self_consistency() 1057 cpu, req->hwp_min, req->hwp_max); in check_hwp_request_v_hwp_capabilities() 1060 if (req->hwp_desired > req->hwp_max) in check_hwp_request_v_hwp_capabilities() 1062 cpu, req->hwp_desired, req->hwp_max); in check_hwp_request_v_hwp_capabilities() 1063 if (req->hwp_desired < req->hwp_min) in check_hwp_request_v_hwp_capabilities() [all …]
|
| /tools/power/x86/intel-speed-select/ |
| A D | isst-core-mbox.c | 658 req = level; in mbox_get_pbf_info() 671 req = level; in mbox_get_pbf_info() 681 req = level; in mbox_get_pbf_info() 869 req = BIT(16); in _write_pm_config() 871 req = 0; in _write_pm_config() 925 req = resp; in mbox_pm_qos_config() 928 req = req | BIT(1); in mbox_pm_qos_config() 930 req = req & ~BIT(1); in mbox_pm_qos_config() 936 req = req | BIT(2); in mbox_pm_qos_config() 938 req = req & ~BIT(2); in mbox_pm_qos_config() [all …]
|
| /tools/testing/crypto/chacha20-s390/ |
| A D | test-cipher.c | 46 struct skcipher_request *req; member 107 rc = crypto_wait_req(crypto_skcipher_encrypt(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() 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() 222 name, sk.req->cryptlen, in test_skcipher() 231 if (req) in test_skcipher() [all …]
|
| /tools/gpio/ |
| A 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()
|
| A 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/testing/selftests/arm64/fp/ |
| A 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/perf/bench/ |
| A 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/nvdimm/test/ |
| A D | iomap.c | 217 struct nfit_test_request *req; in nfit_test_release_region() local 228 if (req->res.start == start) { in nfit_test_release_region() 229 res = &req->res; in nfit_test_release_region() 230 list_del(&req->list); in nfit_test_release_region() 239 kfree(req); in nfit_test_release_region() 255 struct nfit_test_request *req; in nfit_test_request_region() local 269 res = &req->res; in nfit_test_request_region() 279 req = kzalloc(sizeof(*req), GFP_KERNEL); in nfit_test_request_region() 280 if (!req) in nfit_test_request_region() 282 INIT_LIST_HEAD(&req->list); in nfit_test_request_region() [all …]
|
| /tools/testing/selftests/bpf/progs/ |
| A 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()
|