Home
last modified time | relevance | path

Searched refs:iov (Results 1 – 25 of 440) sorted by relevance

12345678910>>...18

/openbmc/qemu/tests/unit/
H A Dtest-iov.c9 struct iovec *iov = g_malloc(niov * sizeof(*iov)); in iov_random() local
12 iov[i].iov_len = g_test_rand_int_range(5,20); in iov_random()
13 iov[i].iov_base = g_malloc(iov[i].iov_len); in iov_random()
15 *iovp = iov; in iov_random()
19 static void iov_free(struct iovec *iov, unsigned niov) in iov_free() argument
23 g_free(iov[i].iov_base); in iov_free()
25 g_free(iov); in iov_free()
34 static void test_iov_bytes(struct iovec *iov, unsigned niov, in test_iov_bytes() argument
44 b = iov[i].iov_base; in test_iov_bytes()
46 for (j = 0; j < iov[i].iov_len; ++j) { in test_iov_bytes()
[all …]
/openbmc/qemu/util/
H A Diov.c25 size_t iov_from_buf_full(const struct iovec *iov, unsigned int iov_cnt, in iov_from_buf_full() argument
31 if (offset < iov[i].iov_len) { in iov_from_buf_full()
32 size_t len = MIN(iov[i].iov_len - offset, bytes - done); in iov_from_buf_full()
33 memcpy(iov[i].iov_base + offset, buf + done, len); in iov_from_buf_full()
37 offset -= iov[i].iov_len; in iov_from_buf_full()
44 size_t iov_to_buf_full(const struct iovec *iov, const unsigned int iov_cnt, in iov_to_buf_full() argument
50 if (offset < iov[i].iov_len) { in iov_to_buf_full()
51 size_t len = MIN(iov[i].iov_len - offset, bytes - done); in iov_to_buf_full()
52 memcpy(buf + done, iov[i].iov_base + offset, len); in iov_to_buf_full()
56 offset -= iov[i].iov_len; in iov_to_buf_full()
[all …]
/openbmc/linux/tools/testing/selftests/powerpc/ptrace/
H A Dptrace.h108 struct iovec iov; in ptrace_read_regs() local
113 iov.iov_base = regs; in ptrace_read_regs()
114 iov.iov_len = n * sizeof(unsigned long); in ptrace_read_regs()
116 ret = ptrace(PTRACE_GETREGSET, child, type, &iov); in ptrace_read_regs()
128 struct iovec iov; in ptrace_write_regs() local
133 iov.iov_base = regs; in ptrace_write_regs()
134 iov.iov_len = n * sizeof(unsigned long); in ptrace_write_regs()
136 ret = ptrace(PTRACE_SETREGSET, child, type, &iov); in ptrace_write_regs()
146 struct iovec iov; in show_tar_registers() local
155 iov.iov_base = (u64 *) reg; in show_tar_registers()
[all …]
/openbmc/linux/include/linux/
H A Dvringh.h99 struct iovec *iov; member
117 struct kvec *iov; member
132 static inline void vringh_iov_init(struct vringh_iov *iov, in vringh_iov_init() argument
135 iov->used = iov->i = 0; in vringh_iov_init()
136 iov->consumed = 0; in vringh_iov_init()
137 iov->max_num = num; in vringh_iov_init()
138 iov->iov = iovec; in vringh_iov_init()
141 static inline void vringh_iov_reset(struct vringh_iov *iov) in vringh_iov_reset() argument
143 iov->iov[iov->i].iov_len += iov->consumed; in vringh_iov_reset()
144 iov->iov[iov->i].iov_base -= iov->consumed; in vringh_iov_reset()
[all …]
/openbmc/linux/arch/powerpc/platforms/powernv/
H A Dpci-sriov.c149 struct pnv_iov_data *iov; in pnv_pci_ioda_fixup_iov_resources() local
152 iov = kzalloc(sizeof(*iov), GFP_KERNEL); in pnv_pci_ioda_fixup_iov_resources()
153 if (!iov) in pnv_pci_ioda_fixup_iov_resources()
155 pdev->dev.archdata.iov_data = iov; in pnv_pci_ioda_fixup_iov_resources()
194 iov->m64_single_mode[i] = true; in pnv_pci_ioda_fixup_iov_resources()
209 iov->need_shift = true; in pnv_pci_ioda_fixup_iov_resources()
223 kfree(iov); in pnv_pci_ioda_fixup_iov_resources()
252 struct pnv_iov_data *iov = pnv_iov_get(pdev); in pnv_pci_iov_resource_alignment() local
260 if (!iov) in pnv_pci_iov_resource_alignment()
268 if (iov->m64_single_mode[resno - PCI_IOV_RESOURCES]) in pnv_pci_iov_resource_alignment()
[all …]
/openbmc/qemu/include/qemu/
H A Diov.h22 size_t iov_size(const struct iovec *iov, const unsigned int iov_cnt);
36 size_t iov_from_buf_full(const struct iovec *iov, unsigned int iov_cnt,
38 size_t iov_to_buf_full(const struct iovec *iov, const unsigned int iov_cnt,
42 iov_from_buf(const struct iovec *iov, unsigned int iov_cnt, in iov_from_buf() argument
46 offset <= iov[0].iov_len && bytes <= iov[0].iov_len - offset) { in iov_from_buf()
47 memcpy(iov[0].iov_base + offset, buf, bytes); in iov_from_buf()
50 return iov_from_buf_full(iov, iov_cnt, offset, buf, bytes); in iov_from_buf()
55 iov_to_buf(const struct iovec *iov, const unsigned int iov_cnt, in iov_to_buf() argument
59 offset <= iov[0].iov_len && bytes <= iov[0].iov_len - offset) { in iov_to_buf()
60 memcpy(buf, iov[0].iov_base + offset, bytes); in iov_to_buf()
[all …]
/openbmc/linux/drivers/pci/
H A Diov.c86 struct pci_sriov *iov = dev->sriov; in pci_iov_set_numvfs() local
88 pci_write_config_word(dev, iov->pos + PCI_SRIOV_NUM_VF, nr_virtfn); in pci_iov_set_numvfs()
89 pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_OFFSET, &iov->offset); in pci_iov_set_numvfs()
90 pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_STRIDE, &iov->stride); in pci_iov_set_numvfs()
102 struct pci_sriov *iov = dev->sriov; in compute_max_vf_buses() local
105 for (nr_virtfn = iov->total_VFs; nr_virtfn; nr_virtfn--) { in compute_max_vf_buses()
107 if (!iov->offset || (nr_virtfn > 1 && !iov->stride)) { in compute_max_vf_buses()
113 if (busnr > iov->max_VF_buses) in compute_max_vf_buses()
114 iov->max_VF_buses = busnr; in compute_max_vf_buses()
295 struct pci_sriov *iov = dev->sriov; in pci_iov_add_virtfn() local
[all …]
/openbmc/linux/drivers/vhost/
H A Dvringh.c83 void vringh_kiov_advance(struct vringh_kiov *iov, size_t len) in vringh_kiov_advance() argument
85 while (len && iov->i < iov->used) { in vringh_kiov_advance()
86 size_t partlen = min(iov->iov[iov->i].iov_len, len); in vringh_kiov_advance()
88 iov->consumed += partlen; in vringh_kiov_advance()
89 iov->iov[iov->i].iov_len -= partlen; in vringh_kiov_advance()
90 iov->iov[iov->i].iov_base += partlen; in vringh_kiov_advance()
92 if (!iov->iov[iov->i].iov_len) { in vringh_kiov_advance()
94 iov->iov[iov->i].iov_len = iov->consumed; in vringh_kiov_advance()
95 iov->iov[iov->i].iov_base -= iov->consumed; in vringh_kiov_advance()
97 iov->consumed = 0; in vringh_kiov_advance()
[all …]
/openbmc/linux/drivers/usb/usbip/
H A Dvhci_tx.c59 struct kvec *iov; in vhci_send_cmd_submit() local
75 memset(&iov, 0, sizeof(iov)); in vhci_send_cmd_submit()
85 iov = kcalloc(iovnum, sizeof(*iov), GFP_KERNEL); in vhci_send_cmd_submit()
86 if (!iov) { in vhci_send_cmd_submit()
99 iov[iovnum].iov_base = &pdu_header; in vhci_send_cmd_submit()
100 iov[iovnum].iov_len = sizeof(pdu_header); in vhci_send_cmd_submit()
109 iov[iovnum].iov_base = sg_virt(sg); in vhci_send_cmd_submit()
110 iov[iovnum].iov_len = sg->length; in vhci_send_cmd_submit()
114 iov[iovnum].iov_base = urb->transfer_buffer; in vhci_send_cmd_submit()
115 iov[iovnum].iov_len = in vhci_send_cmd_submit()
[all …]
H A Dstub_tx.c164 struct kvec *iov = NULL; in stub_send_ret_submit() local
193 iov = kcalloc(iovnum, sizeof(struct kvec), GFP_KERNEL); in stub_send_ret_submit()
195 if (!iov) { in stub_send_ret_submit()
217 iov[iovnum].iov_base = &pdu_header; in stub_send_ret_submit()
218 iov[iovnum].iov_len = sizeof(pdu_header); in stub_send_ret_submit()
230 iov[iovnum].iov_base = in stub_send_ret_submit()
232 iov[iovnum].iov_len = in stub_send_ret_submit()
253 iov[iovnum].iov_base = sg_virt(sg); in stub_send_ret_submit()
254 iov[iovnum].iov_len = size; in stub_send_ret_submit()
260 iov[iovnum].iov_base = urb->transfer_buffer; in stub_send_ret_submit()
[all …]
H A Dvudc_tx.c41 struct kvec iov[1]; in v_send_ret_unlink() local
50 memset(&iov, 0, sizeof(iov)); in v_send_ret_unlink()
56 iov[0].iov_base = &pdu_header; in v_send_ret_unlink()
57 iov[0].iov_len = sizeof(pdu_header); in v_send_ret_unlink()
60 ret = kernel_sendmsg(udc->ud.tcp_socket, &msg, iov, in v_send_ret_unlink()
78 struct kvec *iov = NULL; in v_send_ret_submit() local
100 iov = kcalloc(iovnum, sizeof(*iov), GFP_KERNEL); in v_send_ret_submit()
101 if (!iov) { in v_send_ret_submit()
114 iov[iovnum].iov_base = &pdu_header; in v_send_ret_submit()
115 iov[iovnum].iov_len = sizeof(pdu_header); in v_send_ret_submit()
[all …]
/openbmc/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_mbx.c137 vfno = RING_TO_VFNO(i, ndev->iov.max_vf_queues); in nitrox_pf2vf_mbox_handler()
138 vfdev = ndev->iov.vfdev + vfno; in nitrox_pf2vf_mbox_handler()
149 queue_work(ndev->iov.pf2vf_wq, &pfwork->pf2vf_resp); in nitrox_pf2vf_mbox_handler()
160 vfno = RING_TO_VFNO(i + 64, ndev->iov.max_vf_queues); in nitrox_pf2vf_mbox_handler()
161 vfdev = ndev->iov.vfdev + vfno; in nitrox_pf2vf_mbox_handler()
173 queue_work(ndev->iov.pf2vf_wq, &pfwork->pf2vf_resp); in nitrox_pf2vf_mbox_handler()
184 ndev->iov.vfdev = kcalloc(ndev->iov.num_vfs, in nitrox_mbox_init()
186 if (!ndev->iov.vfdev) in nitrox_mbox_init()
189 for (i = 0; i < ndev->iov.num_vfs; i++) { in nitrox_mbox_init()
190 vfdev = ndev->iov.vfdev + i; in nitrox_mbox_init()
[all …]
/openbmc/linux/arch/x86/um/os-Linux/
H A Dregisters.c32 struct iovec iov; in save_fp_registers() local
35 iov.iov_base = fp_regs; in save_fp_registers()
36 iov.iov_len = FP_SIZE * sizeof(unsigned long); in save_fp_registers()
37 if (ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov) < 0) in save_fp_registers()
55 struct iovec iov; in restore_fp_registers() local
57 iov.iov_base = fp_regs; in restore_fp_registers()
58 iov.iov_len = FP_SIZE * sizeof(unsigned long); in restore_fp_registers()
59 if (ptrace(PTRACE_SETREGSET, pid, NT_X86_XSTATE, &iov) < 0) in restore_fp_registers()
130 struct iovec iov; in arch_init_registers() local
136 iov.iov_base = fp_regs; in arch_init_registers()
[all …]
/openbmc/qemu/io/
H A Dchannel.c52 const struct iovec *iov, in qio_channel_readv_full() argument
75 return klass->io_readv(ioc, iov, niov, fds, nfds, flags, errp); in qio_channel_readv_full()
80 const struct iovec *iov, in qio_channel_writev_full() argument
109 return klass->io_writev(ioc, iov, niov, fds, nfds, flags, errp); in qio_channel_writev_full()
114 const struct iovec *iov, in qio_channel_readv_all_eof() argument
118 return qio_channel_readv_full_all_eof(ioc, iov, niov, NULL, NULL, errp); in qio_channel_readv_all_eof()
122 const struct iovec *iov, in qio_channel_readv_all() argument
126 return qio_channel_readv_full_all(ioc, iov, niov, NULL, NULL, errp); in qio_channel_readv_all()
130 const struct iovec *iov, in qio_channel_readv_full_all_eof() argument
152 iov, niov, in qio_channel_readv_full_all_eof()
[all …]
/openbmc/qemu/system/
H A Ddma-helpers.c70 QEMUIOVector iov; member
92 for (i = 0; i < dbs->iov.niov; ++i) { in dma_blk_unmap()
93 dma_memory_unmap(dbs->sg->as, dbs->iov.iov[i].iov_base, in dma_blk_unmap()
94 dbs->iov.iov[i].iov_len, dbs->dir, in dma_blk_unmap()
95 dbs->iov.iov[i].iov_len); in dma_blk_unmap()
97 qemu_iovec_reset(&dbs->iov); in dma_blk_unmap()
109 qemu_iovec_destroy(&dbs->iov); in dma_complete()
126 dbs->offset += dbs->iov.size; in dma_blk_cb()
148 for (i = 0 ; i < dbs->iov.niov ; ++i) { in dma_blk_cb()
149 if (ranges_overlap((intptr_t)dbs->iov.iov[i].iov_base, in dma_blk_cb()
[all …]
/openbmc/qemu/crypto/
H A Dhash.c48 const struct iovec *iov, in qcrypto_hash_bytesv() argument
60 if (qcrypto_hash_updatev(ctx, iov, niov, errp) < 0 || in qcrypto_hash_bytesv()
76 struct iovec iov = { .iov_base = (char *)buf, in qcrypto_hash_bytes() local
78 return qcrypto_hash_bytesv(alg, &iov, 1, result, resultlen, errp); in qcrypto_hash_bytes()
82 const struct iovec *iov, in qcrypto_hash_updatev() argument
88 return drv->hash_update(hash, iov, niov, errp); in qcrypto_hash_updatev()
96 struct iovec iov = { .iov_base = (char *)buf, .iov_len = len }; in qcrypto_hash_update() local
98 return qcrypto_hash_updatev(hash, &iov, 1, errp); in qcrypto_hash_update()
189 const struct iovec *iov, in qcrypto_hash_digestv() argument
200 if (qcrypto_hash_updatev(ctx, iov, niov, errp) < 0 || in qcrypto_hash_digestv()
[all …]
/openbmc/qemu/hw/usb/
H A Dlibhw.c47 qemu_iovec_add(&p->iov, mem, xlen); in usb_packet_map()
65 for (i = 0; i < p->iov.niov; i++) { in usb_packet_unmap()
66 dma_memory_unmap(sgl->as, p->iov.iov[i].iov_base, in usb_packet_unmap()
67 p->iov.iov[i].iov_len, dir, in usb_packet_unmap()
68 p->iov.iov[i].iov_len); in usb_packet_unmap()
/openbmc/linux/tools/testing/selftests/arm64/fp/
H A Dzt-ptrace.c59 struct iovec iov; in get_za() local
73 iov.iov_base = *buf; in get_za()
74 iov.iov_len = sz; in get_za()
75 if (ptrace(PTRACE_GETREGSET, pid, NT_ARM_ZA, &iov)) in get_za()
93 struct iovec iov; in set_za() local
95 iov.iov_base = (void *)za; in set_za()
96 iov.iov_len = za->size; in set_za()
97 return ptrace(PTRACE_SETREGSET, pid, NT_ARM_ZA, &iov); in set_za()
102 struct iovec iov; in get_zt() local
104 iov.iov_base = zt; in get_zt()
[all …]
/openbmc/libpldm/src/transport/
H A Dmctp-demux.c137 struct iovec iov[2]; in pldm_transport_mctp_demux_recv() local
166 iov[0].iov_len = mctp_prefix_len; in pldm_transport_mctp_demux_recv()
167 iov[0].iov_base = mctp_prefix; in pldm_transport_mctp_demux_recv()
168 iov[1].iov_len = pldm_len; in pldm_transport_mctp_demux_recv()
169 iov[1].iov_base = buf; in pldm_transport_mctp_demux_recv()
171 msg.msg_iov = iov; in pldm_transport_mctp_demux_recv()
172 msg.msg_iovlen = sizeof(iov) / sizeof(iov[0]); in pldm_transport_mctp_demux_recv()
215 struct iovec iov[2]; in pldm_transport_mctp_demux_send() local
216 iov[0].iov_base = hdr; in pldm_transport_mctp_demux_send()
217 iov[0].iov_len = sizeof(hdr); in pldm_transport_mctp_demux_send()
[all …]
/openbmc/linux/fs/smb/server/
H A Dtransport_tcp.c36 struct kvec *iov; member
103 kfree(t->iov); in free_transport()
116 static unsigned int kvec_array_init(struct kvec *new, struct kvec *iov, in kvec_array_init() argument
121 while (bytes || !iov->iov_len) { in kvec_array_init()
122 int copy = min(bytes, iov->iov_len); in kvec_array_init()
126 if (iov->iov_len == base) { in kvec_array_init()
127 iov++; in kvec_array_init()
133 memcpy(new, iov, sizeof(*iov) * nr_segs); in kvec_array_init()
150 if (t->iov && nr_segs <= t->nr_iov) in get_conn_iovec()
151 return t->iov; in get_conn_iovec()
[all …]
H A Dksmbd_work.c32 work->iov = kcalloc(work->iov_alloc_cnt, sizeof(struct kvec), in ksmbd_alloc_work_struct()
34 if (!work->iov) { in ksmbd_alloc_work_struct()
58 kfree(work->iov); in ksmbd_free_work_struct()
104 work->iov[++work->iov_idx].iov_base = ib; in __ksmbd_iov_pin()
105 work->iov[work->iov_idx].iov_len = ib_len; in __ksmbd_iov_pin()
126 new = krealloc(work->iov, in __ksmbd_iov_pin_rsp()
134 work->iov = new; in __ksmbd_iov_pin_rsp()
139 work->iov[work->iov_idx].iov_base = work->response_buf; in __ksmbd_iov_pin_rsp()
140 *(__be32 *)work->iov[0].iov_base = 0; in __ksmbd_iov_pin_rsp()
141 work->iov[work->iov_idx].iov_len = 4; in __ksmbd_iov_pin_rsp()
[all …]
/openbmc/linux/net/handshake/
H A Dalert.c40 struct kvec iov; in tls_alert_send() local
48 iov.iov_base = alert; in tls_alert_send()
49 iov.iov_len = sizeof(alert); in tls_alert_send()
62 iov_iter_kvec(&msg.msg_iter, ITER_SOURCE, &iov, 1, iov.iov_len); in tls_alert_send()
100 const struct kvec *iov; in tls_alert_recv() local
103 iov = msg->msg_iter.kvec; in tls_alert_recv()
104 data = iov->iov_base; in tls_alert_recv()
/openbmc/linux/net/rxrpc/
H A Dlocal_event.c41 struct kvec iov[2]; in rxrpc_send_version_request() local
68 iov[0].iov_base = &whdr; in rxrpc_send_version_request()
69 iov[0].iov_len = sizeof(whdr); in rxrpc_send_version_request()
70 iov[1].iov_base = (char *)rxrpc_version_string; in rxrpc_send_version_request()
71 iov[1].iov_len = sizeof(rxrpc_version_string); in rxrpc_send_version_request()
73 len = iov[0].iov_len + iov[1].iov_len; in rxrpc_send_version_request()
75 ret = kernel_sendmsg(local->socket, &msg, iov, 2, len); in rxrpc_send_version_request()
/openbmc/linux/fs/smb/client/
H A Dsmb2pdu.c1013 add_posix_context(struct kvec *iov, unsigned int *num_iovec, umode_t mode) in add_posix_context() argument
1017 iov[num].iov_base = create_posix_buf(mode); in add_posix_context()
1020 if (iov[num].iov_base == NULL) in add_posix_context()
1022 iov[num].iov_len = sizeof(struct create_posix); in add_posix_context()
1051 struct kvec iov[1]; in SMB2_negotiate() local
1124 iov[0].iov_base = (char *)req; in SMB2_negotiate()
1125 iov[0].iov_len = total_len; in SMB2_negotiate()
1128 rqst.rq_iov = iov; in SMB2_negotiate()
1457 struct kvec iov[2]; member
1523 sess_data->iov[0].iov_base = (char *)req; in SMB2_sess_alloc_buffer()
[all …]
/openbmc/qemu/include/io/
H A Dchannel.h112 const struct iovec *iov,
119 const struct iovec *iov,
135 const struct iovec *iov,
140 const struct iovec *iov,
245 const struct iovec *iov,
289 const struct iovec *iov,
322 const struct iovec *iov,
349 const struct iovec *iov,
374 const struct iovec *iov,
389 const struct iovec *iov,
[all …]

12345678910>>...18