]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
driver/virtio: Host notify and ring desc debug msg
authorSharan Santhanam <sharan.santhanam@neclab.eu>
Tue, 4 Dec 2018 14:10:35 +0000 (15:10 +0100)
committerSimon Kuenzer <simon.kuenzer@neclab.eu>
Sun, 23 Dec 2018 15:21:59 +0000 (16:21 +0100)
We provide additional debug message when notify the host of
additional buffer and the descriptor information while enqueuing
a buffer into the ring.

Signed-off-by: Sharan Santhanam <sharan.santhanam@neclab.eu>
Reviewed-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
plat/drivers/include/virtio/virtqueue.h
plat/drivers/virtio/virtio_ring.c

index 75efb2d17a0d75a8c5e83dd834cc2e8187cd77e3..3d72c500a2bea9f146dd037c6253968593f2362d 100644 (file)
@@ -228,8 +228,10 @@ static inline void virtqueue_host_notify(struct virtqueue *vq)
 {
        UK_ASSERT(vq);
 
-       if (vq->vq_notify_host && virtqueue_notify_enabled(vq))
+       if (vq->vq_notify_host && virtqueue_notify_enabled(vq)) {
+               uk_pr_debug("notify queue %d\n", vq->queue_id);
                vq->vq_notify_host(vq->vdev, vq->queue_id);
+       }
 }
 
 #ifdef __cplusplus
index a1b0e033dac6961018de6a9e49ea887f7103cb60..02d568aa446b06c0f28ad7f47b46b204f80f4d3d 100644 (file)
@@ -326,6 +326,9 @@ int virtqueue_buffer_enqueue(struct virtqueue *vq, void *cookie,
        vrq->head_free_desc = idx;
        vrq->desc_avail -= total_desc;
 
+       uk_pr_debug("Old head:%d, new head:%d, total_desc:%d\n",
+                   head_idx, idx, total_desc);
+
        virtqueue_ring_update_avail(vrq, head_idx);
        return vrq->desc_avail;
 }