Commit 6b1e4e73 authored by Ben Walker's avatar Ben Walker
Browse files

Drop libpciaccess and switch to DPDK PCI



This patch also drops support for automatically unbinding
devices from the kernel - run scripts/setup.sh first.

Our generic pci interface is now hidden behind include/spdk/pci.h
and implemented in lib/util/pci.c. We no longer wrap the calls
in nvme_impl.h or ioat_impl.h. The implementation now only uses
DPDK and the libpciaccess dependency has been removed. If using
a version of DPDK earlier than 16.07, enumerating devices
by class code isn't available and only Intel SSDs will be
discovered. DPDK 16.07 adds enumeration by class code and all
NVMe devices will be correctly discovered.

Change-Id: I0e8bac36b5ca57df604a2b310c47342c67dc9f3c
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
parent f4140ad0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -10,6 +10,11 @@ updated by simply removing the initialization of `request_mempool`. Since the N
library user no longer needs to know the size of the internal NVMe request
structure to create the pool, the `spdk_nvme_request_size()` function was also removed.

Libpciaccess has been removed as a dependency and DPDK PCI enumeration is
used instead. Prior to DPDK 16.07 enumeration by class code was not supported,
so for earlier DPDK versions only Intel SSDs will be discovered. Starting with
DPDK 16.07 all devices will be discovered correctly by class code.

v16.08: iSCSI target, NVMe over Fabrics maturity
------------------------------------------------

+0 −5
Original line number Diff line number Diff line
@@ -56,11 +56,6 @@ CONFIG_NVME_IMPL?=nvme_impl.h
# Defaults to depending on DPDK.
CONFIG_IOAT_IMPL?=ioat_impl.h

# This item indicates using libpciaccess library or not. If enabled with y,
# libpciaccess library is used to map pci devices; else DPDK library is used to
# map pci devices.
CONFIG_PCIACCESS?=y

# Build SPDK FIO plugin. Requires FIO_SOURCE_DIR set to a valid
# fio source code directory.
CONFIG_FIO_PLUGIN?=n
+3 −4
Original line number Diff line number Diff line
@@ -8,10 +8,9 @@ operations (config cycles and mapping BARs), virtual to physical
address translation and allocating per I/O data structures.

SPDK includes a default implementation of the nvme_impl API based
on the Data Plane Development Kit ([DPDK](dpdk.org)) and
libpciaccess.  This DPDK implementation can be found in
lib/nvme/nvme_impl.h.  DPDK is currently supported on Linux and
FreeBSD only.
on the Data Plane Development Kit ([DPDK](dpdk.org)).  This DPDK
implementation can be found in lib/nvme/nvme_impl.h.  DPDK is
currently supported on Linux and FreeBSD only.

Users who want to use SPDK on other operating system, or in
userspace driver frameworks other than DPDK, will need to implement
+2 −3
Original line number Diff line number Diff line
@@ -38,20 +38,19 @@ To build SPDK, some dependencies must be installed.

Fedora/CentOS:

    sudo dnf install -y gcc gcc-c++ libpciaccess-devel CUnit-devel libaio-devel openssl-devel
    sudo dnf install -y gcc gcc-c++ CUnit-devel libaio-devel openssl-devel
    # Additional dependencies for NVMe over Fabrics:
    sudo dnf install -y libibverbs-devel librdmacm-devel

Ubuntu/Debian:

    sudo apt-get install -y gcc g++ libpciaccess-dev make libcunit1-dev libaio-dev libssl-dev
    sudo apt-get install -y gcc g++ make libcunit1-dev libaio-dev libssl-dev
    # Additional dependencies for NVMe over Fabrics:
    sudo apt-get install -y libibverbs-dev librdmacm-dev

FreeBSD:

- gcc
- libpciaccess
- gmake
- cunit
- openssl
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ SPDK_LIBS = \
	$(SPDK_ROOT_DIR)/lib/event/rpc/libspdk_app_rpc.a \

LIBS += -Wl,--whole-archive $(SPDK_LIBS) -Wl,--no-whole-archive
LIBS += -lcrypto $(PCIACCESS_LIB) $(DPDK_LIB)
LIBS += -lcrypto $(DPDK_LIB)
LIBS += $(BLOCKDEV_MODULES_LINKER_ARGS) \
	$(COPY_MODULES_LINKER_ARGS)

Loading