From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <aburakov@ecsmtp.ir.intel.com>
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24])
 by dpdk.org (Postfix) with ESMTP id B4CCAB0BE
 for <dev@dpdk.org>; Fri, 13 Jun 2014 16:52:45 +0200 (CEST)
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by orsmga102.jf.intel.com with ESMTP; 13 Jun 2014 07:47:41 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.01,471,1400050800"; d="scan'208";a="557035914"
Received: from irvmail001.ir.intel.com ([163.33.26.43])
 by orsmga002.jf.intel.com with ESMTP; 13 Jun 2014 07:52:57 -0700
Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com
 [10.237.217.46])
 by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id
 s5DEqugX004305; Fri, 13 Jun 2014 15:52:56 +0100
Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1])
 by sivswdev02.ir.intel.com with ESMTP id s5DEquni017157;
 Fri, 13 Jun 2014 15:52:56 +0100
Received: (from aburakov@localhost)
 by sivswdev02.ir.intel.com with  id s5DEqsDN017153;
 Fri, 13 Jun 2014 15:52:54 +0100
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Date: Fri, 13 Jun 2014 15:52:34 +0100
Message-Id: <cover.1402670566.git.anatoly.burakov@intel.com>
X-Mailer: git-send-email 1.7.0.7
In-Reply-To: <cover.1402397285.git.anatoly.burakov@intel.com>
References: <cover.1402397285.git.anatoly.burakov@intel.com>
Subject: [dpdk-dev] [PATCH v6 00/20] Add VFIO support to DPDK
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Jun 2014 14:52:46 -0000

This patchset adds support for using VFIO instead of IGB_UIO to
map the device BARs.

VFIO is a kernel 3.6+ driver allowing secure DMA from userspace
by means of using IOMMU instead of working directly with physical
memory like igb_uio does.

Short summary:
* Adding support for VFIO in EAL PCI code
* Adding new command-line parameter for VFIO interrupt type
* Adding support for VFIO in setup.sh
* Renaming igb_uio_bind to dpdk_nic_bind and adding support for
  VFIO there
* Removing PCI ID list from igb_uio, effectively making it another
  generic PCI driver similar to pci_stub, vfio-pci et al
* Adding autotest for VFIO interrupt types
* Making igb_uio and VFIO compilation optional

v2 fixes:
* Fixed a couple of resource leaks

v3 fixes:
* Fixed various checkpatch.pl issues
* Added MSI interrupt support
* Added an option to automatically determine interrupt type
* Fixed various issues of commit atomicity

v4 fixes:
* Rebased on top of 5ebbb17281645b23359fbd49133bb639b63ba88c
* Fixed a typo in EAL command-line help text

v5 fixes:
* Fixed missing virtio change to RTE_PCI_DRV_NEED_MAPPING
* Fixed compile issue when VFIO was disabled (introduced in v3)

v6 fixes:
* Rebased on top of 36c248ebc629889fff4e7d9d17e109412ddf9ecf
* Fixed FreeBSD issue with failed unbinds (introduced in v1)
* Fixed a few issues found by checkpatch

Tested-by: Waterman Cao <waterman.cao@intel.com> 

This patch has been tested by intel.
We tested this patch with the following functions:
* Layer-2 Forwarding support
* Sample commands test
* Packet forwarding checking
* Bind and unbind VFIO driver
* Compile igb_uio driver ( Linux kernel < 3.6)
* Interrupt model test under Legacy|msi|msix
All cases passed.

Please see test environment information :
Fedora 20 x86_64, Linux Kernel 3.13.6-200,
GCC 4.8.2 Intel Xeon CPU E5-2680 v2 @ 2.80GHz NIC: Intel Niantic 82599

Anatoly Burakov (20):
  pci: move open() out of pci_map_resource, rename structs
  pci: move uio mapping code to a separate file
  pci: fixing errors in a previous commit found by checkpatch
  pci: distinguish between legitimate failures and non-fatal errors
  pci: Rename RTE_PCI_DRV_NEED_IGB_UIO to RTE_PCI_DRV_NEED_MAPPING
  igb_uio: make igb_uio compilation optional
  igb_uio: Moved interrupt type out of igb_uio
  vfio: add support for VFIO in Linuxapp targets
  vfio: add VFIO header
  interrupts: Add support for VFIO interrupts
  eal: remove -Wno-return-type for non-existent eal_hpet.c
  vfio: create mapping code for VFIO
  vfio: add multiprocess support.
  pci: enable VFIO device binding
  eal: added support for selecting VFIO interrupt type from EAL    
    command-line
  eal: make --no-huge use mmap instead of malloc
  test app: adding unit tests for VFIO EAL command-line parameter
  igb_uio: Removed PCI ID table from igb_uio
  binding script: Renamed igb_uio_bind to dpdk_nic_bind
  setup script: adding support for VFIO to setup.sh

 app/test/test_eal_flags.c                          |  36 +
 app/test/test_pci.c                                |   4 +-
 config/common_linuxapp                             |   2 +
 lib/librte_eal/bsdapp/eal/eal_pci.c                |  10 +-
 lib/librte_eal/common/Makefile                     |   1 +
 lib/librte_eal/common/eal_common_pci.c             |  16 +-
 lib/librte_eal/common/include/rte_pci.h            |   5 +-
 .../common/include/rte_pci_dev_feature_defs.h      |  46 ++
 .../common/include/rte_pci_dev_features.h          |  44 ++
 lib/librte_eal/linuxapp/Makefile                   |   2 +
 lib/librte_eal/linuxapp/eal/Makefile               |   5 +-
 lib/librte_eal/linuxapp/eal/eal.c                  |  36 +
 lib/librte_eal/linuxapp/eal/eal_interrupts.c       | 287 +++++++-
 lib/librte_eal/linuxapp/eal/eal_memory.c           |   8 +-
 lib/librte_eal/linuxapp/eal/eal_pci.c              | 476 ++-----------
 lib/librte_eal/linuxapp/eal/eal_pci_uio.c          | 431 +++++++++++
 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c         | 789 +++++++++++++++++++++
 lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c | 395 +++++++++++
 .../linuxapp/eal/include/eal_internal_cfg.h        |   3 +
 lib/librte_eal/linuxapp/eal/include/eal_pci_init.h | 116 +++
 lib/librte_eal/linuxapp/eal/include/eal_vfio.h     |  55 ++
 .../linuxapp/eal/include/exec-env/rte_interrupts.h |   4 +
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c          |  69 +-
 lib/librte_pmd_e1000/em_ethdev.c                   |   2 +-
 lib/librte_pmd_e1000/igb_ethdev.c                  |   4 +-
 lib/librte_pmd_ixgbe/ixgbe_ethdev.c                |   4 +-
 lib/librte_pmd_virtio/virtio_ethdev.c              |   2 +-
 lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c            |   2 +-
 tools/{igb_uio_bind.py => dpdk_nic_bind.py}        | 155 ++--
 tools/setup.sh                                     | 173 ++++-
 30 files changed, 2593 insertions(+), 589 deletions(-)
 create mode 100644 lib/librte_eal/common/include/rte_pci_dev_feature_defs.h
 create mode 100644 lib/librte_eal/common/include/rte_pci_dev_features.h
 create mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_uio.c
 create mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
 create mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c
 create mode 100644 lib/librte_eal/linuxapp/eal/include/eal_pci_init.h
 create mode 100644 lib/librte_eal/linuxapp/eal/include/eal_vfio.h
 rename tools/{igb_uio_bind.py => dpdk_nic_bind.py} (83%)

-- 
1.8.1.4