From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gaetan.rivet@6wind.com>
Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43])
 by dpdk.org (Postfix) with ESMTP id 62DA11B1F6
 for <dev@dpdk.org>; Thu, 12 Oct 2017 12:46:05 +0200 (CEST)
Received: by mail-wm0-f43.google.com with SMTP id b189so11893956wmd.4
 for <dev@dpdk.org>; Thu, 12 Oct 2017 03:46:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=6wind-com.20150623.gappssmtp.com; s=20150623;
 h=from:to:cc:subject:date:message-id:in-reply-to:references;
 bh=p8Q+hf85zSZitWEKKrZFivsna6+jbyiIB7kt+RVVmi4=;
 b=rdi9eYaKbnG/eW3sqPF3+U1diqFSTI7yYMon22mO3lw1UApOWSK5ETinL+nEzmNeKV
 JHlagM5q3kDfVE+b4MWVO0EJEs+OqL5rIH0fpKfNj1teomSqd4E8/cg6dZty7nAoOny+
 B4yvfnl7spMZeV+nLGG83NiFKAsnCbkjsXzQt84JyHo05UFlWUIFm4C/Ps5pZPT19QAR
 rSMUfTeRXVfNnEEsIWgSwewSSK56K9zOGMs+HlgBz9Z2rh3MAos0knpUkcofshc6Mi4C
 EbfhaFUxX+zeH6RgrO1bifTmT3j0TxYEIIhNRiNnzTaX8GguKS9R4fqYjA1xQX+yyXzS
 hnIw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references;
 bh=p8Q+hf85zSZitWEKKrZFivsna6+jbyiIB7kt+RVVmi4=;
 b=SdIhZQ+lWszGIw18aG9XD2RhbbKipldKpis8+AvY3y5jiV2isrjw2iOtvDVNwNyzTt
 JGcDe70w2ST+CNbIlsDO21GqLFoVFnYmDSFFqr1nGsFRDLjcWCMvlPlol/ckxGzJ5oOf
 3ogINkEWmm71toEmEV1OHTudW0X798s6hCJpSEmvm/S7e8fZSeeLV0oCjmUEOOZzQa9U
 2xeRH93lEowuw6epaHKjyUv6i1NhtiENSOkA5B1ok1GC2INnyQYdWwo+LTreMMD0isFe
 RHN4uu1Mz9buC9Y3AX8kaYJD2OvY1SMHNwd6BFAYvqN9OsOVEjTotH8/UOXrfWcVSq8x
 lecg==
X-Gm-Message-State: AMCzsaXAHfLZGrJA4t4k3WjnTyxDufV8rOGXbWCFDSNbbgN7HoOO51xI
 PDI5O3hEKt8hPUMr2GBVP0LFxobz
X-Google-Smtp-Source: AOwi7QDIN39eadGjNnJviJhG9O433nXV5SgFmKpKjXLBoVxtqpEa0pl7gRo4Lye3jaRUDhnHqp867g==
X-Received: by 10.28.92.136 with SMTP id q130mr1447664wmb.104.1507805164297;
 Thu, 12 Oct 2017 03:46:04 -0700 (PDT)
Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com.
 [62.23.145.78])
 by smtp.gmail.com with ESMTPSA id z192sm16481146wmz.28.2017.10.12.03.46.03
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Thu, 12 Oct 2017 03:46:03 -0700 (PDT)
From: Gaetan Rivet <gaetan.rivet@6wind.com>
To: dev@dpdk.org
Cc: Gaetan Rivet <gaetan.rivet@6wind.com>
Date: Thu, 12 Oct 2017 12:45:27 +0200
Message-Id: <cover.1507804944.git.gaetan.rivet@6wind.com>
X-Mailer: git-send-email 2.1.4
In-Reply-To: <cover.1507795823.git.gaetan.rivet@6wind.com>
References: <cover.1507795823.git.gaetan.rivet@6wind.com>
Subject: [dpdk-dev] [PATCH v5 00/20] Move PCI away from the EAL
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <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: Thu, 12 Oct 2017 10:46:05 -0000

Hi all,

Here is a new version of the PCI bus move out of the EAL.

