Skip to content
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

Merged
merged 5 commits into from
Apr 16, 2018
Merged

virtqueue cleanup #52

merged 5 commits into from
Apr 16, 2018

Conversation

galak
Copy link
Collaborator

@galak galak commented Apr 12, 2018

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.

galak added 2 commits April 12, 2018 09:17
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]>
@@ -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.
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed comment

if (vq->vq_ring_mem != NULL) {
vq->vq_ring_mem = NULL;
}
//TODO : Need to free indirect buffers here
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

galak added 3 commits April 13, 2018 10:51
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]>
@galak
Copy link
Collaborator Author

galak commented Apr 13, 2018

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.

@wjliang wjliang merged commit 8f3056d into OpenAMP:master Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants