Home
last modified time | relevance | path

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

12345678

/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/ptrace/
Dptrace.h104 struct iovec iov; in ptrace_read_regs() local
109 iov.iov_base = regs; in ptrace_read_regs()
110 iov.iov_len = n * sizeof(unsigned long); in ptrace_read_regs()
112 ret = ptrace(PTRACE_GETREGSET, child, type, &iov); in ptrace_read_regs()
124 struct iovec iov; in ptrace_write_regs() local
129 iov.iov_base = regs; in ptrace_write_regs()
130 iov.iov_len = n * sizeof(unsigned long); in ptrace_write_regs()
132 ret = ptrace(PTRACE_SETREGSET, child, type, &iov); in ptrace_write_regs()
142 struct iovec iov; in show_tar_registers() local
151 iov.iov_base = (u64 *) reg; in show_tar_registers()
[all …]
/kernel/linux/linux-5.10/include/linux/
Dvringh.h85 struct iovec *iov; member
97 struct kvec *iov; member
112 static inline void vringh_iov_init(struct vringh_iov *iov, in vringh_iov_init() argument
115 iov->used = iov->i = 0; in vringh_iov_init()
116 iov->consumed = 0; in vringh_iov_init()
117 iov->max_num = num; in vringh_iov_init()
118 iov->iov = iovec; in vringh_iov_init()
121 static inline void vringh_iov_reset(struct vringh_iov *iov) in vringh_iov_reset() argument
123 iov->iov[iov->i].iov_len += iov->consumed; in vringh_iov_reset()
124 iov->iov[iov->i].iov_base -= iov->consumed; in vringh_iov_reset()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/platforms/powernv/
Dpci-sriov.c152 struct pnv_iov_data *iov; in pnv_pci_ioda_fixup_iov_resources() local
155 iov = kzalloc(sizeof(*iov), GFP_KERNEL); in pnv_pci_ioda_fixup_iov_resources()
156 if (!iov) in pnv_pci_ioda_fixup_iov_resources()
158 pdev->dev.archdata.iov_data = iov; in pnv_pci_ioda_fixup_iov_resources()
197 iov->m64_single_mode[i] = true; in pnv_pci_ioda_fixup_iov_resources()
212 iov->need_shift = true; in pnv_pci_ioda_fixup_iov_resources()
226 kfree(iov); in pnv_pci_ioda_fixup_iov_resources()
258 struct pnv_iov_data *iov = pnv_iov_get(pdev); in pnv_pci_iov_resource_alignment() local
266 if (!iov) in pnv_pci_iov_resource_alignment()
274 if (iov->m64_single_mode[resno - PCI_IOV_RESOURCES]) in pnv_pci_iov_resource_alignment()
[all …]
/kernel/linux/linux-5.10/drivers/pci/
Diov.c43 struct pci_sriov *iov = dev->sriov; in pci_iov_set_numvfs() local
45 pci_write_config_word(dev, iov->pos + PCI_SRIOV_NUM_VF, nr_virtfn); in pci_iov_set_numvfs()
46 pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_OFFSET, &iov->offset); in pci_iov_set_numvfs()
47 pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_STRIDE, &iov->stride); in pci_iov_set_numvfs()
59 struct pci_sriov *iov = dev->sriov; in compute_max_vf_buses() local
62 for (nr_virtfn = iov->total_VFs; nr_virtfn; nr_virtfn--) { in compute_max_vf_buses()
64 if (!iov->offset || (nr_virtfn > 1 && !iov->stride)) { in compute_max_vf_buses()
70 if (busnr > iov->max_VF_buses) in compute_max_vf_buses()
71 iov->max_VF_buses = busnr; in compute_max_vf_buses()
167 struct pci_sriov *iov = dev->sriov; in pci_iov_add_virtfn() local
[all …]
/kernel/linux/linux-5.10/drivers/usb/usbip/
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 …]
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 …]
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 …]
/kernel/linux/linux-5.10/drivers/crypto/cavium/nitrox/
Dnitrox_mbx.c133 vfno = RING_TO_VFNO(i, ndev->iov.max_vf_queues); in nitrox_pf2vf_mbox_handler()
134 vfdev = ndev->iov.vfdev + vfno; in nitrox_pf2vf_mbox_handler()
145 queue_work(ndev->iov.pf2vf_wq, &pfwork->pf2vf_resp); in nitrox_pf2vf_mbox_handler()
155 vfno = RING_TO_VFNO(i + 64, ndev->iov.max_vf_queues); in nitrox_pf2vf_mbox_handler()
156 vfdev = ndev->iov.vfdev + vfno; in nitrox_pf2vf_mbox_handler()
168 queue_work(ndev->iov.pf2vf_wq, &pfwork->pf2vf_resp); in nitrox_pf2vf_mbox_handler()
179 ndev->iov.vfdev = kcalloc(ndev->iov.num_vfs, in nitrox_mbox_init()
181 if (!ndev->iov.vfdev) in nitrox_mbox_init()
184 for (i = 0; i < ndev->iov.num_vfs; i++) { in nitrox_mbox_init()
185 vfdev = ndev->iov.vfdev + i; in nitrox_mbox_init()
[all …]
/kernel/linux/linux-5.10/drivers/vhost/
Dvringh.c80 struct vringh_kiov *iov, in vringh_iov_xfer() argument
88 while (len && iov->i < iov->used) { in vringh_iov_xfer()
91 partlen = min(iov->iov[iov->i].iov_len, len); in vringh_iov_xfer()
92 err = xfer(vrh, iov->iov[iov->i].iov_base, ptr, partlen); in vringh_iov_xfer()
98 iov->consumed += partlen; in vringh_iov_xfer()
99 iov->iov[iov->i].iov_len -= partlen; in vringh_iov_xfer()
100 iov->iov[iov->i].iov_base += partlen; in vringh_iov_xfer()
102 if (!iov->iov[iov->i].iov_len) { in vringh_iov_xfer()
104 iov->iov[iov->i].iov_len = iov->consumed; in vringh_iov_xfer()
105 iov->iov[iov->i].iov_base -= iov->consumed; in vringh_iov_xfer()
[all …]
/kernel/linux/linux-5.10/arch/x86/um/os-Linux/
Dregisters.c31 struct iovec iov; in save_fp_registers() local
34 iov.iov_base = fp_regs; in save_fp_registers()
35 iov.iov_len = FP_SIZE * sizeof(unsigned long); in save_fp_registers()
36 if (ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov) < 0) in save_fp_registers()
54 struct iovec iov; in restore_fp_registers() local
56 iov.iov_base = fp_regs; in restore_fp_registers()
57 iov.iov_len = FP_SIZE * sizeof(unsigned long); in restore_fp_registers()
58 if (ptrace(PTRACE_SETREGSET, pid, NT_X86_XSTATE, &iov) < 0) in restore_fp_registers()
129 struct iovec iov; in arch_init_registers() local
135 iov.iov_base = fp_regs; in arch_init_registers()
[all …]
/kernel/liteos_a/fs/vfs/operation/
Dvfs_readv.c42 static char *pread_buf_and_check(int fd, const struct iovec *iov, int iovcnt, ssize_t *totalbytesre… in pread_buf_and_check() argument
48 if ((iov == NULL) || (iovcnt > IOV_MAX)) { in pread_buf_and_check()
54 if (SSIZE_MAX - buflen < iov[i].iov_len) { in pread_buf_and_check()
58 buflen += iov[i].iov_len; in pread_buf_and_check()
91 ssize_t vfs_readv(int fd, const struct iovec *iov, int iovcnt, off_t *offset) in vfs_readv() argument
101 buf = pread_buf_and_check(fd, iov, iovcnt, &totalbytesread, offset); in vfs_readv()
109 bytestoread = iov[i].iov_len; in vfs_readv()
115 ret = LOS_CopyFromKernel(iov[i].iov_base, bytesleft, curbuf, bytesleft); in vfs_readv()
120 ret = LOS_CopyFromKernel(iov[i].iov_base, bytestoread, curbuf, bytestoread); in vfs_readv()
135 if ((i == 0) && (ret == iov[i].iov_len)) { in vfs_readv()
[all …]
Dvfs_writev.c41 static int iov_trans_to_buf(char *buf, ssize_t totallen, const struct iovec *iov, int iovcnt) in iov_trans_to_buf() argument
50 writebuf = (char *)iov[i].iov_base; in iov_trans_to_buf()
51 bytestowrite = iov[i].iov_len; in iov_trans_to_buf()
79 ssize_t vfs_writev(int fd, const struct iovec *iov, int iovcnt, off_t *offset) in vfs_writev() argument
88 if ((iov == NULL) || (iovcnt > IOV_MAX)) { in vfs_writev()
93 if (SSIZE_MAX - buflen < iov[i].iov_len) { in vfs_writev()
97 buflen += iov[i].iov_len; in vfs_writev()
114 ret = iov_trans_to_buf(buf, totallen, iov, iovcnt); in vfs_writev()
135 ssize_t writev(int fd, const struct iovec *iov, int iovcnt) in writev() argument
137 return vfs_writev(fd, iov, iovcnt, NULL); in writev()
/kernel/liteos_m/components/net/test/
Dnet_socket_test_003.c51 struct iovec iov[IOV_LENGTH] = { 0 }; in SampleTcpServer() local
96 msg.msg_iov = iov; in SampleTcpServer()
98 iov[0].iov_base = g_buf; in SampleTcpServer()
99 iov[0].iov_len = strlen(SRV_MSG); in SampleTcpServer()
100 iov[1].iov_base = g_buf; in SampleTcpServer()
101 iov[1].iov_len = strlen(SRV_MSG); in SampleTcpServer()
111 msg.msg_iov = iov; in SampleTcpServer()
113 iov[0].iov_base = g_buf; in SampleTcpServer()
114 iov[0].iov_len = sizeof(g_buf); in SampleTcpServer()
139 struct iovec iov[IOV_LENGTH] = { 0 }; in SampleTcpClient() local
[all …]
Dnet_socket_test_002.c53 struct iovec iov[IOV_LENGTH] = { 0 }; in UdpTestTask() local
94 msg.msg_iov = iov; in UdpTestTask()
96 iov[0].iov_base = g_buf; in UdpTestTask()
97 iov[0].iov_len = strlen(MSG); in UdpTestTask()
98 iov[1].iov_base = g_buf; in UdpTestTask()
99 iov[1].iov_len = strlen(MSG); in UdpTestTask()
108 msg.msg_iov = iov; in UdpTestTask()
110 iov[0].iov_base = g_buf; in UdpTestTask()
111 iov[0].iov_len = sizeof(g_buf); in UdpTestTask()
/kernel/linux/linux-5.10/fs/cifs/
Dsmb2pdu.c744 add_posix_context(struct kvec *iov, unsigned int *num_iovec, umode_t mode) in add_posix_context() argument
746 struct smb2_create_req *req = iov[0].iov_base; in add_posix_context()
749 iov[num].iov_base = create_posix_buf(mode); in add_posix_context()
752 if (iov[num].iov_base == NULL) in add_posix_context()
754 iov[num].iov_len = sizeof(struct create_posix); in add_posix_context()
758 iov[num - 1].iov_len); in add_posix_context()
786 struct kvec iov[1]; in SMB2_negotiate() local
857 iov[0].iov_base = (char *)req; in SMB2_negotiate()
858 iov[0].iov_len = total_len; in SMB2_negotiate()
861 rqst.rq_iov = iov; in SMB2_negotiate()
[all …]
Dsess.c857 struct kvec iov[3]; member
873 sess_data->iov[0].iov_base = (char *)smb_buf; in sess_alloc_buffer()
874 sess_data->iov[0].iov_len = be32_to_cpu(smb_buf->smb_buf_length) + 4; in sess_alloc_buffer()
882 sess_data->iov[2].iov_base = kmalloc(2000, GFP_KERNEL); in sess_alloc_buffer()
883 if (!sess_data->iov[2].iov_base) { in sess_alloc_buffer()
892 sess_data->iov[0].iov_base = NULL; in sess_alloc_buffer()
893 sess_data->iov[0].iov_len = 0; in sess_alloc_buffer()
902 free_rsp_buf(sess_data->buf0_type, sess_data->iov[0].iov_base); in sess_free_buffer()
904 kfree(sess_data->iov[2].iov_base); in sess_free_buffer()
943 struct smb_hdr *smb_buf = (struct smb_hdr *) sess_data->iov[0].iov_base; in sess_sendreceive()
[all …]
/kernel/linux/linux-5.10/include/linux/sunrpc/
Dsvc.h184 static inline u32 svc_getnl(struct kvec *iov) in svc_getnl() argument
187 vp = iov->iov_base; in svc_getnl()
189 iov->iov_base = (void*)vp; in svc_getnl()
190 iov->iov_len -= sizeof(__be32); in svc_getnl()
194 static inline void svc_putnl(struct kvec *iov, u32 val) in svc_putnl() argument
196 __be32 *vp = iov->iov_base + iov->iov_len; in svc_putnl()
198 iov->iov_len += sizeof(__be32); in svc_putnl()
201 static inline __be32 svc_getu32(struct kvec *iov) in svc_getu32() argument
204 vp = iov->iov_base; in svc_getu32()
206 iov->iov_base = (void*)vp; in svc_getu32()
[all …]
/kernel/linux/linux-5.10/lib/
Diov_iter.c21 __p = i->iov; \
94 const struct iovec *iov; \
96 iterate_iovec(i, n, v, iov, skip, (I)) \
127 const struct iovec *iov; \
129 iterate_iovec(i, n, v, iov, skip, (I)) \
130 if (skip == iov->iov_len) { \
131 iov++; \
134 i->nr_segs -= iov - i->iov; \
135 i->iov = iov; \
168 const struct iovec *iov; in copy_page_to_iter_iovec() local
[all …]
/kernel/linux/linux-5.10/net/rxrpc/
Doutput.c178 struct kvec iov[2]; in rxrpc_send_ack_packet() local
227 iov[0].iov_base = pkt; in rxrpc_send_ack_packet()
228 iov[0].iov_len = sizeof(pkt->whdr) + sizeof(pkt->ack) + n; in rxrpc_send_ack_packet()
229 iov[1].iov_base = &pkt->ackinfo; in rxrpc_send_ack_packet()
230 iov[1].iov_len = sizeof(pkt->ackinfo); in rxrpc_send_ack_packet()
231 len = iov[0].iov_len + iov[1].iov_len; in rxrpc_send_ack_packet()
245 ret = kernel_sendmsg(conn->params.local->socket, &msg, iov, 2, len); in rxrpc_send_ack_packet()
287 struct kvec iov[1]; in rxrpc_send_abort_packet() local
324 iov[0].iov_base = &pkt; in rxrpc_send_abort_packet()
325 iov[0].iov_len = sizeof(pkt); in rxrpc_send_abort_packet()
[all …]
Dlocal_event.c32 struct kvec iov[2]; in rxrpc_send_version_request() local
59 iov[0].iov_base = &whdr; in rxrpc_send_version_request()
60 iov[0].iov_len = sizeof(whdr); in rxrpc_send_version_request()
61 iov[1].iov_base = (char *)rxrpc_version_string; in rxrpc_send_version_request()
62 iov[1].iov_len = sizeof(rxrpc_version_string); in rxrpc_send_version_request()
64 len = iov[0].iov_len + iov[1].iov_len; in rxrpc_send_version_request()
68 ret = kernel_sendmsg(local->socket, &msg, iov, 2, len); in rxrpc_send_version_request()
/kernel/linux/linux-5.10/tools/io_uring/
Dio_uring-cp.c31 struct iovec iov; member
77 io_uring_prep_readv(sqe, infd, &data->iov, 1, data->offset); in queue_prepped()
79 io_uring_prep_writev(sqe, outfd, &data->iov, 1, data->offset); in queue_prepped()
102 data->iov.iov_base = data + 1; in queue_read()
103 data->iov.iov_len = size; in queue_read()
106 io_uring_prep_readv(sqe, infd, &data->iov, 1, offset); in queue_read()
116 data->iov.iov_base = data + 1; in queue_write()
117 data->iov.iov_len = data->first_len; in queue_write()
197 } else if ((size_t) cqe->res != data->iov.iov_len) { in copy_file()
199 data->iov.iov_base += cqe->res; in copy_file()
[all …]
/kernel/liteos_a/testsuites/unittest/net/socket/smoke/
Dnet_socket_test_003.cpp60 struct iovec iov[2] = { }; in SampleTcpServer() local
118 msg.msg_iov = iov; in SampleTcpServer()
120 iov[0].iov_base = gBuf; in SampleTcpServer()
121 iov[0].iov_len = strlen(SRV_MSG); in SampleTcpServer()
122 iov[1].iov_base = gBuf; in SampleTcpServer()
123 iov[1].iov_len = strlen(SRV_MSG); in SampleTcpServer()
138 msg.msg_iov = iov; in SampleTcpServer()
140 iov[0].iov_base = gBuf; in SampleTcpServer()
141 iov[0].iov_len = sizeof(gBuf); in SampleTcpServer()
164 struct iovec iov[2] = { }; in SampleTcpClient() local
[all …]
Dnet_socket_test_002.cpp58 struct iovec iov[2] = { }; in UdpTest() local
99 msg.msg_iov = iov; in UdpTest()
101 iov[0].iov_base = g_buf; in UdpTest()
102 iov[0].iov_len = strlen(MSG); in UdpTest()
103 iov[1].iov_base = g_buf; in UdpTest()
104 iov[1].iov_len = strlen(MSG); in UdpTest()
115 msg.msg_iov = iov; in UdpTest()
117 iov[0].iov_base = g_buf; in UdpTest()
118 iov[0].iov_len = sizeof(g_buf); in UdpTest()
/kernel/linux/linux-5.10/drivers/net/ethernet/google/gve/
Dgve_tx.c75 struct gve_tx_iovec iov[2]) in gve_tx_alloc_fifo()
95 iov[0].iov_offset = fifo->head; in gve_tx_alloc_fifo()
96 iov[0].iov_len = bytes; in gve_tx_alloc_fifo()
105 iov[0].iov_len -= overflow; in gve_tx_alloc_fifo()
106 iov[1].iov_offset = 0; /* Start of fifo*/ in gve_tx_alloc_fifo()
107 iov[1].iov_len = overflow; in gve_tx_alloc_fifo()
115 iov[nfrags - 1].iov_padding = padding; in gve_tx_alloc_fifo()
442 &info->iov[0]); in gve_tx_add_skb()
445 &info->iov[payload_iov]); in gve_tx_add_skb()
449 info->iov[hdr_nfrags - 1].iov_offset); in gve_tx_add_skb()
[all …]
/kernel/liteos_a/testsuites/unittest/libc/io/full/
DIt_stdio_readv_001.cpp41 struct iovec iov[2]; // 2, read 2 block in Testcase() local
46 iov[0].iov_base = buf1; in Testcase()
47 iov[0].iov_len = sizeof(buf1) - 1; in Testcase()
48 iov[1].iov_base = buf2; in Testcase()
49 iov[1].iov_len = sizeof(buf2) - 1; in Testcase()
66 nread = readv(fd, iov, 2); // 2, read 2 block in Testcase()

12345678