Commit Graph

155 Commits

Author SHA1 Message Date
Pawel Wodkowski
fbe6a4a3b0 mk: set executable bit only for real libraries
Change-Id: I9f68f83472844cabe6a36f70a00f2d2cd319fc62
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/431169 (master)
Reviewed-on: https://review.gerrithub.io/435694
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-12-06 17:21:13 +00:00
Pawel Wodkowski
85bc2bbe7d configure: use mk/config.mk instead of CONFIG.local
We have hairy configuration method. First configure script uses CONFIG,
environment and arguments to produce CONFIG.local and config.h then
makefile uses CONFIG, environment and CONFIG.local to produce config.h
again. First time config.h can't be generated reliably as config.h
target in Makefile is passing MAKEFLAGS and they are unknown at
configuration phase.

Lets remove this mess by producing final mk/config.mk file and get rid
of CONFIG.local. This will also generate full build configuration in one
file instead scattering them in CONFIG and CONFIG.local.
In next patch scripts/genconfig.py can be removed.

Change-Id: I5696813312edff7e493207f7aa8569234a365ec0
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/426364
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2018-10-16 12:40:43 +00:00
Jim Harris
2c5b956ee5 mk: add spdk_lib_list_to_shared_libs
While here, change spdk_lib_list_to_files to
spdk_lib_list_to_static_libs to differentiate it from
the new spdk_lib_list_to_shared_libs.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6e5913addfbdd556fae2451d4e2b2c43feaf33ab

Reviewed-on: https://review.gerrithub.io/429286
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-10-15 16:44:36 +00:00
Seth Howell
89ef21520d Make: Add deps for each shared obj individually
This prevents the SPDK build from requirng unnecessary dependencies when
not compiling certain features. Also, fixes github issue #434

Change-Id: I7d0520474f3656ae32670313f2290e6b741c5ca8
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/426131
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-10-09 21:45:26 +00:00
Seth Howell
c779298802 Make: Build shared libs while building static libs
This will allow us to specify more granular system dependencies for each
.so file.

Change-Id: I759876e09ffb36380a503962b4be8fc9d7c71b63
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/426129
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-10-09 21:45:26 +00:00
Pawel Wodkowski
461cfcecc6 CONFIG: add missing CONFIG_ options
Also fix options that doesn't start with CONFIG_ prefix.

Change-Id: I32a24373328bab8f513d56c0c09b5a86589f690c
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/427767
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-10-04 21:31:42 +00:00
Pawel Wodkowski
c4fee1e970 mk: don't use '-include spdk/config.h'
Each file that need to check SPDK_CONFIG_* options need to include
spdk/config.h explicitly.

Change-Id: If9f2a91ac4c2b1a300dcf88ec3e2a12714ad344a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/427221
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-02 23:13:32 +00:00
Pawel Wodkowski
c5467556f0 mk: move config.h to include/spdk directory
We need to include it in devel package.


Change-Id: I823200632e8bcb9fdb86c8cb5fbf3a651a710b78
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/426839
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-02 23:13:32 +00:00
Pawel Wodkowski
ae2b2f64ea log: add a way to turn on and off stack unwinding in logs
As a side effect, if SPDK_LOG_DISABLED is used in spdk_log() as log
level then no message will be printed.

Change-Id: I2d57b60a5a310a9ef2a1187a81088d0acf828742
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/425105
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-10-02 22:09:27 +00:00
Jim Harris
1d64773c2a raid: enable by default
We kept this disabled by default originally because it lacked
multiple iov support needed for vhost and nvmf in-capsule data.
Now that support has been added, there is no reason to not
enable it automatically - it has no extra package dependencies,
so requiring users to specify --with-raid to configure is just
an extra unneeded step.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia9796370e12a6f93993e70083de36114a37851bd

Reviewed-on: https://review.gerrithub.io/426003
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-09-19 17:22:31 +00:00
Vitaliy Mysak
4a7240a7f5 make: Fix test app Makefile dependencies
Add dependency $(ENV_LIBS) for test/env/*
 as part of new variable $(ADDITIONAL_LIBS) which is direct dependency
 of $(APP) in mk/spdk.unittest.mk

This solves the problem of
 make not triggering LINKing for test/env/*
 after changes made to lib/env_dpdk/*.c

Issue was that Makefiles in test/env/*/ classified tests as unittests
 by including mk/spdk.unittest.mk
But unittests are not using env_dpdk which means that
 unittests don't relink on env_dpdk update

Change-Id: I91b6690dc92d68bc69bbf11ac5336d3a7f56e4e4
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/425665
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-09-19 15:53:29 +00:00
Paul Luse
51606ed402 bdev: Add crypto virtual bdev module
Initial support for softare AESNI_MB DPDK driver only.

