diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2022-02-01 18:35:59 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2022-03-01 16:08:11 +0000 |
commit | 0f8912f0d6af49ec8093e3c478b48767a00b3710 (patch) | |
tree | c919de059799fb89029f470c96b81cffa9dacec3 /src/vnet/devices/virtio/virtio_pci_legacy.c | |
parent | 855ad3373ee9257ce7c917b90c638bd2f8a76da4 (diff) |
virtio: refactor code
Type: refactor
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I3788cc857023fafcc8eb6d6ff4524425026a75d8
Diffstat (limited to 'src/vnet/devices/virtio/virtio_pci_legacy.c')
-rw-r--r-- | src/vnet/devices/virtio/virtio_pci_legacy.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/devices/virtio/virtio_pci_legacy.c b/src/vnet/devices/virtio/virtio_pci_legacy.c index 1426a7035a2..d7a1c982413 100644 --- a/src/vnet/devices/virtio/virtio_pci_legacy.c +++ b/src/vnet/devices/virtio/virtio_pci_legacy.c @@ -176,10 +176,11 @@ virtio_pci_legacy_set_queue_num (vlib_main_t * vm, virtio_if_t * vif, } static u8 -virtio_pci_legacy_setup_queue (vlib_main_t * vm, virtio_if_t * vif, - u16 queue_id, void *p) +virtio_pci_legacy_setup_queue (vlib_main_t *vm, virtio_if_t *vif, u16 queue_id, + vnet_virtio_vring_t *vring) { - u64 addr = vlib_physmem_get_pa (vm, p) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT; + u64 addr = + vlib_physmem_get_pa (vm, vring->desc) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT; u32 addr2 = 0, a = (u32) addr; vlib_pci_write_io_u16 (vm, vif->pci_dev_handle, VIRTIO_PCI_QUEUE_SEL, &queue_id); |