summaryrefslogtreecommitdiff
path: root/drivers/net/virtio/virtio_pci.c
diff options
context:
space:
mode:
authorHuawei Xie <huawei.xie@intel.com>2016-06-02 00:12:13 +0800
committerYuanhan Liu <yuanhan.liu@linux.intel.com>2016-06-22 06:10:54 +0200
commit01ad44fd374fb8ecb9ecc80b9bfd1f45dbaa4a1f (patch)
tree4740d99c080a9b22b69e761dae5745ebd50623e6 /drivers/net/virtio/virtio_pci.c
parent88c107840d67662f2f34e6fd69844f5e86a86075 (diff)
downloaddpdk-next-eventdev-01ad44fd374fb8ecb9ecc80b9bfd1f45dbaa4a1f.zip
dpdk-next-eventdev-01ad44fd374fb8ecb9ecc80b9bfd1f45dbaa4a1f.tar.gz
dpdk-next-eventdev-01ad44fd374fb8ecb9ecc80b9bfd1f45dbaa4a1f.tar.xz
net/virtio: split Rx/Tx queue
We keep a common vq structure, containing only vq related fields, and then split others into RX, TX and control queue respectively. Signed-off-by: Huawei Xie <huawei.xie@intel.com> [Jianfeng Tan: found and fixed 2 bugs] Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Diffstat (limited to 'drivers/net/virtio/virtio_pci.c')
-rw-r--r--drivers/net/virtio/virtio_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 9c9a3dd..941081d 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -218,7 +218,7 @@ legacy_setup_queue(struct virtio_hw *hw, struct virtqueue *vq)
rte_eal_pci_ioport_write(&hw->io, &vq->vq_queue_index, 2,
VIRTIO_PCI_QUEUE_SEL);
- src = vq->mz->phys_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT;
+ src = vq->vq_ring_mem >> VIRTIO_PCI_QUEUE_ADDR_SHIFT;
rte_eal_pci_ioport_write(&hw->io, &src, 4, VIRTIO_PCI_QUEUE_PFN);
}
@@ -441,7 +441,7 @@ modern_setup_queue(struct virtio_hw *hw, struct virtqueue *vq)
uint64_t desc_addr, avail_addr, used_addr;
uint16_t notify_off;
- desc_addr = vq->mz->phys_addr;
+ desc_addr = vq->vq_ring_mem;
avail_addr = desc_addr + vq->vq_nentries * sizeof(struct vring_desc);
used_addr = RTE_ALIGN_CEIL(avail_addr + offsetof(struct vring_avail,
ring[vq->vq_nentries]),