Have tested (both aesni and QAT seprately and concurrrently) on underlying NVMe devices
with bdevio and a bdevperf script that runs IOs from 512B to 128K each with Q depths from
1 to 512 in powers of 2 for 30 seconds each run.

QAT can be included in the code (but not makefile) and marked as experimental
until we are ready to test in CI.  It works well on 2 systems but is a big PITA to get
the hardware setup and configured for use with DPDK (IMHO).

Change-Id: If518c3df8e74e00efa18afdf194824c5e69778fc
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/403107
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-09-17 21:23:14 +00:00
Seth Howell
407915eb6d make: move FreeBSD linker change to SYS_LIBS
This linker flag is really more important when dealing with external SO
files such as libuuid. It shoudl follow those linked options around
instead of all of our internal dependencies.

This series is aimed at fixing github issue 434

Change-Id: Iee65470632b5ab0adeb361005edc894e05c43ea4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/425441
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-14 22:56:46 +00:00
Seth Howell
6c4f29bb01 make: simplify rdma dependency linking
Instead of adding the linker flags just before application compilation
on linux, move that linking to earlier in the process. This will also be
useful for the shared library build.
This series is aimed at fixing github issue 434
Change-Id: I84bcc6bd922ddb6e48adb2dfe0b154700773cf27
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/425435
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-14 22:56:46 +00:00
Seth Howell
c58d3c445b mk: Add all external libs to sys_libs
This allows us to better distinguish between external and internal libs.
This series is aimed at fixing github issue 434
Change-Id: I2ed141f909e7c4a800df02061007b0d23da25380
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/425434
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-14 22:56:46 +00:00
Jim Harris
5e181ba84f build: explicitly link unit tests with static libraries
Unit tests define mock functions in the unit test code
itself.  This links fine with static libraries, but
doesn't work if trying to link with shared libraries.

So change the unit tests to always explicitly link
with the static libraries.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3a8a60162fcab6c73a216c4bb364175767fdc62c

Reviewed-on: https://review.gerrithub.io/422441
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-16 14:27:18 +00:00
Jim Harris
ffc1d37c53 spdk.app.mk: fix SPDK_FILTER_LIB_LIST
When we build the SPDK_FILTER_LIB_LIST, we should
maintain the dependencies between libraries.  Primary
culprit is vhost depending on scsi.  So add vhost
to SPDK_FILTER_LIB_LIST before scsi, and then stop
sorting the list unnecessarily before using it.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib22a5016aa492c30a389a498ae0360fbcec7c12b

Reviewed-on: https://review.gerrithub.io/422439
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-16 14:27:18 +00:00
Lance Hartmann
3f6f569854 shared_lib: Update shared lib build and install
Updates build and install of shared lib to conform with
standard naming conventions for shared libraries, including
the setting of the lib's soname.

Change-Id: Ib46d298ab5f77fd8c32b7c04022b546446189428
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/421936
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-16 00:27:53 +00:00
Pawel Wodkowski
848daf274b log: add backtrace option
Add '--enable-log-bt=lvl' option to show simple backtrace in following
form:

thread.c: 346:spdk_io_device_register: *ERROR*: io_device 0xf2ef80
already registered
*ERROR*: === BACKTRACE START ===
*ERROR*:   1: spdk_io_device_register() at 0x6d64df
*ERROR*:   2:  spdk_copy_engine_initialize() at 0x71059c
*ERROR*:   3:   spdk_copy_engine_subsystem_initialize() at 0x572ed0
*ERROR*:   4:    spdk_subsystem_init_next() at 0x6ca756
*ERROR*:   5:     spdk_subsystem_verify() at 0x6caba7
*ERROR*:   6:      _spdk_event_queue_run_batch() at 0x6c1ffa
*ERROR*:   7:       _spdk_reactor_run() at 0x6c5349
*ERROR*:   8:        spdk_reactors_start() at 0x6c784f
*ERROR*:   9:         spdk_app_start() at 0x6bf18e
*ERROR*: === BACKTRACE END ===

This adds additional libunwind dependency so don't enable by default.

Change-Id: Ice93d7571a000d8a57d2fedda7670c9a0b6ff7b7
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/419726
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-07-25 15:48:25 +00:00
Ben Walker
b207af9a4b build: Only link virtio bdev module if CONFIG_VIRTIO is 'y'
Change-Id: I842ab24d350ec63cce57f3f1aaabc564197cc91f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/419915
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-07-20 20:22:01 +00:00
Kunal Sablok
41586b0f1d bdev: add raid bdev module
Raid module:
============
- SPDK raid bdev module is a new bdev module which is
  responsible for striping various NVMe devices and expose the raid bdev
  to bdev layer which would enhance the performance and capacity.
