Lines Matching refs:iov
192 static inline u32 mic_vringh_iov_consumed(struct vringh_kiov *iov) in mic_vringh_iov_consumed() argument
195 u32 total = iov->consumed; in mic_vringh_iov_consumed()
197 for (i = 0; i < iov->i; i++) in mic_vringh_iov_consumed()
198 total += iov->iov[i].iov_len; in mic_vringh_iov_consumed()
209 static int mic_vringh_copy(struct mic_vdev *mvdev, struct vringh_kiov *iov, in mic_vringh_copy() argument
216 while (len && iov->i < iov->used) { in mic_vringh_copy()
217 partlen = min(iov->iov[iov->i].iov_len, len); in mic_vringh_copy()
220 (u64)iov->iov[iov->i].iov_base, in mic_vringh_copy()
221 iov->iov[iov->i].iov_len, in mic_vringh_copy()
225 (u64)iov->iov[iov->i].iov_base, in mic_vringh_copy()
226 iov->iov[iov->i].iov_len, in mic_vringh_copy()
236 iov->consumed += partlen; in mic_vringh_copy()
237 iov->iov[iov->i].iov_len -= partlen; in mic_vringh_copy()
238 iov->iov[iov->i].iov_base += partlen; in mic_vringh_copy()
239 if (!iov->iov[iov->i].iov_len) { in mic_vringh_copy()
241 iov->iov[iov->i].iov_len = iov->consumed; in mic_vringh_copy()
242 iov->iov[iov->i].iov_base -= iov->consumed; in mic_vringh_copy()
244 iov->consumed = 0; in mic_vringh_copy()
245 iov->i++; in mic_vringh_copy()
261 struct iovec iov; in _mic_virtio_copy() local
262 struct iovec __user *u_iov = copy->iov; in _mic_virtio_copy()
284 ret = copy_from_user(&iov, u_iov, sizeof(*u_iov)); in _mic_virtio_copy()
291 len = iov.iov_len; in _mic_virtio_copy()
292 ubuf = iov.iov_base; in _mic_virtio_copy()