Displaying 20 results from an estimated 34 matches for "virtio_device_for_each_vq".
2019 Apr 28
2
[PATCH] virtio_console: remove vq buf while unpluging port
...= {
.owner = THIS_MODULE,
};
+static void remove_vq(struct virtqueue *vq)
+{
+ struct port_buffer *buf;
+
+ flush_bufs(vq, true);
+ while ((buf = virtqueue_detach_unused_buf(vq)))
+ free_buf(buf, true);
+}
+
static void remove_vqs(struct ports_device *portdev)
{
struct virtqueue *vq;
- virtio_device_for_each_vq(portdev->vdev, vq) {
- struct port_buffer *buf;
+ virtio_device_for_each_vq(portdev->vdev, vq)
+ remove_vq(vq);
- flush_bufs(vq, true);
- while ((buf = virtqueue_detach_unused_buf(vq)))
- free_buf(buf, true);
- }
portdev->vdev->config->del_vqs(portdev->vdev);
kfree(por...
2019 Apr 28
2
[PATCH] virtio_console: remove vq buf while unpluging port
...= {
.owner = THIS_MODULE,
};
+static void remove_vq(struct virtqueue *vq)
+{
+ struct port_buffer *buf;
+
+ flush_bufs(vq, true);
+ while ((buf = virtqueue_detach_unused_buf(vq)))
+ free_buf(buf, true);
+}
+
static void remove_vqs(struct ports_device *portdev)
{
struct virtqueue *vq;
- virtio_device_for_each_vq(portdev->vdev, vq) {
- struct port_buffer *buf;
+ virtio_device_for_each_vq(portdev->vdev, vq)
+ remove_vq(vq);
- flush_bufs(vq, true);
- while ((buf = virtqueue_detach_unused_buf(vq)))
- free_buf(buf, true);
- }
portdev->vdev->config->del_vqs(portdev->vdev);
kfree(por...
2019 Mar 04
5
[PATCH] virtio_console: free unused buffers with virtio port
...(&port->inbuf_lock);
spin_lock_irq(&port->outvq_lock);
reclaim_consumed_buffers(port);
+ remove_unused_bufs(port->out_vq);
spin_unlock_irq(&port->outvq_lock);
}
@@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev)
struct virtqueue *vq;
virtio_device_for_each_vq(portdev->vdev, vq) {
- struct port_buffer *buf;
flush_bufs(vq, true);
- while ((buf = virtqueue_detach_unused_buf(vq)))
- free_buf(buf, true);
+ remove_unused_bufs(vq);
}
portdev->vdev->config->del_vqs(portdev->vdev);
kfree(portdev->in_vqs);
--
2.20.1
2019 Mar 04
5
[PATCH] virtio_console: free unused buffers with virtio port
...(&port->inbuf_lock);
spin_lock_irq(&port->outvq_lock);
reclaim_consumed_buffers(port);
+ remove_unused_bufs(port->out_vq);
spin_unlock_irq(&port->outvq_lock);
}
@@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev)
struct virtqueue *vq;
virtio_device_for_each_vq(portdev->vdev, vq) {
- struct port_buffer *buf;
flush_bufs(vq, true);
- while ((buf = virtqueue_detach_unused_buf(vq)))
- free_buf(buf, true);
+ remove_unused_bufs(vq);
}
portdev->vdev->config->del_vqs(portdev->vdev);
kfree(portdev->in_vqs);
--
2.20.1
2023 May 10
3
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
...++ b/include/linux/virtio.h
@@ -147,7 +147,7 @@ int virtio_device_restore(struct virtio_device *dev);
#endif
void virtio_reset_device(struct virtio_device *dev);
-size_t virtio_max_dma_size(const struct virtio_device *vdev);
+u32 virtio_max_dma_size(const struct virtio_device *vdev);
#define virtio_device_for_each_vq(vdev, vq) \
list_for_each_entry(vq, &vdev->vqs, list)
--
2.20.1
2023 May 10
2
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
...-147,7 +147,7 @@ int virtio_device_restore(struct virtio_device *dev);
> #endif
> void virtio_reset_device(struct virtio_device *dev);
>
> -size_t virtio_max_dma_size(const struct virtio_device *vdev);
> +u32 virtio_max_dma_size(const struct virtio_device *vdev);
>
> #define virtio_device_for_each_vq(vdev, vq) \
> list_for_each_entry(vq, &vdev->vqs, list)
> --
> 2.20.1
>
2019 May 05
0
[PATCH] virtio_console: remove vq buf while unpluging port
...= {
.owner = THIS_MODULE,
};
+static void remove_vq(struct virtqueue *vq)
+{
+ struct port_buffer *buf;
+
+ flush_bufs(vq, true);
+ while ((buf = virtqueue_detach_unused_buf(vq)))
+ free_buf(buf, true);
+}
+
static void remove_vqs(struct ports_device *portdev)
{
struct virtqueue *vq;
- virtio_device_for_each_vq(portdev->vdev, vq) {
- struct port_buffer *buf;
+ virtio_device_for_each_vq(portdev->vdev, vq)
+ remove_vq(vq);
- flush_bufs(vq, true);
- while ((buf = virtqueue_detach_unused_buf(vq)))
- free_buf(buf, true);
- }
portdev->vdev->config->del_vqs(portdev->vdev);
kfree(por...
2019 May 24
0
[PATCH] virtio_console: remove vq buf while unpluging port
...virtqueue *vq)
> +{
> + struct port_buffer *buf;
> +
> + flush_bufs(vq, true);
> + while ((buf = virtqueue_detach_unused_buf(vq)))
> + free_buf(buf, true);
> +}
> +
> static void remove_vqs(struct ports_device *portdev)
> {
> struct virtqueue *vq;
>
> - virtio_device_for_each_vq(portdev->vdev, vq) {
> - struct port_buffer *buf;
> + virtio_device_for_each_vq(portdev->vdev, vq)
> + remove_vq(vq);
>
> - flush_bufs(vq, true);
> - while ((buf = virtqueue_detach_unused_buf(vq)))
> - free_buf(buf, true);
> - }
> portdev->vdev->conf...
2019 Mar 05
2
[PATCH] virtio_console: free unused buffers with virtio port
...gt; > + remove_unused_bufs(port->out_vq);
> > spin_unlock_irq(&port->outvq_lock);
> > }
> >
> > @@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev)
> > struct virtqueue *vq;
> >
> > virtio_device_for_each_vq(portdev->vdev, vq) {
> > - struct port_buffer *buf;
> >
> > flush_bufs(vq, true);
> > - while ((buf = virtqueue_detach_unused_buf(vq)))
> > - free_buf(buf, true);
> > + remo...
2019 Mar 05
2
[PATCH] virtio_console: free unused buffers with virtio port
...gt; > + remove_unused_bufs(port->out_vq);
> > spin_unlock_irq(&port->outvq_lock);
> > }
> >
> > @@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev)
> > struct virtqueue *vq;
> >
> > virtio_device_for_each_vq(portdev->vdev, vq) {
> > - struct port_buffer *buf;
> >
> > flush_bufs(vq, true);
> > - while ((buf = virtqueue_detach_unused_buf(vq)))
> > - free_buf(buf, true);
> > + remo...
2023 May 10
1
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
...,7 +147,7 @@ int virtio_device_restore(struct virtio_device *dev);
> #endif
> void virtio_reset_device(struct virtio_device *dev);
>
> -size_t virtio_max_dma_size(const struct virtio_device *vdev);
> +u32 virtio_max_dma_size(const struct virtio_device *vdev);
>
> #define virtio_device_for_each_vq(vdev, vq) \
> list_for_each_entry(vq, &vdev->vqs, list)
> --
> 2.20.1
2023 Jul 04
1
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
...,7 +147,7 @@ int virtio_device_restore(struct virtio_device *dev);
> #endif
> void virtio_reset_device(struct virtio_device *dev);
>
> -size_t virtio_max_dma_size(const struct virtio_device *vdev);
> +u32 virtio_max_dma_size(const struct virtio_device *vdev);
>
> #define virtio_device_for_each_vq(vdev, vq) \
> list_for_each_entry(vq, &vdev->vqs, list)
> --
> 2.20.1
2023 May 10
1
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
...restore(struct virtio_device *dev);
> > #endif
> > void virtio_reset_device(struct virtio_device *dev);
> >
> > -size_t virtio_max_dma_size(const struct virtio_device *vdev);
> > +u32 virtio_max_dma_size(const struct virtio_device *vdev);
> >
> > #define virtio_device_for_each_vq(vdev, vq) \
> > list_for_each_entry(vq, &vdev->vqs, list)
> > --
> > 2.20.1
> >
2019 Aug 10
2
[PATCH v3 1/2] virtio_console: free unused buffers with port delete
...(&port->outvq_lock);
> reclaim_consumed_buffers(port);
> + remove_unused_bufs(port->out_vq);
> spin_unlock_irq(&port->outvq_lock);
> }
>
> @@ -1938,11 +1948,9 @@ static void remove_vqs(struct ports_device *portdev)
> struct virtqueue *vq;
>
> virtio_device_for_each_vq(portdev->vdev, vq) {
> - struct port_buffer *buf;
>
> flush_bufs(vq, true);
> - while ((buf = virtqueue_detach_unused_buf(vq)))
> - free_buf(buf, true);
> + remove_unused_bufs(vq);
> }
> portdev->vdev->config->del_vqs(portdev->vdev);
> kfree...
2019 Aug 10
2
[PATCH v3 1/2] virtio_console: free unused buffers with port delete
...(&port->outvq_lock);
> reclaim_consumed_buffers(port);
> + remove_unused_bufs(port->out_vq);
> spin_unlock_irq(&port->outvq_lock);
> }
>
> @@ -1938,11 +1948,9 @@ static void remove_vqs(struct ports_device *portdev)
> struct virtqueue *vq;
>
> virtio_device_for_each_vq(portdev->vdev, vq) {
> - struct port_buffer *buf;
>
> flush_bufs(vq, true);
> - while ((buf = virtqueue_detach_unused_buf(vq)))
> - free_buf(buf, true);
> + remove_unused_bufs(vq);
> }
> portdev->vdev->config->del_vqs(portdev->vdev);
> kfree...
2023 May 10
1
[PATCH] virtio_ring: use u32 for virtio_max_dma_size
...> > > #endif
> > > void virtio_reset_device(struct virtio_device *dev);
> > >
> > > -size_t virtio_max_dma_size(const struct virtio_device *vdev);
> > > +u32 virtio_max_dma_size(const struct virtio_device *vdev);
> > >
> > > #define virtio_device_for_each_vq(vdev, vq) \
> > > list_for_each_entry(vq, &vdev->vqs, list)
> > > --
> > > 2.20.1
> > >
>
2023 Mar 15
2
[PATCH v2 3/3] virtio_ring: Use const to annotate read-only pointer params
...ct virtqueue *vq, void *buf));
@@ -147,7 +147,7 @@ int virtio_device_restore(struct virtio_device *dev);
#endif
void virtio_reset_device(struct virtio_device *dev);
-size_t virtio_max_dma_size(struct virtio_device *vdev);
+size_t virtio_max_dma_size(const struct virtio_device *vdev);
#define virtio_device_for_each_vq(vdev, vq) \
list_for_each_entry(vq, &vdev->vqs, list)
--
2.34.1
2019 Aug 09
5
[PATCH v3 0/2] virtio_console: fix replug of virtio console port
This patch series fixes the issue with unplug/replug of a port in virtio
console driver which fails with an error "Error allocating inbufs\n".
Patch 1 makes use of 'virtqueue_detach_unused_buf' function to detach
the unused buffers during port hotunplug time.
Patch 2 updates the next avail index for packed ring code.
Tested the packed ring code with the qemu virtio 1.1 device
2019 Mar 04
0
[PATCH] virtio_console: free unused buffers with virtio port
...(&port->outvq_lock);
> reclaim_consumed_buffers(port);
> + remove_unused_bufs(port->out_vq);
> spin_unlock_irq(&port->outvq_lock);
> }
>
> @@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev)
> struct virtqueue *vq;
>
> virtio_device_for_each_vq(portdev->vdev, vq) {
> - struct port_buffer *buf;
>
> flush_bufs(vq, true);
> - while ((buf = virtqueue_detach_unused_buf(vq)))
> - free_buf(buf, true);
> + remove_unused_bufs(vq);
> }
> portdev->vdev->config->del_vqs(portdev->vdev);
> kfree...
2019 Mar 11
0
[PATCH] virtio_console: free unused buffers with virtio port
...(&port->outvq_lock);
> reclaim_consumed_buffers(port);
> + remove_unused_bufs(port->out_vq);
> spin_unlock_irq(&port->outvq_lock);
> }
>
> @@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev)
> struct virtqueue *vq;
>
> virtio_device_for_each_vq(portdev->vdev, vq) {
> - struct port_buffer *buf;
>
> flush_bufs(vq, true);
> - while ((buf = virtqueue_detach_unused_buf(vq)))
> - free_buf(buf, true);
> + remove_unused_bufs(vq);
> }
> portdev->vdev->config->del_vqs(portdev->vdev);
> kfree...