- It can support theoretically 256 base devices (currently it is being
  tested max upto 8 base devices)
- Multiple strip sizes like 32KB, 64KB, 128KB, 256KB, 512KB etc is
  supported. Most of the current testing is focused on 64KB strip size.
- New RPC commands like "create raid bdev", "destroy raid bdev" and "get raid bdevs"
  are introduced to configure raid bdev dynamically in a running
SPDK system.
- Currently raid bdev configuration parameters are persisted in the
  current SPDK configuration file for across reboot support. DDF will be
introduced later.

High level testing done:
=======================
- Raid bdev is created with 8 base NVMe devices via configuration
  file and is exposed to initiator via existing methods. Initiator is
able to see a single NVMe namespace with capacity equal to sum of the
minimum capacities of 8 devices. Initiator was able to run raw
read/write workload, file system workload etc (tested with XFS file
system workload).
- Multiple raid bdevs are also created and exposed to initiator and
  tested with file system and other workloads for read/write IO.
- LVS / LVOL are created over raid bdev and exposed to initiator.
  Testing was done for raw read/write workloads and XFS file system
workloads.
- RPC testing is done where on the running SPDK system raid bdevs
  are created out of NVMe base devices. These raid bdevs (and LVOLs
over raid bdevs) are then exposed to initiator and IO workload was
tested for raw read/write and XFS file system workload.
- RPC testing is done for delete raid bdevs where all raid bdevs
  are deleted in running SPDK system.
- RPC testing is done for get raid bdevs where existing list of
  raid bdev names is printed (it can be all raid bdevs or only
online or only configuring or only offline).
- RPC testing is done where raid bdevs and underlying NVMe devices
  relationship was returned in JSON RPC commands

Change-Id: I10ae1266f8f2cca3c106e4df8c1c0993ddf435d8
Signed-off-by: Kunal Sablok <kunal.sablok@intel.com>
Reviewed-on: https://review.gerrithub.io/410484
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-16 20:50:40 +00:00
Daniel Verkamp
9539edca02 build: add sock dependency for all NVMe lib users
This will be necessary when the NVMe/TCP transport is added, which will
use the sock abstraction library.

Change-Id: I6561ccdad1ff575db2afa418eab2f2cd24806cb9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/416477
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-22 17:09:57 +00:00
Daniel Verkamp
64823f28a8 modules: rename NET_MODULES_* -> SOCK_MODULES_*
Also remove libspdk_net from the list and add it to each app that
originally linked it via NET_MODULES.

This will allow the use of SOCK_MODULES in application Makefiles without
pulling in the RPC libraries required by spdk_net.

Change-Id: Iad68ddd25bea24bba53a681c78d41e6e703f866d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/416476
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-22 17:09:57 +00:00
Daniel Verkamp
ea3c58ea77 net: split sock abstraction into lib/sock
This separates the network interface management code (interface.c and
net_rpc.c) from the socket abstraction layer, which allows users that
only want the socket abstraction to avoid pulling in the JSON RPC
libraries.

Change-Id: I9b00285a70bac0c74c73353cfa900d4f3b2e465f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/416475
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-22 17:09:57 +00:00
Daniel Verkamp
fdf5c1d7d2 build: add -lcrypto (OpenSSL) to SYS_LIBS
This is already required to build the shared library and iSCSI
components; simplify these Makefiles by adding -lcrypto to the central
SYS_LIBS in mk/spdk.common.mk.

Change-Id: I8fdaffbccc1294e24e32559387b0ed99d1deb0ce
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/415351
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-20 20:16:31 +00:00
Daniel Verkamp
6f46e272c3 build: add combined shared library (libspdk.so)
Change-Id: If48df087c145a3fd278c0ae04558d8352b01cc1a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414687
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-14 03:36:03 +00:00
Ben Walker
02d75f6237 thread: Move threading abstraction code out of util
This makes more sense as a first class library.

Change-Id: Ibd5c578f8708bd8c7d83fe1629e97c9a3316b56b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/414698
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Madhu Pai <mpai@netapp.com>
2018-06-12 15:24:07 +00:00
Sai Tallamraju
27a2d1d04d nvmf:Add RNIC HBA userspace library for FreeBSD
Change-Id: I7d929e7520007f29511299442f791038f7a4ce1d
Signed-off-by: John Meneghini <johnm@netapp.com>
Reviewed-on: https://review.gerrithub.io/409539
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-05-07 16:53:43 +00:00
Tomasz Zawadzki
5d94d6d3a5 vpp: add support for vpp comm library
This patch integrates VPP userspace TCP/IP stack,
as optional network framework to be used in SPDK.

