Re: [PATCH v2 0/7] virtio 1.0 enabling for virtio pmd driver
From: Yuanhan Liu <hidden>
Date: 2016-01-12 07:06:18
On Tue, Jan 12, 2016 at 02:58:57PM +0800, Yuanhan Liu wrote:
v2: - fix a data corruption reported by Qian, due to hdr size mismatch.
check detailes at ptach 5.
- Add missing config_irq and isr reading support from v1.
- fix comments from v1.
Almost all difference comes from virtio 1.0 are the PCI layout change:
the major configuration structures are stored at bar space, and their
location is stored at corresponding pci cap structure. Reading/parsing
them is one of the major work of patch 7.
To make handling virtio v1.0 and v0.95 co-exist well, this patch set
introduces a virtio_pci_ops structure, to add another layer so that
we could keep those vtpci_foo_bar "APIs". With that, we could do the
minimum change to add virtio 1.0 support.
Oops, I just found that I missed a simple test guide here, as promised
before. And here it is:
Firstly, you need get a virtio 1.0 supported QEMU (say, v2.5), then add
option "disable-modern=false" to qemu virtio-net-pci device to enable
virtio 1.0 (which is disabled by default).
And if you see something like following from 'lspci -v', it means virtio
1.0 is indeed enabled:
00:04.0 Ethernet controller: Red Hat, Inc Virtio network device
Subsystem: Red Hat, Inc Device 0001
Physical Slot: 4
Flags: bus master, fast devsel, latency 0, IRQ 11
I/O ports at c040 [size=64]
Memory at febf1000 (32-bit, non-prefetchable) [size=4K]
Memory at fe000000 (64-bit, prefetchable) [size=8M]
Expansion ROM at feb80000 [disabled] [size=256K]
Capabilities: [98] MSI-X: Enable+ Count=6 Masked-
==> Capabilities: [84] Vendor Specific Information: Len=14 <?>
==> Capabilities: [70] Vendor Specific Information: Len=14 <?>
==> Capabilities: [60] Vendor Specific Information: Len=10 <?>
==> Capabilities: [50] Vendor Specific Information: Len=10 <?>
==> Capabilities: [40] Vendor Specific Information: Len=10 <?>
Kernel driver in use: virtio-pci
Kernel modules: virtio_pci
After that, there wasn't anything speical comparing to the old virtio
0.95 pmd driver.
--yliu--- Yuanhan Liu (7): virtio: don't set vring address again at queue startup virtio: introduce struct virtio_pci_ops virtio: move left pci stuff to virtio_pci.c viritio: switch to 64 bit features virtio: retrieve hdr_size from hw->vtnet_hdr_size eal: pci: export pci_map_device virtio: add 1.0 support doc/guides/rel_notes/release_2_3.rst | 3 + drivers/net/virtio/virtio_ethdev.c | 301 +--------- drivers/net/virtio/virtio_ethdev.h | 3 +- drivers/net/virtio/virtio_pci.c | 768 +++++++++++++++++++++++- drivers/net/virtio/virtio_pci.h | 102 +++- drivers/net/virtio/virtio_rxtx.c | 21 +- drivers/net/virtio/virtqueue.h | 4 +- lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 6 + lib/librte_eal/common/eal_common_pci.c | 2 +- lib/librte_eal/common/eal_private.h | 11 - lib/librte_eal/common/include/rte_pci.h | 11 + lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +- lib/librte_eal/linuxapp/eal/rte_eal_version.map | 6 + 14 files changed, 899 insertions(+), 343 deletions(-) -- 1.9.0