From ff9166443069b232bac41bbdc02423e9cbf6ecc2 Mon Sep 17 00:00:00 2001 From: Ouyang Changchun Date: Thu, 24 Jul 2014 12:57:45 +0800 Subject: [PATCH] virtio: fix build with debug Fix 2 compilation issues in virtio PMD when dump option is enabled. These errors were introduced by commits f37cdfde46a30 (remove unused virtqueue name) and ce65e697c67ba (simplify the hardware structure). Signed-off-by: Changchun Ouyang Acked-by: Thomas Monjalon --- lib/librte_pmd_virtio/virtio_ethdev.c | 2 +- lib/librte_pmd_virtio/virtqueue.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c index b9f552938e..6293ac662a 100644 --- a/lib/librte_pmd_virtio/virtio_ethdev.c +++ b/lib/librte_pmd_virtio/virtio_ethdev.c @@ -580,7 +580,7 @@ virtio_negotiate_features(struct virtio_hw *hw) /* Prepare guest_features: feature that driver wants to support */ hw->guest_features = VTNET_FEATURES & ~mask; PMD_INIT_LOG(DEBUG, "guest_features before negotiate = %x", - guest_features); + hw->guest_features); /* Read device(host) feature bits */ host_features = VIRTIO_READ_REG_4(hw, VIRTIO_PCI_HOST_FEATURES); diff --git a/lib/librte_pmd_virtio/virtqueue.h b/lib/librte_pmd_virtio/virtqueue.h index 02fe00b9ba..87db35ff9d 100644 --- a/lib/librte_pmd_virtio/virtqueue.h +++ b/lib/librte_pmd_virtio/virtqueue.h @@ -269,10 +269,10 @@ virtqueue_notify(struct virtqueue *vq) used_idx = (vq)->vq_ring.used->idx; \ nused = (uint16_t)(used_idx - (vq)->vq_used_cons_idx); \ PMD_INIT_LOG(DEBUG, \ - "VQ: %s - size=%d; free=%d; used=%d; desc_head_idx=%d;" \ + "VQ: - size=%d; free=%d; used=%d; desc_head_idx=%d;" \ " avail.idx=%d; used_cons_idx=%d; used.idx=%d;" \ " avail.flags=0x%x; used.flags=0x%x", \ - (vq)->vq_name, (vq)->vq_nentries, (vq)->vq_free_cnt, nused, \ + (vq)->vq_nentries, (vq)->vq_free_cnt, nused, \ (vq)->vq_desc_head_idx, (vq)->vq_ring.avail->idx, \ (vq)->vq_used_cons_idx, (vq)->vq_ring.used->idx, \ (vq)->vq_ring.avail->flags, (vq)->vq_ring.used->flags); \ -- 2.20.1