Deleted Added
full compact
virtqueue.h (227652) virtqueue.h (234270)
1/*-
2 * Copyright (c) 2011, Bryan Venteicher <bryanv@daemoninthecloset.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2011, Bryan Venteicher <bryanv@daemoninthecloset.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/virtio/virtqueue.h 227652 2011-11-18 05:43:43Z grehan $
26 * $FreeBSD: head/sys/dev/virtio/virtqueue.h 234270 2012-04-14 05:48:04Z grehan $
27 */
28
29#ifndef _VIRTIO_VIRTQUEUE_H
30#define _VIRTIO_VIRTQUEUE_H
31
32#include <sys/types.h>
33
34struct virtqueue;

--- 38 unchanged lines hidden (view full) ---

73 int align, vm_paddr_t highaddr, struct vq_alloc_info *info,
74 struct virtqueue **vqp);
75void *virtqueue_drain(struct virtqueue *vq, int *last);
76void virtqueue_free(struct virtqueue *vq);
77int virtqueue_reinit(struct virtqueue *vq, uint16_t size);
78
79int virtqueue_intr(struct virtqueue *vq);
80int virtqueue_enable_intr(struct virtqueue *vq);
27 */
28
29#ifndef _VIRTIO_VIRTQUEUE_H
30#define _VIRTIO_VIRTQUEUE_H
31
32#include <sys/types.h>
33
34struct virtqueue;

--- 38 unchanged lines hidden (view full) ---

73 int align, vm_paddr_t highaddr, struct vq_alloc_info *info,
74 struct virtqueue **vqp);
75void *virtqueue_drain(struct virtqueue *vq, int *last);
76void virtqueue_free(struct virtqueue *vq);
77int virtqueue_reinit(struct virtqueue *vq, uint16_t size);
78
79int virtqueue_intr(struct virtqueue *vq);
80int virtqueue_enable_intr(struct virtqueue *vq);
81int virtqueue_postpone_intr(struct virtqueue *vq);
81void virtqueue_disable_intr(struct virtqueue *vq);
82
83/* Get physical address of the virtqueue ring. */
84vm_paddr_t virtqueue_paddr(struct virtqueue *vq);
85
86int virtqueue_full(struct virtqueue *vq);
87int virtqueue_empty(struct virtqueue *vq);
88int virtqueue_size(struct virtqueue *vq);
89int virtqueue_nused(struct virtqueue *vq);
90void virtqueue_notify(struct virtqueue *vq);
91void virtqueue_dump(struct virtqueue *vq);
92
93int virtqueue_enqueue(struct virtqueue *vq, void *cookie,
94 struct sglist *sg, int readable, int writable);
95void *virtqueue_dequeue(struct virtqueue *vq, uint32_t *len);
96void *virtqueue_poll(struct virtqueue *vq, uint32_t *len);
97
98#endif /* _VIRTIO_VIRTQUEUE_H */
82void virtqueue_disable_intr(struct virtqueue *vq);
83
84/* Get physical address of the virtqueue ring. */
85vm_paddr_t virtqueue_paddr(struct virtqueue *vq);
86
87int virtqueue_full(struct virtqueue *vq);
88int virtqueue_empty(struct virtqueue *vq);
89int virtqueue_size(struct virtqueue *vq);
90int virtqueue_nused(struct virtqueue *vq);
91void virtqueue_notify(struct virtqueue *vq);
92void virtqueue_dump(struct virtqueue *vq);
93
94int virtqueue_enqueue(struct virtqueue *vq, void *cookie,
95 struct sglist *sg, int readable, int writable);
96void *virtqueue_dequeue(struct virtqueue *vq, uint32_t *len);
97void *virtqueue_poll(struct virtqueue *vq, uint32_t *len);
98
99#endif /* _VIRTIO_VIRTQUEUE_H */