Lines Matching refs:iov
191 static inline u32 mic_vringh_iov_consumed(struct vringh_kiov *iov) in mic_vringh_iov_consumed() argument
194 u32 total = iov->consumed; in mic_vringh_iov_consumed()
196 for (i = 0; i < iov->i; i++) in mic_vringh_iov_consumed()
197 total += iov->iov[i].iov_len; in mic_vringh_iov_consumed()
208 static int mic_vringh_copy(struct mic_vdev *mvdev, struct vringh_kiov *iov, in mic_vringh_copy() argument
215 while (len && iov->i < iov->used) { in mic_vringh_copy()
216 partlen = min(iov->iov[iov->i].iov_len, len); in mic_vringh_copy()
219 (u64)iov->iov[iov->i].iov_base, in mic_vringh_copy()
220 iov->iov[iov->i].iov_len, in mic_vringh_copy()
224 (u64)iov->iov[iov->i].iov_base, in mic_vringh_copy()
225 iov->iov[iov->i].iov_len, in mic_vringh_copy()
235 iov->consumed += partlen; in mic_vringh_copy()
236 iov->iov[iov->i].iov_len -= partlen; in mic_vringh_copy()
237 iov->iov[iov->i].iov_base += partlen; in mic_vringh_copy()
238 if (!iov->iov[iov->i].iov_len) { in mic_vringh_copy()
240 iov->iov[iov->i].iov_len = iov->consumed; in mic_vringh_copy()
241 iov->iov[iov->i].iov_base -= iov->consumed; in mic_vringh_copy()
243 iov->consumed = 0; in mic_vringh_copy()
244 iov->i++; in mic_vringh_copy()
260 struct iovec iov; in _mic_virtio_copy() local
261 struct iovec __user *u_iov = copy->iov; in _mic_virtio_copy()
283 ret = copy_from_user(&iov, u_iov, sizeof(*u_iov)); in _mic_virtio_copy()
290 len = iov.iov_len; in _mic_virtio_copy()
291 ubuf = iov.iov_base; in _mic_virtio_copy()