The EAL PCI implementation is divided in two parts:

  - librte_pci: library offering helpers to handle PCI objects
  - librte_bus_pci: bus driver for PCI devices

This allows other libraries / tools to use PCI elements (location, mappings,
parsing operations, etc) without forcing a dependency on a bus driver.

The latter should not have to export helpers that others might need. It
is focused on defining the rte_pci_device, rte_pci_driver objects and
their handling.

The cryptodev library has hard dependencies on rte_pci_devices (used by
generic probe function). Other similar libs (ether and eventdev) avoided
the issue by inlining such functions and expecting users to include the
relevant headers once the PCI bus has already been built.

After review from Declan, he proposed to submit a patch removing this dependency.
Once this patch is submitted, the relevant commit will be dropped from this
patchset.

v2:

  + Made rte_eal_using_phys_addrs common to both linux and bsd interfaces.
  + Added documentation of EAL API changes in release note.
  + Fixed a few rebase-related mistakes.
  + Fixed parallel build race condition reported by Luca Boccassi.
  + Grouped together commits breaking compilation:

    -> pci: introduce PCI lib and bus
    -> lib: include rte_bus_pci
    -> drivers: include rte_bus_pci
    -> test: include rte_bus_pci
    -> app/testpmd: include rte_bus_pci
    -> cryptodev: move PCI specific helpers to drivers/crypto

  Until all of them have been applied, compilation is broken.
  I am currently wondering whether merging some of them might
  be sensible.

  + Not included in this series:

    Several filesystem-related functions are currently
    private to the EAL and directly linked. This is not good,
    but the solution seems to be to have a new lib offering an FS abstraction.
    This seems an overreach for this patchset and should probably come in a
    second step.

v3:

  + Fixed .map versioning
  + merged one commit breaking the build into the main commit moving
    code around.

    Other such commits are still present, as they only break specific subsystems
    (lib, drivers, apps, cryptodev). Merging them all within the one main commit
    does not seem right.

    As such, build is still broken from

       * pci: introduce PCI lib and bus

    until

       * cryptodev: move PCI specific helpers to drivers/crypto

v4:

  + Rebased unto master, with new PCI functionalities integrated.
  + Removed the exposition of private EAL functions.
    While one commit did deal with this for one function, the issue is more
    widespread and should be fixed in a more generic way.
  + Introduced new PCI address parsing function,
    deprecating the old ones.
  + Fix conflict with bonding PMD regarding pci_addr_cmp function name.

v5:

  + Rebase unto master: fix a few compilation issues with the header change.
  + Make more PCI bus functions private.

               ~*~

 Compilation is still broken from

    * pci: introduce PCI lib and bus

 until

    * net/bonding: use local prefix for local function

