search for: vhost_log

Displaying 20 results from an estimated 337 matches for "vhost_log".

2010 Jun 27
1
[PATCH] vhost: break out of polling loop on error
...;sock->sk->sk_wmem_alloc); @@ -192,7 +196,8 @@ static void handle_tx(struct vhost_net *net) static void handle_rx(struct vhost_net *net) { struct vhost_virtqueue *vq = &net->dev.vqs[VHOST_NET_VQ_RX]; - unsigned head, out, in, log, s; + unsigned out, in, log, s; + int head; struct vhost_log *vq_log; struct msghdr msg = { .msg_name = NULL, @@ -228,6 +233,9 @@ static void handle_rx(struct vhost_net *net) ARRAY_SIZE(vq->iov), &out, &in, vq_log, &log); + /* On error, stop handling until the next kick. */ + if (head < 0) + break; /* OK, no...
2010 Jun 27
1
[PATCH] vhost: break out of polling loop on error
...;sock->sk->sk_wmem_alloc); @@ -192,7 +196,8 @@ static void handle_tx(struct vhost_net *net) static void handle_rx(struct vhost_net *net) { struct vhost_virtqueue *vq = &net->dev.vqs[VHOST_NET_VQ_RX]; - unsigned head, out, in, log, s; + unsigned out, in, log, s; + int head; struct vhost_log *vq_log; struct msghdr msg = { .msg_name = NULL, @@ -228,6 +233,9 @@ static void handle_rx(struct vhost_net *net) ARRAY_SIZE(vq->iov), &out, &in, vq_log, &log); + /* On error, stop handling until the next kick. */ + if (head < 0) + break; /* OK, no...
2017 Sep 22
1
[PATCH net-next RFC 1/5] vhost: split out ring head fetching logic
...hich is > + * never a valid descriptor number) if none was found. A negative code is > + * returned on error. */ > +int __vhost_get_vq_desc(struct vhost_virtqueue *vq, > + struct iovec iov[], unsigned int iov_size, > + unsigned int *out_num, unsigned int *in_num, > + struct vhost_log *log, unsigned int *log_num, > + __virtio16 head) [...] > +int vhost_get_vq_desc(struct vhost_virtqueue *vq, > + struct iovec iov[], unsigned int iov_size, > + unsigned int *out_num, unsigned int *in_num, > + struct vhost_log *log, unsigned int *log_num) Pleas...
2017 Sep 22
1
[PATCH net-next RFC 1/5] vhost: split out ring head fetching logic
...hich is > + * never a valid descriptor number) if none was found. A negative code is > + * returned on error. */ > +int __vhost_get_vq_desc(struct vhost_virtqueue *vq, > + struct iovec iov[], unsigned int iov_size, > + unsigned int *out_num, unsigned int *in_num, > + struct vhost_log *log, unsigned int *log_num, > + __virtio16 head) [...] > +int vhost_get_vq_desc(struct vhost_virtqueue *vq, > + struct iovec iov[], unsigned int iov_size, > + unsigned int *out_num, unsigned int *in_num, > + struct vhost_log *log, unsigned int *log_num) Pleas...
2017 Sep 22
0
[PATCH net-next RFC 1/5] vhost: split out ring head fetching logic
...or vq->num (which is - * never a valid descriptor number) if none was found. A negative code is - * returned on error. */ -int vhost_get_vq_desc(struct vhost_virtqueue *vq, - struct iovec iov[], unsigned int iov_size, - unsigned int *out_num, unsigned int *in_num, - struct vhost_log *log, unsigned int *log_num) +static unsigned int vhost_get_vq_head(struct vhost_virtqueue *vq, int *err) { - struct vring_desc desc; - unsigned int i, head, found = 0; - u16 last_avail_idx; - __virtio16 avail_idx; - __virtio16 ring_head; - int ret, access; - - /* Check it isn't doing very str...
2020 Jun 03
2
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...- * never a valid descriptor number) if none was found. A negative code is > - * returned on error. */ > -int vhost_get_vq_desc(struct vhost_virtqueue *vq, > - struct iovec iov[], unsigned int iov_size, > - unsigned int *out_num, unsigned int *in_num, > - struct vhost_log *log, unsigned int *log_num) > + * This function returns a value > 0 if a descriptor was found, or 0 if none were found. > + * A negative code is returned on error. */ > +int vhost_get_avail_buf(struct vhost_virtqueue *vq, struct vhost_buf *buf, > + struct iovec iov[], unsigned int...
2020 Jun 03
2
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...- * never a valid descriptor number) if none was found. A negative code is > - * returned on error. */ > -int vhost_get_vq_desc(struct vhost_virtqueue *vq, > - struct iovec iov[], unsigned int iov_size, > - unsigned int *out_num, unsigned int *in_num, > - struct vhost_log *log, unsigned int *log_num) > + * This function returns a value > 0 if a descriptor was found, or 0 if none were found. > + * A negative code is returned on error. */ > +int vhost_get_avail_buf(struct vhost_virtqueue *vq, struct vhost_buf *buf, > + struct iovec iov[], unsigned int...
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...d vhost_poll_stop(struct vhost_poll *poll); -void vhost_poll_flush(struct vhost_poll *poll); -void vhost_poll_queue(struct vhost_poll *poll); -void vhost_work_flush(struct vhost_dev *dev, struct vhost_work *work); -long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp); - -struct vhost_log { - u64 addr; - u64 len; -}; - -#define START(node) ((node)->start) -#define LAST(node) ((node)->last) - -struct vhost_umem_node { - struct rb_node rb; - struct list_head link; - __u64 start; - __u64 last; - __u64 size; - __u64 userspace_addr; - __u32 perm; - __u32 flags_padding; - __u64 __su...
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...d vhost_poll_stop(struct vhost_poll *poll); -void vhost_poll_flush(struct vhost_poll *poll); -void vhost_poll_queue(struct vhost_poll *poll); -void vhost_work_flush(struct vhost_dev *dev, struct vhost_work *work); -long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp); - -struct vhost_log { - u64 addr; - u64 len; -}; - -#define START(node) ((node)->start) -#define LAST(node) ((node)->last) - -struct vhost_umem_node { - struct rb_node rb; - struct list_head link; - __u64 start; - __u64 last; - __u64 size; - __u64 userspace_addr; - __u32 perm; - __u32 flags_padding; - __u64 __su...
2020 Jan 07
6
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
...>>>>> >>>>> I'll try. >>>>> >>>>>> >>>>>> I get random crashes in my s390 KVM guests after reboot. >>>>>> Reverting both patches together with commit decd9b8 "vhost: use vhost_desc instead of vhost_log" to >>>>>> make it compile again) on top of linux-next-1218 makes the problem go away. >>>>>> >>>>>> Looks like the batched version is not yet ready for prime time. Can you drop these patches until >>>>>> we have fixed the...
2020 Jan 07
6
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
...>>>>> >>>>> I'll try. >>>>> >>>>>> >>>>>> I get random crashes in my s390 KVM guests after reboot. >>>>>> Reverting both patches together with commit decd9b8 "vhost: use vhost_desc instead of vhost_log" to >>>>>> make it compile again) on top of linux-next-1218 makes the problem go away. >>>>>> >>>>>> Looks like the batched version is not yet ready for prime time. Can you drop these patches until >>>>>> we have fixed the...
2020 Jun 02
0
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...or vq->num (which is - * never a valid descriptor number) if none was found. A negative code is - * returned on error. */ -int vhost_get_vq_desc(struct vhost_virtqueue *vq, - struct iovec iov[], unsigned int iov_size, - unsigned int *out_num, unsigned int *in_num, - struct vhost_log *log, unsigned int *log_num) + * This function returns a value > 0 if a descriptor was found, or 0 if none were found. + * A negative code is returned on error. */ +int vhost_get_avail_buf(struct vhost_virtqueue *vq, struct vhost_buf *buf, + struct iovec iov[], unsigned int iov_size, + unsig...
2018 Jul 03
0
[PATCH net-next 1/8] vhost: move get_rx_bufs to vhost.c
...m - log offset - * @quota - headcount quota, 1 for big buffer - * returns number of buffer heads allocated, negative on error - */ -static int get_rx_bufs(struct vhost_virtqueue *vq, - struct vring_used_elem *heads, - int datalen, - unsigned *iovcount, - struct vhost_log *log, - unsigned *log_num, - unsigned int quota) -{ - unsigned int out, in; - int seg = 0; - int headcount = 0; - unsigned d; - int r, nlogs = 0; - /* len is always initialized before use since we are always called with - * datalen > 0. - */ - u32 uninitialized_var(len); - - wh...
2020 Jun 04
0
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...tor number) if none was found. A negative code is > > - * returned on error. */ > > -int vhost_get_vq_desc(struct vhost_virtqueue *vq, > > - struct iovec iov[], unsigned int iov_size, > > - unsigned int *out_num, unsigned int *in_num, > > - struct vhost_log *log, unsigned int *log_num) > > + * This function returns a value > 0 if a descriptor was found, or 0 if none were found. > > + * A negative code is returned on error. */ > > +int vhost_get_avail_buf(struct vhost_virtqueue *vq, struct vhost_buf *buf, > > + struct iovec...
2019 Oct 16
4
read_barrier_depends() usage in vhost.c
...D_ONCE() for Alpha [1], I ended up trying to decipher the read_barrier_depends() usage in the vhost driver: --->8 // drivers/vhost/vhost.c static int get_indirect(struct vhost_virtqueue *vq, struct iovec iov[], unsigned int iov_size, unsigned int *out_num, unsigned int *in_num, struct vhost_log *log, unsigned int *log_num, struct vring_desc *indirect) { [...] /* We will use the result as an address to read from, so most * architectures only need a compiler barrier here. */ read_barrier_depends(); --->8 Unfortunately, although the barrier is commented (hurrah!), it's not...
2019 Oct 16
4
read_barrier_depends() usage in vhost.c
...D_ONCE() for Alpha [1], I ended up trying to decipher the read_barrier_depends() usage in the vhost driver: --->8 // drivers/vhost/vhost.c static int get_indirect(struct vhost_virtqueue *vq, struct iovec iov[], unsigned int iov_size, unsigned int *out_num, unsigned int *in_num, struct vhost_log *log, unsigned int *log_num, struct vring_desc *indirect) { [...] /* We will use the result as an address to read from, so most * architectures only need a compiler barrier here. */ read_barrier_depends(); --->8 Unfortunately, although the barrier is commented (hurrah!), it's not...
2018 Apr 23
0
[RFC V3 PATCH 1/8] vhost: move get_rx_bufs to vhost.c
...m - log offset - * @quota - headcount quota, 1 for big buffer - * returns number of buffer heads allocated, negative on error - */ -static int get_rx_bufs(struct vhost_virtqueue *vq, - struct vring_used_elem *heads, - int datalen, - unsigned *iovcount, - struct vhost_log *log, - unsigned *log_num, - unsigned int quota) -{ - unsigned int out, in; - int seg = 0; - int headcount = 0; - unsigned d; - int r, nlogs = 0; - /* len is always initialized before use since we are always called with - * datalen > 0. - */ - u32 uninitialized_var(len); - - wh...
2017 Mar 10
0
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
..._poll *poll); > -void vhost_poll_flush(struct vhost_poll *poll); > -void vhost_poll_queue(struct vhost_poll *poll); > -void vhost_work_flush(struct vhost_dev *dev, struct vhost_work *work); > -long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp); > - > -struct vhost_log { > - u64 addr; > - u64 len; > -}; > - > -#define START(node) ((node)->start) > -#define LAST(node) ((node)->last) > - > -struct vhost_umem_node { > - struct rb_node rb; > - struct list_head link; > - __u64 start; > - __u64 last; > - __u64 size; > - _...
2019 Dec 18
2
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
...ert "vhost/net: add an option to test new code" to make things compile (your next tree is not easily bisectable, can you fix that as well?). I get random crashes in my s390 KVM guests after reboot. Reverting both patches together with commit decd9b8 "vhost: use vhost_desc instead of vhost_log" to make it compile again) on top of linux-next-1218 makes the problem go away. Looks like the batched version is not yet ready for prime time. Can you drop these patches until we have fixed the issues? Christian
2019 Dec 18
2
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
...ert "vhost/net: add an option to test new code" to make things compile (your next tree is not easily bisectable, can you fix that as well?). I get random crashes in my s390 KVM guests after reboot. Reverting both patches together with commit decd9b8 "vhost: use vhost_desc instead of vhost_log" to make it compile again) on top of linux-next-1218 makes the problem go away. Looks like the batched version is not yet ready for prime time. Can you drop these patches until we have fixed the issues? Christian