diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/devices/virtio/virtio.c | 11 | ||||
-rw-r--r-- | src/vnet/devices/virtio/virtio.h | 4 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/vnet/devices/virtio/virtio.c b/src/vnet/devices/virtio/virtio.c index b8054d13e5b..73cd95e14c1 100644 --- a/src/vnet/devices/virtio/virtio.c +++ b/src/vnet/devices/virtio/virtio.c @@ -295,7 +295,8 @@ virtio_set_net_hdr_size (virtio_if_t * vif) } inline void -virtio_show (vlib_main_t * vm, u32 * hw_if_indices, u8 show_descr, u32 type) +virtio_show (vlib_main_t *vm, u32 *hw_if_indices, u8 show_descr, + virtio_if_type_t type) { u32 i, j, hw_if_index; virtio_if_t *vif; @@ -407,8 +408,8 @@ virtio_show (vlib_main_t * vm, u32 * hw_if_indices, u8 show_descr, u32 type) } vlib_cli_output (vm, " Number of RX Virtqueue %u", vif->num_rxqs); vlib_cli_output (vm, " Number of TX Virtqueue %u", vif->num_txqs); - if (vif->cxq_vring != NULL - && vif->features & VIRTIO_FEATURE (VIRTIO_NET_F_CTRL_VQ)) + if (type == VIRTIO_IF_TYPE_PCI && vif->cxq_vring != NULL && + vif->features & VIRTIO_FEATURE (VIRTIO_NET_F_CTRL_VQ)) vlib_cli_output (vm, " Number of CTRL Virtqueue 1"); vec_foreach_index (i, vif->rxq_vrings) { @@ -542,8 +543,8 @@ virtio_show (vlib_main_t * vm, u32 * hw_if_indices, u8 show_descr, u32 type) } } } - if (vif->cxq_vring != NULL - && vif->features & VIRTIO_FEATURE (VIRTIO_NET_F_CTRL_VQ)) + if (type == VIRTIO_IF_TYPE_PCI && vif->cxq_vring != NULL && + vif->features & VIRTIO_FEATURE (VIRTIO_NET_F_CTRL_VQ)) { vring = vif->cxq_vring; vlib_cli_output (vm, " Virtqueue (CTRL) %d", vring->queue_id); diff --git a/src/vnet/devices/virtio/virtio.h b/src/vnet/devices/virtio/virtio.h index 48996052e2b..87ecfcbdf71 100644 --- a/src/vnet/devices/virtio/virtio.h +++ b/src/vnet/devices/virtio/virtio.h @@ -235,8 +235,8 @@ clib_error_t *virtio_vring_free_tx (vlib_main_t * vm, virtio_if_t * vif, void virtio_vring_set_rx_queues (vlib_main_t *vm, virtio_if_t *vif); extern void virtio_free_buffers (vlib_main_t * vm, virtio_vring_t * vring); extern void virtio_set_net_hdr_size (virtio_if_t * vif); -extern void virtio_show (vlib_main_t * vm, u32 * hw_if_indices, u8 show_descr, - u32 type); +extern void virtio_show (vlib_main_t *vm, u32 *hw_if_indices, u8 show_descr, + virtio_if_type_t type); extern void virtio_set_packet_coalesce (virtio_if_t * vif); clib_error_t *virtio_set_packet_buffering (virtio_if_t * vif, u16 size); extern void virtio_pci_legacy_notify_queue (vlib_main_t * vm, |