Rusty Russell | 0a8a69d | 2007-10-22 11:03:40 +1000 | [diff] [blame] | 1 | #ifndef _LINUX_VIRTIO_RING_H |
| 2 | #define _LINUX_VIRTIO_RING_H |
Rusty Russell | 0a8a69d | 2007-10-22 11:03:40 +1000 | [diff] [blame] | 3 | |
Rusty Russell | 0a8a69d | 2007-10-22 11:03:40 +1000 | [diff] [blame] | 4 | #include <linux/irqreturn.h> |
David Howells | 607ca46 | 2012-10-13 10:46:48 +0100 | [diff] [blame] | 5 | #include <uapi/linux/virtio_ring.h> |
| 6 | |
Rusty Russell | 0a8a69d | 2007-10-22 11:03:40 +1000 | [diff] [blame] | 7 | struct virtio_device; |
| 8 | struct virtqueue; |
| 9 | |
Jason Wang | 17bb6d4 | 2012-08-28 13:54:13 +0200 | [diff] [blame] | 10 | struct virtqueue *vring_new_virtqueue(unsigned int index, |
| 11 | unsigned int num, |
Rusty Russell | 87c7d57 | 2008-12-30 09:26:03 -0600 | [diff] [blame] | 12 | unsigned int vring_align, |
Rusty Russell | 0a8a69d | 2007-10-22 11:03:40 +1000 | [diff] [blame] | 13 | struct virtio_device *vdev, |
Rusty Russell | 7b21e34 | 2012-01-12 15:44:42 +1030 | [diff] [blame] | 14 | bool weak_barriers, |
Rusty Russell | 0a8a69d | 2007-10-22 11:03:40 +1000 | [diff] [blame] | 15 | void *pages, |
| 16 | void (*notify)(struct virtqueue *vq), |
Rusty Russell | 9499f5e | 2009-06-12 22:16:35 -0600 | [diff] [blame] | 17 | void (*callback)(struct virtqueue *vq), |
| 18 | const char *name); |
Rusty Russell | 0a8a69d | 2007-10-22 11:03:40 +1000 | [diff] [blame] | 19 | void vring_del_virtqueue(struct virtqueue *vq); |
Rusty Russell | e34f872 | 2008-07-25 12:06:13 -0500 | [diff] [blame] | 20 | /* Filter out transport-specific feature bits. */ |
| 21 | void vring_transport_features(struct virtio_device *vdev); |
Rusty Russell | 0a8a69d | 2007-10-22 11:03:40 +1000 | [diff] [blame] | 22 | |
| 23 | irqreturn_t vring_interrupt(int irq, void *_vq); |
Rusty Russell | 0a8a69d | 2007-10-22 11:03:40 +1000 | [diff] [blame] | 24 | #endif /* _LINUX_VIRTIO_RING_H */ |