diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2020-09-29 10:01:25 +0000 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2020-09-29 13:34:13 +0000 |
commit | 162a296756f3dbead55079e4670973d859df1ef9 (patch) | |
tree | c24b836a83a051d809508697ba8871538a0ea040 /src/vnet/devices/virtio/virtio_pci_legacy.c | |
parent | d68faf8559da72aa6ad0526d5a86fb16587b1508 (diff) |
virtio: fix modern device queue notify
QUEUE_SELECT and QUEUE_NOTIFY_OFF registers are shared between all
workers operating on the same device and operations are not atomic
Type: fix
Change-Id: Ie017b1bfc7e3b6b4e59029f45db78eeffd9f3aeb
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/virtio_pci_legacy.c')
-rw-r--r-- | src/vnet/devices/virtio/virtio_pci_legacy.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vnet/devices/virtio/virtio_pci_legacy.c b/src/vnet/devices/virtio/virtio_pci_legacy.c index cf1d84135aa..1426a7035a2 100644 --- a/src/vnet/devices/virtio/virtio_pci_legacy.c +++ b/src/vnet/devices/virtio/virtio_pci_legacy.c @@ -203,9 +203,16 @@ virtio_pci_legacy_del_queue (vlib_main_t * vm, virtio_if_t * vif, vlib_pci_write_io_u32 (vm, vif->pci_dev_handle, VIRTIO_PCI_QUEUE_PFN, &src); } +static u16 +virtio_pci_legacy_get_queue_notify_off (vlib_main_t * vm, virtio_if_t * vif, + u16 queue_id) +{ + return 0; +} + inline void virtio_pci_legacy_notify_queue (vlib_main_t * vm, virtio_if_t * vif, - u16 queue_id) + u16 queue_id, u16 queue_notify_off) { vlib_pci_write_io_u16 (vm, vif->pci_dev_handle, VIRTIO_PCI_QUEUE_NOTIFY, &queue_id); @@ -364,6 +371,7 @@ const virtio_pci_func_t virtio_pci_legacy_func = { .set_queue_size = virtio_pci_legacy_set_queue_num, .setup_queue = virtio_pci_legacy_setup_queue, .del_queue = virtio_pci_legacy_del_queue, + .get_queue_notify_off = virtio_pci_legacy_get_queue_notify_off, .notify_queue = virtio_pci_legacy_notify_queue, .set_config_irq = virtio_pci_legacy_set_config_irq, .set_queue_irq = virtio_pci_legacy_set_queue_irq, |