Skip to content

relax io barrier for aarch64 and use smp barriers for virtual pci memory

Gavin Hu dpdk-dev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 15 repliesIn review
  2. v13 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- remove virtio_pci_read/write64 APIs definitions, they are not needed and generate compiling errors like " error: unused function 'virtio_pci_write64' [-Werror,-Wunused-function]"
- update the reference link to kernel source code

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3eal/arm64: relax the io barrier for aarch64lib/librte_eal/common/include/arch/arm/rte_atomic_64.h+3 -313 replies
2/3net/virtio: virtual PCI requires smp barriersdrivers/net/virtio/virtio_pci.c+78 -302 replies
3/3crypto/virtio: virtual PCI requires smp barriersdrivers/crypto/virtio/virtio_pci.c+78 -300 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchSteve CapperPhil Yang
1/3R-b R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [dpdk-dev] [PATCH v2 0/3] relax io barrier for aarch64 and use smp barriers for virtual pci memory

Armv8's peripheral coherence order is a total order on all reads and writes to that peripheral, that makes a compiler barrier is enough for abstracted rte io barrier.

For virtual PCI devices, the virtual device memory is actually normal memory and the Hypervisor view of things takes precedence and they are within a smp configuration and smp barriers should be used, the relaxed io barrier for aarch64 becomes insufficient.

Note for the ordering of other MMIO device memories, other than PCI, stronger barriers might be required, which depends on the memory attributes assigned to the memory regions. So far I did not find occurrences of such io barriers used in non-PCI device memories within DPDK.

V2:
- remove virtio_pci_read/write64 APIs definitions, they are not needed and generate compiling errors like " error: unused function 'virtio_pci_write64' [-Werror,-Wunused-function]"
- update the reference link to kernel source code

Gavin Hu (3):
eal/arm64: relax the io barrier for aarch64 net/virtio: virtual PCI requires smp barriers crypto/virtio: virtual PCI requires smp barriers

 drivers/crypto/virtio/virtio_pci.c                 | 108 +++++++++++++++------
 drivers/net/virtio/virtio_pci.c                    | 108 +++++++++++++++------
 .../common/include/arch/arm/rte_atomic_64.h        |   6 +-
 3 files changed, 159 insertions(+), 63 deletions(-)
Signature · 1 line
2.7.4