summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/virtio_api.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2019-04-02 11:45:08 +0000
committerDamjan Marion <dmarion@me.com>2019-04-03 14:42:37 +0000
commit09a3bc50b581c72693ff6270da20a68f5781a468 (patch)
treeff87100fec6d34d0bb2301445dcd4c7024884cd7 /src/vnet/devices/virtio/virtio_api.c
parent692f9b1205be8e61c0782b0711ec2393f8203e3e (diff)
virtio: Add support for multiqueue
Change-Id: Id71ffa77e977651f219ac09d1feef334851209e1 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/virtio_api.c')
-rw-r--r--src/vnet/devices/virtio/virtio_api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/devices/virtio/virtio_api.c b/src/vnet/devices/virtio/virtio_api.c
index 5035799befe..238c6adfb43 100644
--- a/src/vnet/devices/virtio/virtio_api.c
+++ b/src/vnet/devices/virtio/virtio_api.c
@@ -159,8 +159,10 @@ virtio_pci_send_sw_interface_details (vpe_api_main_t * am,
mp->_vl_msg_id = htons (VL_API_SW_INTERFACE_VIRTIO_PCI_DETAILS);
mp->pci_addr = htonl (vif->pci_addr.as_u32);
mp->sw_if_index = htonl (vif->sw_if_index);
- mp->rx_ring_sz = htons (vif->rx_ring_sz);
- mp->tx_ring_sz = htons (vif->tx_ring_sz);
+ virtio_vring_t *vring = vec_elt_at_index (vif->rxq_vrings, 0);
+ mp->rx_ring_sz = htons (vring->size);
+ vring = vec_elt_at_index (vif->txq_vrings, 0);
+ mp->tx_ring_sz = htons (vring->size);
clib_memcpy (mp->mac_addr, vif->mac_addr, 6);
mp->features = clib_host_to_net_u64 (vif->features);