Skip to content

virtio 1.0 enabling for virtio pmd driver

Yuanhan Liu dpdk-dev 7 versions – Applied

Status from this message: Applied, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest9 patches 1 replyApplied
  2. v69 patches 2 repliesSuperseded
  3. v59 patches 7 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v48 patches15 repliesSuperseded
v38 patches3 repliesSuperseded
v27 patches22 repliesSuperseded
v16 patches9 repliesSuperseded

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/9virtio: don't set vring address again at queue startupdrivers/net/virtio/virtio_rxtx.c+0 -150 replies
2/9virtio: define offset as size_t typedrivers/net/virtio/virtio_pci.c drivers/net/virtio/virtio_pci.h+4 -40 replies
3/9virtio: introduce struct virtio_pci_opsdrivers/net/virtio/virtio_ethdev.c drivers/net/virtio/virtio_pci.c drivers/net/virtio/virtio_pci.h +1 more+170 -470 replies
4/9virtio: move left pci stuff to virtio_pci.cdrivers/net/virtio/virtio_ethdev.c drivers/net/virtio/virtio_pci.c+272 -2650 replies
5/9viritio: switch to 64 bit featuresdrivers/net/virtio/virtio_ethdev.c drivers/net/virtio/virtio_pci.c drivers/net/virtio/virtio_pci.h+20 -150 replies
6/9virtio: retrieve hdr_size from hw->vtnet_hdr_sizedrivers/net/virtio/virtio_rxtx.c drivers/net/virtio/virtio_rxtx_simple.c+10 -80 replies
7/9eal: pci: export pci_[un]map_devicelib/librte_eal/bsdapp/eal/eal_pci.c lib/librte_eal/bsdapp/eal/rte_eal_version.map lib/librte_eal/common/eal_common_pci.c +4 more+38 -240 replies
8/9virtio: add 1.0 supportdoc/guides/rel_notes/release_2_3.rst drivers/net/virtio/virtio_ethdev.c drivers/net/virtio/virtio_ethdev.h +3 more+450 -50 replies
9/9virtio: move VIRTIO_READ/WRITE_REG_X into virtio_pci.cdrivers/net/virtio/virtio_pci.c drivers/net/virtio/virtio_pci.h+19 -180 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchQian XuTetsuya MukawaHuawei XieSantosh ShuklaDavid Marchand
1/9T-b R-b T-b A-b
2/9T-b R-b T-b A-b
3/9T-b R-b T-b A-b
4/9T-b R-b T-b A-b
5/9T-b R-b T-b A-b
6/9T-b R-b T-b A-b
7/9T-b R-b T-b A-b T-b A-b
8/9T-b R-b T-b A-b
9/9T-b R-b T-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v7 thread

Cover letter [PATCH v7 0/9] virtio 1.0 enabling for virtio pmd driver

v7: - make checkpatch a bit happier; few (false) warnings still left.

- rebase to latest code: fixed a conflict.

v6: unfold IO_READ/WRITE_DEF macro

v5: minor fixes:

- fix wrong type of arg "offset" of read/write_dev_config(): patch 2 is newly added for that.

- check "offset + length" overflow

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 8.

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.

Rough test guide
================

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.

---
Yuanhan Liu (9):
virtio: don't set vring address again at queue startup
virtio: define offset as size_t type
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_[un]map_device
virtio: add 1.0 support
virtio: move VIRTIO_READ/WRITE_REG_X into virtio_pci.c

 doc/guides/rel_notes/release_2_3.rst            |   3 +
 drivers/net/virtio/virtio_ethdev.c              | 302 +--------
 drivers/net/virtio/virtio_ethdev.h              |   3 +-
 drivers/net/virtio/virtio_pci.c                 | 815 +++++++++++++++++++++++-
 drivers/net/virtio/virtio_pci.h                 | 124 +++-
 drivers/net/virtio/virtio_rxtx.c                |  21 +-
 drivers/net/virtio/virtio_rxtx_simple.c         |  12 +-
 drivers/net/virtio/virtqueue.h                  |   4 +-
 lib/librte_eal/bsdapp/eal/eal_pci.c             |   4 +-
 lib/librte_eal/bsdapp/eal/rte_eal_version.map   |   2 +
 lib/librte_eal/common/eal_common_pci.c          |   4 +-
 lib/librte_eal/common/eal_private.h             |  18 -
 lib/librte_eal/common/include/rte_pci.h         |  27 +
 lib/librte_eal/linuxapp/eal/eal_pci.c           |   4 +-
 lib/librte_eal/linuxapp/eal/rte_eal_version.map |   3 +
 15 files changed, 964 insertions(+), 382 deletions(-)
Signature · 1 line
1.9.0