Support is done via VPP Communications Library.

Change-Id: I4c2945c76878dbf24ff2f8612e0a21615f7d87e6
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/389566
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-17 20:33:43 -04:00
Tomasz Zawadzki
6e9293eaca blobcli: exclude vbdev_lvol from blobcli compilation
At this time blobcli makes use of all the bdev modules
during compilation. Yet vbdev_lvol does examine,
that already creates bs_dev on a bdev and loads
blobstore for all devices where lvol store exists.
Since bs_dev cannot be created on device twice,
same as blobstore cannot be loaded twice.
It prevented blobcli from displaying information
for blobstore underlying lvol store.

This patch remove vbdev_lvol from list of bdev modules
for blobcli.

Change-Id: I144ba22ec28f7f315e768745f5dd0cbbe3bbad86
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/404832
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-12 12:40:01 -04:00
Jim Harris
218dcd840a bdev/pmem: change all NVML strings to PMDK
NVML (Non Volatile Memory Library) changed its name to
PMDK (Persistent Memory Development Kit), so make the
necessary changes to the SPDK repository.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id07a87eafb4e9a3099603030c58c0e927bafa608

Reviewed-on: https://review.gerrithub.io/406256
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-07 00:07:57 -04:00
Jim Harris
2af15344ab bdev: add iSCSI initiator bdev module
This uses libiscsi to implement an iSCSI initiator bdev
module for SPDK.  Still a lots of work to do on this - posting
it in case anyone is interested in working on this further.

A number of todo items are listed in a README in the lib/bdev/iscsi
directory.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Change-Id: I060e33de0cd6796246789bf0e1bb4f2df59d8f71
Reviewed-on: https://review.gerrithub.io/390313
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-21 20:35:42 -04:00
paul luse
2191985125 bdev: Vbdev Passthru Example
Example showing the basics of a vbdev via a module that implements
the main functions, and a few extras, needed for a vbdev. The tests
also demonstrate how to configure an application to use a vbdev and
an underlying bdev

Change-Id: I67bf542143eb6532465cdb6af63c0f2ab7084c0e
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/399768
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-20 19:10:08 -04:00
Tomasz Zawadzki
e793fad5e9 vpp: dynamic compilation with VPP
Enable dynamic compilation of SPDK with VPP.

Change-Id: I9f5f7223625cbebec0d6209b5a2ce6bdcc1a04bf
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/401825
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 17:54:29 -04:00
Tomasz Zawadzki
609fb9a16b net: create NET_MODULE for compiling different net_implementations
Change-Id: Id370631770cb2e090c3efbe95cd86db4f6168c5e
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/403702
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 17:54:29 -04:00
Daniel Verkamp
245e2e9855 app/spdk_tgt: add 'make install' rule
Change-Id: Ib76031972824231ed824e53a327c7d648842ad6a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403224
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-09 09:56:44 -05:00
Daniel Verkamp
0e0a489013 build: link mock lib with --whole-archive
The unit test mock library contains wrappers that aren't directly
referenced but still need to be kept to allow the final link to work
when they are used via --wrap.  Add the spdk_mock library to the
whole-archive list to prevent it from getting removed.

Fixes build with LTO enabled.

Change-Id: I2c70be7cb517a373178d34026f9980396727f8df
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/401074
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-02-23 10:15:23 -05:00
Seth Howell
d712c310e8 Make: remove -e from subdirectory command
in gmake, -e gives precedence to variables defined in the environment.
this argument disables appending to CFLAGS or CXXFLAGS when they are set
in the environment and breaks our make configuration.

Change-Id: Id395e7edc4b243bd3805d7f5fdb3456d94893952
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/400863
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-21 13:10:29 -05:00
Jim Harris
bb24ce82a6 build: add @: to remaining 'all' targets
It is not ideal to have to add this in a bunch of
different Makefiles, but further consolidation of
Makefiles is going to be a more arduous process.

With this change, rebuilding SPDK after no changes
will result in no output - all of the "Nothing to
be done for 'all'" messages have been removed.  Note
that DPDK build output still remains - this can be
suppressed by either using an out-of-tree DPDK, or
using SKIP_DPDK_BUILD=1 when using the in-tree DPDK
submodule.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib1d45432f2baaa1d9c1b9509906ee1e77966d3ca

