diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2019-01-31 13:50:56 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-02-06 17:27:44 +0000 |
commit | b74fe32d545668938a8db7f19d94c42747ef95f6 (patch) | |
tree | 34a0470d61d5c004a91087ea99e4f74fc5db93bc /src/vnet/devices/virtio/device.c | |
parent | 80659b4624d55e2d293198b06c5c6077b3ba816b (diff) |
virtio: enable msix interrupt mode
Change-Id: Idd560f3afde1dd03bc3d6fbb2070096146865f50
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/device.c')
-rw-r--r-- | src/vnet/devices/virtio/device.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/device.c b/src/vnet/devices/virtio/device.c index 78d6907d084..aa6a342f90b 100644 --- a/src/vnet/devices/virtio/device.c +++ b/src/vnet/devices/virtio/device.c @@ -324,6 +324,12 @@ virtio_interface_rx_mode_change (vnet_main_t * vnm, u32 hw_if_index, u32 qid, virtio_if_t *vif = pool_elt_at_index (mm->interfaces, hw->dev_instance); virtio_vring_t *vring = vec_elt_at_index (vif->vrings, qid); + if (vif->type == VIRTIO_IF_TYPE_PCI && !(vif->support_int_mode)) + { + vring->avail->flags |= VIRTIO_RING_FLAG_MASK_INT; + return clib_error_return (0, "interrupt mode is not supported"); + } + if (mode == VNET_HW_INTERFACE_RX_MODE_POLLING) vring->avail->flags |= VIRTIO_RING_FLAG_MASK_INT; else |