Skip to content

Commit

Permalink
virtqueue: Remove TODO comments
Browse files Browse the repository at this point in the history
We can open issues to track any todo items.

Signed-off-by: Kumar Gala <[email protected]>
  • Loading branch information
galak committed Apr 13, 2018
1 parent d94be63 commit b7918b8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
3 changes: 0 additions & 3 deletions lib/include/openamp/virtqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ typedef enum {
} vq_postpone_t;

struct virtqueue {
//TODO: Need to define proper structure for
// virtio device with RPmsg and paravirtualization.

struct virtio_device *vq_dev;
char vq_name[VIRTQUEUE_MAX_NAME_SZ];
uint16_t vq_queue_index;
Expand Down
9 changes: 0 additions & 9 deletions lib/virtio/virtqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ int virtqueue_create(struct virtio_device *virt_dev, unsigned short id,
VQ_PARAM_CHK(ring->num_descs & (ring->num_descs - 1), status,
ERROR_VRING_ALIGN);

//TODO : Error check for indirect buffer addition

if (status == VQUEUE_SUCCESS) {

vq_size = sizeof(struct virtqueue)
Expand Down Expand Up @@ -89,9 +87,6 @@ int virtqueue_create(struct virtio_device *virt_dev, unsigned short id,
virtqueue_disable_cb(vq);

*v_queue = vq;

//TODO : Need to add cleanup in case of error used with the indirect buffer addition
//TODO: do we need to save the new queue in db based on its id
}

return (status);
Expand Down Expand Up @@ -126,14 +121,10 @@ int virtqueue_add_buffer(struct virtqueue *vq, struct metal_sg *sg,
VQ_PARAM_CHK(needed < 1, status, ERROR_VQUEUE_INVLD_PARAM);
VQ_PARAM_CHK(vq->vq_free_cnt == 0, status, ERROR_VRING_FULL);

//TODO: Add parameters validation for indirect buffer addition

VQUEUE_BUSY(vq);

if (status == VQUEUE_SUCCESS) {

//TODO : Indirect buffer addition support

VQASSERT(vq, cookie != NULL, "enqueuing with no cookie");

head_idx = vq->vq_desc_head_idx;
Expand Down

0 comments on commit b7918b8

Please sign in to comment.