Reviewed-on: https://review.gerrithub.io/399918
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-14 17:38:25 -05:00
Jim Harris
36b00b7f61 build: add dummy @: to some "all" targets
This suppresses:

make[3]: Nothing to be done for 'all'.

when nothing needs to be rebuilt.

Still more work will be needed, specifically in
examples and apps directories.  But this will cover
most of lib/ and anything in unit/test that is using
the new spdk.unittest.mk.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1c0c2b88e70ec37629740aa47f612c9d46fc88fb

Reviewed-on: https://review.gerrithub.io/399725
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-14 10:40:40 -05:00
Jim Harris
29eb956793 test: use spdk.unittest.mk for nvmf unit tests
This includes removing the nvmf.unittest.mk that these
unit tests were using previously.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3b53db0a565aee910587826b37e8b43d6a324e75

Reviewed-on: https://review.gerrithub.io/399724
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-14 10:40:40 -05:00
Jim Harris
f8ad4dca9d test: use spdk.unittest.mk for json unit tests
This includes removing the json.unittest.mk that these
unit tests were using previously.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Icfa2e5a5554b686002407d1ef5328a0aecb442f1

Reviewed-on: https://review.gerrithub.io/399723
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-14 10:40:40 -05:00
Jim Harris
3465da9302 test: use spdk.unittest.mk for ioat unit tests
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I53a04187638a8ea4569b18bb4959b0bcf7f3d860

Reviewed-on: https://review.gerrithub.io/399717
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-14 10:40:40 -05:00
Jim Harris
435990003e build: make nvme.unittest.mk the common unittest .mk include
This is the first of a long line of patches which will
reduce Makefile rule duplication in all of our SPDK
unit tests.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1cd6e9e1e9cabab0a15dbcb901e4db782d73b1a4

Reviewed-on: https://review.gerrithub.io/399716
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-14 10:40:40 -05:00
Jim Harris
0db2c2ef47 test: remove explicit build rule from nvme/nvmf mk file
These aren't needed - the common %.o rule is sufficient.

As part of this patch, remove OTHER_FILES references from
nvme and nvmf unit tests, and just include these .c files
directly.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I76ab20da2f560c7997e978fcbfe28c2a4907f759

Reviewed-on: https://review.gerrithub.io/399715
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-14 10:40:40 -05:00
Jim Harris
5b9b47fae5 mk: remove -fno-omit-frame-pointer for release builds
This can make profiling more challenging, but should not
affect debugging since we still have unwind tables.

Keep the C_OPT in COMMON_CFLAGS to allow a way to
still add compile flags, even though C_OPT is now
not set by default.

This results in a 11% performance improvement on
a bdevperf microbenchmark using null bdevs.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If16fef6e94a73dfca6c10d3b7f158a12dfc70b53

Reviewed-on: https://review.gerrithub.io/393823
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-09 12:46:35 -05:00
Daniel Verkamp
543cb17248 build: remove $(ENV_CFLAGS) where not necessary
Only Makefiles for libraries that directly depend on DPDK (rather than
the SPDK env abstraction) should add $(ENV_CFLAGS).

Change-Id: Ifdf44d3ef8c42bbf7f20edd524b330d00658235b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/392818
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 12:05:59 -05:00
Dariusz Stojaczyk
9dde5e5c27 virtio: add new library virtio
Exported lib/bdev/rte_virtio as a separate
library not dependent on bdev.

Virtio is now accessible via spdk_internal/virtio.h.
The header is marked `internal`, as it's
not meant to be used by end users. It's
not handy to handle all backend-specific
(e.g. Virtio-SCSI) logic in a user code.

For now the Virtio interface is publicly
exposed only via bdev_virtio module. We
might want to consider adding a separate,
public Virtio-SCSI library in the future.

Note: this patch doesn't do any changes
to the virtio code. Everything is
moved 1:1.

Change-Id: I805e5d12d265d82b0bc5784c89fbadb81abdb278
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/388166
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-26 13:03:29 -05:00
Xiaodong Liu
b93d767fe8 nbd: add nbd stop rpc
Use soft-disconnection to stop nbd disk
Examople RPC request:
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "stop_nbd_disk",
  "params": {
    "nbd_device": "/dev/nbd0"
  }
}

Change-Id: I3d9161635b4422bbb9895914a03483dbaa6b6386
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/389781
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-07 16:23:19 -05:00
Daniel Verkamp
2e7fe8e888 build: add 'make install' rule
For now, this only installs libraries and headers; we will need to
consider which binaries should be installed and what they should be
named before we add them to the install rule.

Change-Id: I78dc8631f793d0df88cd884b0ac66406df9e4427
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/387637
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-11-27 17:58:02 -05:00