diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2021-02-23 12:46:14 +0100 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2021-02-26 17:27:26 +0000 |
commit | 90ffe06c6b15b34b19ec4049fe739ecb92546add (patch) | |
tree | 0b9e713a39f8527a7bda1f5d9aea0b83cd249582 /src/vnet/devices/virtio/virtio.c | |
parent | 9c499e3a686a2421102e3b86a3924382885e2280 (diff) |
virtio: place the event fds on worker threads for pci device
Type: improvement
Change-Id: I8322bca1a9aa75c97c0fe2ff24b2f65fc43242ce
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/virtio.c')
-rw-r--r-- | src/vnet/devices/virtio/virtio.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/virtio.c b/src/vnet/devices/virtio/virtio.c index 2e49c798c7c..4f812b1e7aa 100644 --- a/src/vnet/devices/virtio/virtio.c +++ b/src/vnet/devices/virtio/virtio.c @@ -225,6 +225,7 @@ virtio_vring_set_rx_queues (vlib_main_t *vm, virtio_if_t *vif) { vnet_main_t *vnm = vnet_get_main (); virtio_vring_t *vring; + u32 i = 0; vnet_hw_if_set_input_node (vnm, vif->hw_if_index, virtio_input_node.index); @@ -251,6 +252,16 @@ virtio_vring_set_rx_queues (vlib_main_t *vm, virtio_if_t *vif) vnet_hw_if_set_rx_queue_file_index (vnm, vring->queue_index, vring->call_file_index); } + else if ((vif->type == VIRTIO_IF_TYPE_PCI) && (vif->support_int_mode) && + (vif->msix_enabled == VIRTIO_MSIX_ENABLED)) + { + u32 file_index; + file_index = + vlib_pci_get_msix_file_index (vm, vif->pci_dev_handle, i + 1); + vnet_hw_if_set_rx_queue_file_index (vnm, vring->queue_index, + file_index); + i++; + } } vnet_hw_if_update_runtime_data (vnm, vif->hw_if_index); } |