summaryrefslogtreecommitdiff
path: root/include/hw/virtio/dataplane/vring.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2014-07-09 10:05:49 +0200
committerKevin Wolf <kwolf@redhat.com>2014-07-14 12:03:20 +0200
commitf897bf751fbd95e4015b95d202c706548586813a (patch)
tree38023ac92b901f2cd4c7aa45b34549a08cfba9ca /include/hw/virtio/dataplane/vring.h
parent869d66af53d8e04709456c9cae5cca7c560d4b93 (diff)
downloadqemu-f897bf751fbd95e4015b95d202c706548586813a.zip
virtio-blk: embed VirtQueueElement in VirtIOBlockReq
The memory allocation between hw/block/virtio-blk.c, hw/block/dataplane/virtio-blk.c, and hw/virtio/dataplane/vring.c is messy. Structs are allocated in different files than they are freed in. This is risky and makes memory leaks easier. Embed VirtQueueElement in VirtIOBlockReq to reduce the amount of memory allocation we need to juggle. This also makes vring.c and virtio.c slightly more similar. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/hw/virtio/dataplane/vring.h')
-rw-r--r--include/hw/virtio/dataplane/vring.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/virtio/dataplane/vring.h b/include/hw/virtio/dataplane/vring.h
index b23edd276b..af73ee2ae3 100644
--- a/include/hw/virtio/dataplane/vring.h
+++ b/include/hw/virtio/dataplane/vring.h
@@ -53,7 +53,7 @@ void vring_teardown(Vring *vring, VirtIODevice *vdev, int n);
void vring_disable_notification(VirtIODevice *vdev, Vring *vring);
bool vring_enable_notification(VirtIODevice *vdev, Vring *vring);
bool vring_should_notify(VirtIODevice *vdev, Vring *vring);
-int vring_pop(VirtIODevice *vdev, Vring *vring, VirtQueueElement **elem);
+int vring_pop(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem);
void vring_push(Vring *vring, VirtQueueElement *elem, int len);
#endif /* VRING_H */