-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
virtqueue cleanup #52
Conversation
Removed unused structure elements and greatly reduce the size of virtqueue at runtime. Also re-ordered boolean vq_inuse to reduce internal padding of the struct. Signed-off-by: Kumar Gala <[email protected]>
We only use vq_alignment during init once. We don't need to save the value in the struct, so remove it to reduce the size of the struct. Signed-off-by: Kumar Gala <[email protected]>
lib/virtio/virtqueue.c
Outdated
@@ -81,10 +81,9 @@ int virtqueue_create(struct virtio_device *virt_dev, unsigned short id, | |||
vq->shm_io = shm_io; | |||
|
|||
//TODO : Whether we want to support indirect addition or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can also remove this comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed comment
lib/virtio/virtqueue.c
Outdated
if (vq->vq_ring_mem != NULL) { | ||
vq->vq_ring_mem = NULL; | ||
} | ||
//TODO : Need to free indirect buffers here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can also remove this comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
As we don't have indirect support, lets remove vq_ring_size for now since we don't really need vq_ring_size for anything else. Signed-off-by: Kumar Gala <[email protected]>
As we don't have indirect support, lets remove vq_ring_mem for now since we don't really need vq_ring_mem for anything else. Signed-off-by: Kumar Gala <[email protected]>
We can open issues to track any todo items. Signed-off-by: Kumar Gala <[email protected]>
Removed TODO comments in virtqueue completely, any such items we can track with git hub issues going forward. I opened Issue #54 for indirect descriptor support. |
Some cleanups to the virtqueue implementation to remove some dead code and reduce the struct virtqueue size to drastically reduce the memory requirements for dynamic allocation.