Gaetan Rivet (20):
  eal: include debug header in bus source
  ethdev: remove useless PCI dependency
  pci: introduce PCI lib and bus
  lib: include PCI bus header
  drivers: include PCI bus header
  test: include PCI bus header
  app/testpmd: include PCI bus header
  cryptodev: move PCI specific helpers to drivers/crypto
  net/bonding: use local prefix for local function
  pci: avoid inlining functions
  pci: avoid over-complicated macro
  pci: deprecate misnamed functions
  pci: introduce PCI address parsing function
  pci: make specialized parsing functions private
  bus/pci: use new PCI addr parsing function
  bus/pci: do not expose private functions
  bus/pci: do not expose PCI match function
  bus/pci: do not expose IOVA mode getter
  doc: add notes on EAL PCI API update
  bus: rename scan policy as probe policy

 app/test-pmd/testpmd.h                           |   1 +
 config/common_base                               |  10 +
 doc/guides/rel_notes/deprecation.rst             |  10 +
 doc/guides/rel_notes/release_17_11.rst           |  28 +
 drivers/bus/Makefile                             |   2 +
 drivers/bus/pci/Makefile                         |  59 ++
 drivers/bus/pci/bsd/Makefile                     |  32 +
 drivers/bus/pci/bsd/pci.c                        | 681 +++++++++++++++++++
 drivers/bus/pci/include/rte_bus_pci.h            | 350 ++++++++++
 drivers/bus/pci/linux/Makefile                   |  37 +
 drivers/bus/pci/linux/pci.c                      | 821 +++++++++++++++++++++++
 drivers/bus/pci/linux/pci_init.h                 |  97 +++
 drivers/bus/pci/linux/pci_uio.c                  | 568 ++++++++++++++++
 drivers/bus/pci/linux/pci_vfio.c                 | 757 +++++++++++++++++++++
 drivers/bus/pci/linux/vfio_mp_sync.c             | 426 ++++++++++++
 drivers/bus/pci/pci_common.c                     | 535 +++++++++++++++
 drivers/bus/pci/pci_common_uio.c                 | 235 +++++++
 drivers/bus/pci/private.h                        | 248 +++++++
 drivers/bus/pci/rte_bus_pci_version.map          |  17 +
 drivers/crypto/Makefile                          |   4 +-
 drivers/crypto/pci/Makefile                      |  52 ++
 drivers/crypto/pci/rte_cryptodev_pci.c           | 128 ++++
 drivers/crypto/pci/rte_cryptodev_pci.h           |  94 +++
 drivers/crypto/pci/rte_cryptodev_pci_version.map |   7 +
 drivers/crypto/qat/qat_qp.c                      |   1 +
 drivers/event/octeontx/ssovf_probe.c             |   1 +
 drivers/mempool/octeontx/octeontx_fpavf.c        |   2 +-
 drivers/net/ark/ark_ethdev.c                     |   1 +
 drivers/net/avp/avp_ethdev.c                     |   2 +
 drivers/net/bnxt/bnxt.h                          |   1 +
 drivers/net/bonding/rte_eth_bond_args.c          |   5 +-
 drivers/net/cxgbe/base/adapter.h                 |   1 +
 drivers/net/cxgbe/cxgbe_ethdev.c                 |   1 +
 drivers/net/e1000/em_ethdev.c                    |   1 +
 drivers/net/e1000/igb_ethdev.c                   |   1 +
 drivers/net/e1000/igb_pf.c                       |   1 +
 drivers/net/ena/ena_ethdev.h                     |   1 +
 drivers/net/enic/base/vnic_dev.h                 |   4 +-
 drivers/net/enic/enic_ethdev.c                   |   1 +
 drivers/net/enic/enic_main.c                     |   1 +
 drivers/net/i40e/i40e_ethdev.c                   |   1 +
 drivers/net/i40e/i40e_ethdev_vf.c                |   1 +
 drivers/net/ixgbe/ixgbe_ethdev.c                 |   1 +
 drivers/net/ixgbe/ixgbe_ethdev.h                 |   1 +
 drivers/net/mlx4/mlx4_ethdev.c                   |   2 +-
 drivers/net/mlx5/mlx5.c                          |   1 +
 drivers/net/mlx5/mlx5_ethdev.c                   |   1 +
 drivers/net/nfp/nfp_nfpu.c                       |   2 +-
 drivers/net/nfp/nfp_nfpu.h                       |   2 +-
 drivers/net/octeontx/base/octeontx_pkivf.c       |   2 +-
 drivers/net/octeontx/base/octeontx_pkovf.c       |   2 +-
 drivers/net/sfc/sfc.h                            |   1 +
 drivers/net/sfc/sfc_ethdev.c                     |   1 +
 drivers/net/thunderx/nicvf_ethdev.c              |   1 +
 drivers/net/virtio/virtio_ethdev.c               |   1 +
 drivers/net/virtio/virtio_pci.h                  |   1 +
 drivers/net/vmxnet3/vmxnet3_ethdev.c             |   1 +
 lib/Makefile                                     |   2 +
 lib/librte_cryptodev/Makefile                    |   1 -
 lib/librte_cryptodev/rte_cryptodev_pci.h         |  92 ---
 lib/librte_cryptodev/rte_cryptodev_pmd.c         |  94 ---
 lib/librte_cryptodev/rte_cryptodev_version.map   |   2 -
 lib/librte_eal/bsdapp/eal/Makefile               |   3 -
 lib/librte_eal/bsdapp/eal/eal.c                  |   1 -
 lib/librte_eal/bsdapp/eal/eal_pci.c              | 680 -------------------
 lib/librte_eal/bsdapp/eal/rte_eal_version.map    |  17 -
 lib/librte_eal/common/Makefile                   |   2 +-
 lib/librte_eal/common/eal_common_bus.c           |   1 +
 lib/librte_eal/common/eal_common_devargs.c       |   6 +-
 lib/librte_eal/common/eal_common_pci.c           | 573 ----------------
 lib/librte_eal/common/eal_common_pci_uio.c       | 233 -------
 lib/librte_eal/common/eal_private.h              | 132 ----
 lib/librte_eal/common/include/rte_bus.h          |  12 +-
 lib/librte_eal/common/include/rte_pci.h          | 633 -----------------
 lib/librte_eal/linuxapp/eal/Makefile             |  10 -
 lib/librte_eal/linuxapp/eal/eal.c                |   1 -
 lib/librte_eal/linuxapp/eal/eal_interrupts.c     |   1 -
 lib/librte_eal/linuxapp/eal/eal_pci.c            | 818 ----------------------
 lib/librte_eal/linuxapp/eal/eal_pci_init.h       |  97 ---
 lib/librte_eal/linuxapp/eal/eal_pci_uio.c        | 567 ----------------
 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c       | 756 ---------------------
 lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c   | 425 ------------
 lib/librte_eal/linuxapp/eal/rte_eal_version.map  |  17 -
 lib/librte_ether/rte_ethdev.c                    |   1 -
 lib/librte_ether/rte_ethdev.h                    |   2 -
 lib/librte_ether/rte_ethdev_pci.h                |   1 +
 lib/librte_eventdev/rte_eventdev_pmd_pci.h       |   1 +
 lib/librte_pci/Makefile                          |  48 ++
 lib/librte_pci/include/rte_pci.h                 | 279 ++++++++
 lib/librte_pci/rte_pci.c                         | 220 ++++++
 lib/librte_pci/rte_pci_version.map               |  15 +
 mk/rte.app.mk                                    |   3 +
 test/test/test_kni.c                             |   1 +
 test/test/virtual_pmd.c                          |   1 +
 94 files changed, 5818 insertions(+), 5176 deletions(-)
 create mode 100644 drivers/bus/pci/Makefile
 create mode 100644 drivers/bus/pci/bsd/Makefile
 create mode 100644 drivers/bus/pci/bsd/pci.c
 create mode 100644 drivers/bus/pci/include/rte_bus_pci.h
 create mode 100644 drivers/bus/pci/linux/Makefile
 create mode 100644 drivers/bus/pci/linux/pci.c
 create mode 100644 drivers/bus/pci/linux/pci_init.h
 create mode 100644 drivers/bus/pci/linux/pci_uio.c
 create mode 100644 drivers/bus/pci/linux/pci_vfio.c
 create mode 100644 drivers/bus/pci/linux/vfio_mp_sync.c
 create mode 100644 drivers/bus/pci/pci_common.c
 create mode 100644 drivers/bus/pci/pci_common_uio.c
 create mode 100644 drivers/bus/pci/private.h
 create mode 100644 drivers/bus/pci/rte_bus_pci_version.map
 create mode 100644 drivers/crypto/pci/Makefile
 create mode 100644 drivers/crypto/pci/rte_cryptodev_pci.c
 create mode 100644 drivers/crypto/pci/rte_cryptodev_pci.h
 create mode 100644 drivers/crypto/pci/rte_cryptodev_pci_version.map
 delete mode 100644 lib/librte_cryptodev/rte_cryptodev_pci.h
 delete mode 100644 lib/librte_eal/bsdapp/eal/eal_pci.c
 delete mode 100644 lib/librte_eal/common/eal_common_pci.c
 delete mode 100644 lib/librte_eal/common/eal_common_pci_uio.c
 delete mode 100644 lib/librte_eal/common/include/rte_pci.h
 delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci.c
 delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_init.h
 delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_uio.c
 delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
 delete mode 100644 lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c
 create mode 100644 lib/librte_pci/Makefile
 create mode 100644 lib/librte_pci/include/rte_pci.h
 create mode 100644 lib/librte_pci/rte_pci.c
 create mode 100644 lib/librte_pci/rte_pci_version.map

-- 
2.1.4