diff options
author | Asias He <asias@redhat.com> | 2013-04-27 03:07:46 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2013-05-01 03:02:52 -0400 |
commit | 2839400f8fe28ce216eeeba3fb97bdf90977f7ad (patch) | |
tree | df1d7dd849aed638e3992f43e0035541ce485692 /drivers/vhost/vhost.h | |
parent | f2f0173d6a95fa60e7934f62ce27d6bd24e4e09c (diff) |
vhost: move vhost-net zerocopy fields to net.c
On top of 'vhost: Allow device specific fields per vq', we can move device
specific fields to device virt queue from vhost virt queue.
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/vhost.h')
-rw-r--r-- | drivers/vhost/vhost.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index f3afa8a41fe0..3a36712e0792 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h | |||
@@ -54,18 +54,6 @@ struct vhost_log { | |||
54 | 54 | ||
55 | struct vhost_virtqueue; | 55 | struct vhost_virtqueue; |
56 | 56 | ||
57 | struct vhost_ubuf_ref { | ||
58 | struct kref kref; | ||
59 | wait_queue_head_t wait; | ||
60 | struct vhost_virtqueue *vq; | ||
61 | }; | ||
62 | |||
63 | struct vhost_ubuf_ref *vhost_ubuf_alloc(struct vhost_virtqueue *, bool zcopy); | ||
64 | void vhost_ubuf_put(struct vhost_ubuf_ref *); | ||
65 | void vhost_ubuf_put_and_wait(struct vhost_ubuf_ref *); | ||
66 | |||
67 | struct ubuf_info; | ||
68 | |||
69 | /* The virtqueue structure describes a queue attached to a device. */ | 57 | /* The virtqueue structure describes a queue attached to a device. */ |
70 | struct vhost_virtqueue { | 58 | struct vhost_virtqueue { |
71 | struct vhost_dev *dev; | 59 | struct vhost_dev *dev; |
@@ -130,16 +118,6 @@ struct vhost_virtqueue { | |||
130 | /* Log write descriptors */ | 118 | /* Log write descriptors */ |
131 | void __user *log_base; | 119 | void __user *log_base; |
132 | struct vhost_log *log; | 120 | struct vhost_log *log; |
133 | /* vhost zerocopy support fields below: */ | ||
134 | /* last used idx for outstanding DMA zerocopy buffers */ | ||
135 | int upend_idx; | ||
136 | /* first used idx for DMA done zerocopy buffers */ | ||
137 | int done_idx; | ||
138 | /* an array of userspace buffers info */ | ||
139 | struct ubuf_info *ubuf_info; | ||
140 | /* Reference counting for outstanding ubufs. | ||
141 | * Protected by vq mutex. Writers must also take device mutex. */ | ||
142 | struct vhost_ubuf_ref *ubufs; | ||
143 | }; | 121 | }; |
144 | 122 | ||
145 | struct vhost_dev { | 123 | struct vhost_dev { |