DPDK patches and discussions
 help / color / mirror / Atom feed
From: Santosh Shukla <sshukla@mvista.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3 00/12] Add virtio support for arm/arm64
Date: Thu,  7 Jan 2016 22:02:57 +0530	[thread overview]
Message-ID: <1452184390-5994-1-git-send-email-sshukla@mvista.com> (raw)

This v3 patch uses vfio-noiommu-way to access virtio-net pci interface.
Tested for arm64 thunderX platform. Patch builds for
x86/i386/arm/armv8/thunderX.

The patchset has below dependancy:
- Kernel should be patched with Alex vfio-noiommu patch, available at linuz-next
[1].
- Anatoly's dpdk patch for vfio-noimmu, Included in this patch series but not
  for review :), It exist in this patchset only for user to pick complete blob and
  try it out.

Some Caveat:
- Only for x86 platform: Either of the config should be enable RTE_EAL_VFIO or IGB_UIO
  Right now by default both enabled. It lead to virtio pmd driver init error, as
  because v3 appraoch depends on RTE_PCI_DRV_NEED_MAPPING flag so ioport
  resource field wont update for IGB_UO case. I am working on below approach
	- Introduce new drv_flag which does not do mapping (as v3 vfio
	  approach doesn't care for mapping) and only initializes pci interface
	  for PCI bars (in particualr ioport pci bar) rd/wr operation. It will
	  be useful to rd/wr pci bars, Currently required for vfio/virtio case.
v3:
Major changes:
- Patch set uses vfio-noimmu approach to access virtio ioport bar
- Dropped rte_io.h abstraction changes done in v2 series as because vfio-noimmu
  doesn't do rd/wr access on mmaped memory so wont care for x86 style api ie..
  in/out[b,w,l] Although I am working on other patch series which will get rid
  of ifdef "sys/io.h" clutter.

Patch summary:
- Top 3 patches are old v2 patch
- 4 to 9 patches are vfio/virtio specifics.
- 10th patch is v2 patch
- Last patch is build fix patch of anatoly(s) vfio-noiommu patch.

v2:
- Removed ifdef arm.. clutter from igb_uio / virtio_ethedev files
- Introduced rte_io.h header file in generic/ and arch specifics i.e.. for
  armv7 --> rte_io_32.h, for armv8 --> rte_io_64.h.
- Removed RTE_ARCH_X86 ifdef clutter too and added rte_io.h header which nothing
  but wraps sys/io.h for x86_64 and i686
- Moved all the RTE_ARCH_ARM/64 dependancy for igb_uio case to separate header
  file named igbuio_ioport_misc.h. Now igb_uio.c will call only three function
   - igbuio_iomap
   - igbuio_ioport_register
   - igbuio_ioport_unregister
- Moved ARM/64 specific definition to include/exec-env/rte_virt_ioport.h header
- Included virtio_ioport.c/h; has all private and public api required to map
  iopci bar for non-x86 arch. Tested on thunderX and x86_64 both.
  Private api includes:
        - virtio_map_ioport
        - virtio_set_ioport_addr
  Public api includes:
        - virtio_ioport_init
        - virtio_ioport_unmap

- Last patch is the miscllanious format specifier fix identifid for 64bit case
  during regression.


v1:
- First patch adds RTE_VIRTIO_INC_VECTOR config, much needed for archs like
  arm/arm64 as they don't support vectored implementation, also wont able to
  build.
- Second patch is in-general fix for i686.
- Third patch is to emulate x86-style of {in,out}[b,w,l] api support for armv7/v8.
  As virtio-net-pci pmd driver uses those apis for port rd/wr {b,w,l}
- Fourth patch to enable VIRTIO_PMD feature in armv7/v8/thunderX config.
- Fifth patch to disable iopl syscall, As arm/arm64 linux kernel doesn't support
  them.
- Sixth patch introduces ioport memdevice called /dev/igb_ioport by which virtio
  pmd driver could able to rd/wr PCI_IOBAR.
  {applicable for arm/arm64 only, tested for arm64 as of now}


[1] https://lwn.net/Articles/660745/

Anatoly Burakov (1):
  vfio: Support for no-IOMMU mode

Rizwan Ansari (1):
  eal: pci: vfio: fix build error

Santosh Shukla (10):
  virtio: Introduce config RTE_VIRTIO_INC_VECTOR
  config: i686: set RTE_VIRTIO_INC_VECTOR=n
  linuxapp: eal: arm: Always return 0 for rte_eal_iopl_init()
  linuxapp/vfio: ignore mapping for ioport region
  virtio_pci.h: build fix for sys/io.h for non-x86 arch
  eal: pci: vfio: add rd/wr func for pci bar space
  virtio: vfio: add api support to rd/wr ioport bar
  virtio: Add capability to initialize driver for vfio interface
  virtio: vfio: Enable RTE_PCI_DRV_NEED_MAPPING flag in driver
  config: armv7/v8: Enable RTE_LIBRTE_VIRTIO_PMD

 config/common_linuxapp                         |    1 +
 config/defconfig_arm-armv7a-linuxapp-gcc       |    6 +-
 config/defconfig_arm64-armv8a-linuxapp-gcc     |    6 +-
 config/defconfig_i686-native-linuxapp-gcc      |    1 +
 config/defconfig_i686-native-linuxapp-icc      |    1 +
 drivers/net/virtio/Makefile                    |    2 +-
 drivers/net/virtio/virtio_ethdev.c             |   15 +-
 drivers/net/virtio/virtio_pci.h                |   11 ++
 drivers/net/virtio/virtio_rxtx.c               |    7 +
 drivers/net/virtio/virtio_vfio.h               |  146 ++++++++++++++++++
 lib/librte_eal/common/include/rte_pci.h        |   38 +++++
 lib/librte_eal/linuxapp/eal/Makefile           |    1 +
 lib/librte_eal/linuxapp/eal/eal.c              |    3 +
 lib/librte_eal/linuxapp/eal/eal_pci.c          |   28 ++++
 lib/librte_eal/linuxapp/eal/eal_pci_init.h     |   28 ++++
 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c     |  191 +++++++++++++++++-------
 lib/librte_eal/linuxapp/eal/eal_pci_vfio_dma.c |   84 +++++++++++
 lib/librte_eal/linuxapp/eal/eal_vfio.h         |    5 +
 18 files changed, 517 insertions(+), 57 deletions(-)
 create mode 100644 drivers/net/virtio/virtio_vfio.h
 create mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_vfio_dma.c

-- 
1.7.9.5

             reply	other threads:[~2016-01-07 16:34 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-07 16:32 Santosh Shukla [this message]
2016-01-07 16:32 ` [dpdk-dev] [PATCH v3 01/12] virtio: Introduce config RTE_VIRTIO_INC_VECTOR Santosh Shukla
2016-01-07 16:32 ` [dpdk-dev] [PATCH v3 02/12] config: i686: set RTE_VIRTIO_INC_VECTOR=n Santosh Shukla
2016-01-07 16:33 ` [dpdk-dev] [PATCH v3 03/12] linuxapp: eal: arm: Always return 0 for rte_eal_iopl_init() Santosh Shukla
2016-01-07 18:14   ` Stephen Hemminger
2016-01-09 13:18     ` Santosh Shukla
2016-01-07 16:33 ` [dpdk-dev] [PATCH v3 04/12] linuxapp/vfio: ignore mapping for ioport region Santosh Shukla
2016-01-07 18:16   ` Stephen Hemminger
2016-01-07 18:53     ` Santosh Shukla
2016-01-08  7:29       ` Yuanhan Liu
2016-01-07 16:33 ` [dpdk-dev] [PATCH v3 05/12] virtio_pci.h: build fix for sys/io.h for non-x86 arch Santosh Shukla
2016-01-07 16:33 ` [dpdk-dev] [PATCH v3 06/12] eal: pci: vfio: add rd/wr func for pci bar space Santosh Shukla
2016-01-07 18:19   ` Stephen Hemminger
2016-01-07 18:26     ` Wiles, Keith
2016-01-07 18:39       ` Stephen Hemminger
2016-01-07 18:48         ` Santosh Shukla
2016-01-07 18:46     ` Santosh Shukla
2016-01-13 14:47     ` Bruce Richardson
2016-01-07 16:33 ` [dpdk-dev] [PATCH v3 07/12] virtio: vfio: add api support to rd/wr ioport bar Santosh Shukla
2016-01-07 16:33 ` [dpdk-dev] [PATCH v3 08/12] virtio: Add capability to initialize driver for vfio interface Santosh Shukla
2016-01-07 16:33 ` [dpdk-dev] [PATCH v3 09/12] virtio: vfio: Enable RTE_PCI_DRV_NEED_MAPPING flag in driver Santosh Shukla
2016-01-07 18:20   ` Stephen Hemminger
2016-01-09 12:38     ` Santosh Shukla
2016-01-12  7:14       ` Yuanhan Liu
2016-01-13 12:18         ` Santosh Shukla
2016-01-07 16:33 ` [dpdk-dev] [PATCH v3 10/12] config: armv7/v8: Enable RTE_LIBRTE_VIRTIO_PMD Santosh Shukla
2016-01-07 16:33 ` [dpdk-dev] [PATCH v3 11/12] vfio: Support for no-IOMMU mode Santosh Shukla
2016-01-07 16:33 ` [dpdk-dev] [PATCH v3 12/12] eal: pci: vfio: fix build error Santosh Shukla
2016-01-07 17:02   ` Burakov, Anatoly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452184390-5994-1-git-send-email-sshukla@mvista.com \
    --to=sshukla@mvista.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).