[PATCH v2 12/12] virtio_ring: Reduce logging noise

Andrew Scull
2022-04-14T14:02:14Z

Demote logs about problems with the vrings to debug level rather than
always logging. This reduces noise from the logs, especially in the fuzz
test where these cases get reached frequently.

Signed-off-by: Andrew Scull <ascull@google.com>
---
drivers/virtio/virtio_ring.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 383d574cb0..b369bf1dc2 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -197,13 +197,13 @@ void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len)
}

if (unlikely(i >= vq->vring.num)) {
- printf("(%s.%d): id %u out of range\n",
+ debug("(%s.%d): id %u out of range\n",
vq->vdev->name, vq->index, i);
return NULL;
}

if (unlikely(!vq->vring_desc_shadow[i].chain_head)) {
- printf("(%s.%d): id %u is not a head\n",
+ debug("(%s.%d): id %u is not a head\n",
vq->vdev->name, vq->index, i);
return NULL;
}
--
2.35.1.1178.g4f1659d476-goog