Blame SOURCES/0004-net-virtio-dump-packed-virtqueue-data.patch

b91920
From 2dc70f1db67091cc3a9131d2093da464738b31d8 Mon Sep 17 00:00:00 2001
b91920
From: Jens Freimann <jfreimann@redhat.com>
b91920
Date: Mon, 17 Dec 2018 22:31:33 +0100
b91920
Subject: [PATCH 04/18] net/virtio: dump packed virtqueue data
b91920
b91920
[ upstream commit 56785a2d6fad987c025278909307db776df59bd9 ]
b91920
b91920
Add support to dump packed virtqueue data to the
b91920
VIRTQUEUE_DUMP() macro.
b91920
b91920
Signed-off-by: Jens Freimann <jfreimann@redhat.com>
b91920
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
b91920
(cherry picked from commit 56785a2d6fad987c025278909307db776df59bd9)
b91920
Signed-off-by: Jens Freimann <jfreimann@redhat.com>
b91920
---
b91920
 drivers/net/virtio/virtqueue.h | 9 +++++++++
b91920
 1 file changed, 9 insertions(+)
b91920
b91920
diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
b91920
index d08ef9112..e9c35a553 100644
b91920
--- a/drivers/net/virtio/virtqueue.h
b91920
+++ b/drivers/net/virtio/virtqueue.h
b91920
@@ -434,6 +434,15 @@ virtqueue_notify(struct virtqueue *vq)
b91920
 	uint16_t used_idx, nused; \
b91920
 	used_idx = (vq)->vq_ring.used->idx; \
b91920
 	nused = (uint16_t)(used_idx - (vq)->vq_used_cons_idx); \
b91920
+	if (vtpci_packed_queue((vq)->hw)) { \
b91920
+		PMD_INIT_LOG(DEBUG, \
b91920
+		"VQ: - size=%d; free=%d; used_cons_idx=%d; avail_idx=%d;" \
b91920
+		"VQ: - avail_wrap_counter=%d; used_wrap_counter=%d", \
b91920
+		(vq)->vq_nentries, (vq)->vq_free_cnt, (vq)->vq_used_cons_idx, \
b91920
+		(vq)->vq_avail_idx, (vq)->avail_wrap_counter, \
b91920
+		(vq)->used_wrap_counter); \
b91920
+		break; \
b91920
+	} \
b91920
 	PMD_INIT_LOG(DEBUG, \
b91920
 	  "VQ: - size=%d; free=%d; used=%d; desc_head_idx=%d;" \
b91920
 	  " avail.idx=%d; used_cons_idx=%d; used.idx=%d;" \
b91920
-- 
b91920
2.21.0
b91920