Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDMA SRQ implementation for NVMe-oF target #3

Closed
wants to merge 189 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
e133dcd
bdev/gpt: vbdev_gpt_examine: no need to read gpt if bdev is too small
Sep 5, 2018
73c8b61
bdev: free bdev_io in write_zeroes emulation
jimharris Sep 5, 2018
71abba4
test: re-enable bdevperf write_zeroes test
jimharris Sep 5, 2018
c592055
examples/ioat/verify: improve get_next_chan() error message
jimharris Sep 5, 2018
898739f
bdev: Enforce that spdk_bdev_close() is called on same thread as open()
Sep 5, 2018
f118de6
bdev: fix race condition between spdk_bdev_close and _remove_notify
Aug 24, 2018
de4d961
bdev: set iovs on correct bdev_io in spdk_bdev_io_put_buf
jimharris Sep 6, 2018
4a3458d
build: fix up shared map based on recent trace changes
jimharris Sep 5, 2018
ed53758
build: fix shared library dependencies
jimharris Sep 5, 2018
cc5fedc
build: add quiet output for recently added shared lib build
jimharris Sep 5, 2018
cab35b6
nvme: move controller setting into nvme_ctrlr_identify()
Sep 6, 2018
9ad05b3
nvme: return errno for nvme_ctrlr_set_supported_log_pages()
Sep 6, 2018
0a4a217
test/bdev: fix enomem_multi_bdev unit test
jimharris Sep 6, 2018
01e7c02
bdev: call spdk_bdev_io_get_buf before splitting
jimharris Sep 6, 2018
ff6299f
build: remove DPDK_DIR
jimharris Sep 6, 2018
8f64db1
nvmf: Add a function to get the source address for a qpair
Aug 2, 2018
a7a2e27
test/bdev: Add a unit test to expose a race condition
Sep 5, 2018
cd9518e
nvme: wrapper reset/enable Admin queue into a function
Sep 6, 2018
eb5cb3d
nvme: separate nvme_ctrlr_start() into different functions
Sep 6, 2018
e9b5420
nvme: broke up nvme_ctrlr_identify() completion into a function
Sep 6, 2018
1c79fad
nvme: add ERROR controller states in initialization
Sep 7, 2018
b6938ef
doc: clarify alternate dpdk options
lhoswdev Sep 7, 2018
c91b30d
fio_plugin: fix wrong block_size with PI
dong-liuliu Sep 10, 2018
756bf3b
nvmf: No longer send message on spdk_nvmf_qpair_disconnect
Sep 4, 2018
e06896b
nvmf/rdma: On getting a wc error, force the qpair into the error state
Sep 7, 2018
33ccbba
env/dpdk: add security checks to spdk_env_get_socket_id()
darsto Sep 8, 2018
da39500
framework: fix null deref if no tty
takeshi-yoshimura Aug 30, 2018
59caaa9
scripts: change shebang
Sep 10, 2018
a3595cb
autobuild: add shared object build to tests
Seth5141 Sep 6, 2018
60a208c
iscsi: free lun after bdev_destruct_done returns
Seth5141 Sep 10, 2018
4e58b25
log: fix the definition of SPDK_DEBUGLOG
cranechu Sep 10, 2018
18c6c07
dpdk: move submodule to latest commit
peluse Sep 10, 2018
683c70c
nvmf/rdma: Fix bug in get_peer_trid
Sep 10, 2018
1c34d1a
nvmf/rdma: Correctly hint AI_NUMERICSERV to getaddrinfo
Sep 10, 2018
311ce0e
nvmf: Add a function to get the listen addr for a qpair
Sep 7, 2018
f10a91e
nvmf: Add function to get local addr for a qpair
Sep 10, 2018
9b47c7e
nvmf/rdma: Don't release qpair resources when messages pending
Sep 7, 2018
8c5c2c5
ut/bdev_raid: Remove raid_bdev_send_passthru dependent test
Aug 31, 2018
50b51bc
bdev/raid: Create raid bdev before starting to add base bdevs to it
Aug 31, 2018
a300463
bdev/raid: Change construct_raid_bdev RPC to be consistent to other b…
Aug 31, 2018
3f57821
bdev/raid: Extract adding base bdevs from RPC and apply it to parse .…
Aug 31, 2018
dbc4e50
bdev/raid: Refactor raid_bdev_config_destroy()
Aug 31, 2018
7f78f68
bdev/raid: Use helper function to get config in destroy_raid_bdev RPC
Aug 31, 2018
6bc4a31
bdev/raid: Update the comment of raid_bdev_add_base_bdevs()
Sep 5, 2018
4c60fa9
bdev/raid: add reset handling
jimharris Aug 24, 2018
5a69eb5
test/nvmf/fio: kill nvmf_tgt before resetting NICs
jimharris Sep 10, 2018
55014dd
rpc: remove file parameters from save/load_config in rpc.py
jimharris Sep 10, 2018
412d89c
ioat: change return type of spdk_ioat_detach() to be void
ramirosen Sep 11, 2018
89762b2
blobstore: Add support for bdev_blob_queue_io in blobstore
Aug 27, 2018
44ab003
nvmf: get qp_context only on QP related event
Maciej-Szwed Sep 11, 2018
0bb86d1
iscsi: Fix the bug that mutual chap is not enabled by .ini config file
Aug 29, 2018
cf1366e
test: add nvmf multi-path testing
liang2yan Jul 23, 2018
94f87a2
nvmf/host: Add incapsule data support to nvmef host.
bharatpotnuri Aug 11, 2018
1f3f160
nvmf: Add IP based load balancing
avinashmn-wdc Aug 14, 2018
43ab58b
vhost: show failed taks status
Sep 11, 2018
f2a9507
bdev/raid: enable multiple iovs
jimharris Aug 23, 2018
13c3b14
bdev/raid: rename some of the I/O submission path functions
jimharris Sep 11, 2018
10ee6ee
bdev/raid: optimize for single base bdev case
jimharris Sep 11, 2018
aedac1a
nvmf: Add an nvmf_subsystem_create rpc
Sep 10, 2018
b67d175
nvmf: Place deprecated RPCs in a separate file
Sep 10, 2018
855633a
iscsi: Get LUN ID from task instead of Data-Out PDU to fix SCSI compl…
Sep 12, 2018
f0a2cc8
test/common: check if pid is alive before kill
karlatec Sep 12, 2018
af32aa1
test/nvmf: enable tracepoints for nvmf_tgt
karlatec Sep 10, 2018
6c391ec
nvme/rdma: clarify icdoff usage
jimharris Sep 11, 2018
9637e17
iscsi: reserve value 0xffffffff for TTT in R2T
Sep 12, 2018
8220121
lvol: _spdk_add_lvs_to_list: break loop immediately if find
Sep 12, 2018
0b802bd
test: remove '-filename' from config_filter.py
Sep 13, 2018
bd0abde
test: sort objects in JSON cofniguration tests
Sep 13, 2018
b96f97c
scripts: use python3 in all scripts
Sep 11, 2018
a61aff7
nvme: make nvme_ctrlr_identify() can be executed asynchronously
Sep 7, 2018
98b1970
nvme: make nvme_ctrlr_set_host_id() can be executed asynchronously
Sep 7, 2018
8db2997
nvme: broke up nvme_ctrlr_set_keep_alive_timeout() completion into a …
Sep 7, 2018
956bb46
nvme: make nvme_ctrlr_set_keep_alive_timeout() can be executed asynch…
Sep 7, 2018
5a02886
nvme: make nvme_ctrlr_set_doorbell_buffer_config() can be executed as…
Sep 7, 2018
8b95dba
nvme: broken up nvme_ctrlr_set_num_qpairs() into set/get functions
Sep 7, 2018
38a396d
nvme: make nvme_ctrlr_set/get_num_queues() can be executed asynchrono…
Sep 7, 2018
cf5448a
nvme: make nvme_ctrlr_configure_aer() can be executed asynchronously
Sep 10, 2018
c9b8909
blobstore: Introduce io_unit size to blobstore.
Sep 12, 2018
be2d2c7
blobfs: modify blobfs to use io_unit size instead of constant 4096 as…
Sep 12, 2018
fbb5992
lvolstore: Modify vbdev_lvol to use io_unit size instead of page size
Sep 12, 2018
c58d3c4
mk: Add all external libs to sys_libs
Seth5141 Sep 12, 2018
6c4f29b
make: simplify rdma dependency linking
Seth5141 Sep 12, 2018
407915e
make: move FreeBSD linker change to SYS_LIBS
Seth5141 Sep 12, 2018
7e40850
test/iscsi: add fio and lvol test cases with raid bdev
ChenWang01 Aug 22, 2018
d288c41
env_dpdk: change behavior of spdk_mem_map_translate
Seth5141 Sep 6, 2018
1ee27f7
env: introduce a new mem_map_ops structure
Seth5141 Sep 11, 2018
92a5fb5
vm_setup: add sshfs
Seth5141 Sep 13, 2018
f8d0f6d
iscsi: Enforce to add/remove poll group on the core allocated to the …
Sep 6, 2018
183d81d
nvmf: Move target opts to transport opts (part 2)
jnrbarnard Aug 27, 2018
51606ed
bdev: Add crypto virtual bdev module
peluse Mar 7, 2018
9eae89f
app: initializing log after DPDK
Aug 28, 2018
33aa994
vhost: rpc: fix memory leak of spdk_rpc_get_vhost_controllers
Sep 12, 2018
5968bd6
doc: add rpc example to bdev doc for crypto
peluse Sep 17, 2018
efe4c27
nvmf/rdma: Add run-time check for SEND_WITH_INVALIDATE support
Sep 14, 2018
e798875
nvmf/rdma: Improve behavior when unable to send response capsule
Sep 14, 2018
4d5f288
nvmf/rdma: Fix double complete when RNIC goes offline
Sep 14, 2018
f6e0a17
nvme: fix FC-related comments in spdk_nvme_transport_id
jimharris Sep 14, 2018
ca12cb3
scripts: add config converter
pawelkax Jul 26, 2018
5238109
nvmf: Dump new-style configuration RPCs
Sep 10, 2018
4dc0ef6
scripts: fix executable attribute for includes
Sep 12, 2018
c34d149
blobfs: align rw buffer to lba of device underneath
tomzawadzki Sep 17, 2018
6751b44
blobcli: modify blobcli to use io unit size instead of page size
tomzawadzki Sep 17, 2018
b92d187
blobstore: Add tests for bdev_blob_queue_io in blobstore
Aug 29, 2018
bf14394
nvme: printf info after error
bistack Sep 11, 2018
87eacb6
ioat: change the return type of ioat_channel_destruct() to be void
ramirosen Sep 18, 2018
4a7240a
make: Fix test app Makefile dependencies
Sep 16, 2018
2484d0d
bdev/nvme: write TransportID to config file
jimharris Sep 18, 2018
18f80e3
env_dpdk: fix comment on bits covered by map_256tb
jimharris Sep 18, 2018
1d64773
raid: enable by default
jimharris Sep 18, 2018
c484028
iscsi: add iscsi prefix in every tracepoint name
liang2yan Sep 18, 2018
33ed49d
nvmf: Remove invalid asserts
Sep 19, 2018
2eacfd8
nvmf: Generate a reasonable default subsystem serial number
Sep 10, 2018
ec1f425
test: No longer use construct_nvmf_subsystem
Sep 10, 2018
9c8435b
env: Fix spdk_ring creation and access.
jnrbarnard Sep 19, 2018
85ba606
test/iscsi: disable running_config test
karlatec Sep 20, 2018
99850ca
vm_setup: add nvme-cli repo
Seth5141 Sep 14, 2018
4ada23d
vhost_blk: Add support for blk_request_queue_io in vhost_blk
nixun Sep 13, 2018
104f7d8
test/nvmf: add fio and lvol test cases with raid bdev
ChenWang01 Aug 16, 2018
e80b3d5
bdev: Fix spdk_bdev_part_io_type_supported()
whalbawi Sep 21, 2018
0ee7ebc
Vagrant: Supply pkg information to the guest.
Seth5141 Sep 22, 2018
74d4e7e
doc: Really minor updates to NVMe-oF programmers guide
Seth5141 Sep 21, 2018
0126d70
doc: update the NVMe-oF target user guide.
Seth5141 Sep 21, 2018
1bc3837
vbdev_passthru: add support for bdev_io_wait
nixun Sep 18, 2018
bc3dfe3
bdev: Fix the second parameter `success` of spdk_bdev_io_completion_cb
Sep 25, 2018
42db922
iscsi: update iscsi trace config
liang2yan Sep 6, 2018
6c275b7
doc/nvmf: add tracepoints user guide
Jun 22, 2018
8e54e10
test: Add check to bdevperf to fail if IO size is not a block multiple
peluse Sep 18, 2018
3736862
ut/bdev_raid: Fix the failure for single base bdev case
Sep 14, 2018
9d1b859
bdev/raid: Remove duplicated error check in construct RPC
Sep 13, 2018
ed6a63d
bdev/raid: Add JSON config dump
Sep 20, 2018
ef80470
bdev/raid: Add .INI config dump
Sep 21, 2018
3b9baaf
configure: don't generate config.h during configure
Sep 21, 2018
55bc3a7
Makefile: add ifdef guards to config.h
Sep 25, 2018
4e06bb5
env: pass an spdk_mem_map_ops structure to mem_map_alloc
Seth5141 Sep 11, 2018
5d57386
env_dpdk: spdk_mem_map_translate informs user of translation size.
Seth5141 Sep 11, 2018
6820641
nvme_rdma: add checks for translation size to request funcs
Seth5141 Sep 12, 2018
8f89a67
test/vhost: fix vhost live migration tc2 & tc3
nedved1 Sep 24, 2018
03f2a46
doc/vagrant.md: update vagrant docs
Sep 22, 2018
1e4f997
bdev: do not finish unitialized modules
darsto Aug 2, 2018
713b481
test/nvmf: add waitforblk calls to rpc tests.
Seth5141 Sep 25, 2018
9bb9752
ocssd: add chunk notification log struct
jakubradtke Sep 20, 2018
7a6c692
env_dpdk: always use legacy memory management
darsto Sep 26, 2018
cafd537
test: exercise crypto rpc calls
peluse Sep 17, 2018
0c04c72
vm_setup.sh: move all installations under a single command
Seth5141 Sep 26, 2018
5ae7353
test/common: remove directory switching from vm_setup.sh
Seth5141 Sep 26, 2018
a0a92be
test/common: parallelize vm_setup.sh
Seth5141 Sep 26, 2018
e42bb74
crypto: Misc cleanup from final review
peluse Sep 18, 2018
036d923
env/dpdk: do not clean up DPDK 18.05 shared files
darsto Sep 20, 2018
2e2aba3
conf: add an example of defining RAID bdev
Comphix Sep 26, 2018
61e741e
lib/nvme: add a check for valid namespace id
Comphix Sep 27, 2018
3bb7438
fio_plugin: add more information and fix a minor error for usage guide
Sep 27, 2018
4db5688
test/nvmf: No longer use construct_nvmf_subsystem method
ChenWang01 Sep 27, 2018
369719c
crypto: move PMD driver input validation to common function
peluse Sep 27, 2018
f2d9e51
scripts/vagrant: automate vhost test VM creation
karlatec Aug 21, 2018
2aaaff5
scripts/vagrant: allow adjustable nvme img size
karlatec Sep 19, 2018
0f25ee9
test/vhost: reduce size of created raw disk file
karlatec Sep 27, 2018
f08a6ee
vhost: don't lock global vhost mutex when waiting for device start/stop
darsto Sep 21, 2018
18aeb14
crypto: fix file permissions
peluse Sep 28, 2018
6de9698
crypto: gather loop condition variables into one spot in _crypto_oper…
peluse Sep 24, 2018
b5c5d14
crypto: add error handling to claim function
peluse Sep 27, 2018
ff85266
crypto: Build QAT module when crypto is enabled
peluse Sep 28, 2018
0df515a
bdev: Remove limitation of child iov size in bdev_io_split_with_paylo…
Sep 25, 2018
3c7894f
ut/bdev: Prepare test code for submitting batched split I/Os
Sep 14, 2018
9872b99
bdev: Avoid assert when read/write to bdev fails in _spdk_bdev_io_split
Sep 27, 2018
9d4708f
bdev: Factor out queueing IO operation in _spdk_bdev_io_split
Sep 27, 2018
6fa7e38
bdev: Avoid assert and factor out queue IO operation in _bdev_write_z…
Sep 28, 2018
99ca58e
NVMe: Add support for security send/receive command
jessehui Sep 25, 2018
ad06d03
scripts/spdkcli: override configshell init
karlatec Sep 19, 2018
7bcdc55
crypto: Use bulk API to return mbufs and crypto ops in poller
peluse Sep 27, 2018
f1b3df7
test/common: Configure repo locations inline in vm_setup
Seth5141 Sep 26, 2018
80bf04e
scripts/vagrant: Make rsyncing spdk directory optional
Seth5141 Sep 26, 2018
6695ac2
scripts/vagrant: Enable test machine deployment for fedora
Seth5141 Sep 26, 2018
b7ceb75
scripts/vagrant: Add fc28 image and update docs.
Seth5141 Sep 27, 2018
30974c7
test/common: change branch of nvme-cli
Seth5141 Sep 26, 2018
86bd269
doc/vagrant.md: fix inaccuracies
Sep 27, 2018
ae2b2f6
log: add a way to turn on and off stack unwinding in logs
Sep 10, 2018
7d030ef
QoS/Bdev: add the QoS related structure and enumeration
Comphix Sep 4, 2018
c7917f2
scripts/autotest: print short info for setup.sh cleanup and status
karlatec Sep 24, 2018
b6e130e
spdkcli: Add nvmf support
pawelkax Aug 25, 2018
9d0486a
test/spdkcli: Add nvmf tests
pawelkax Aug 28, 2018
cf5dffe
test/spdkcli: Add a match file and match comparison to nvmf test
nedved1 Sep 28, 2018
5efc71b
test/vhost: Fix VM timeouts during shutdown
nedved1 Oct 2, 2018
317b9a5
test/nvmf: watiforblk in shutdown test
Seth5141 Sep 27, 2018
e1e9b05
nbd: Fix scan build failure
Oct 1, 2018
bb75b28
nbd: Refactor the function in which the fix of scan build error is added
Oct 1, 2018
b9f6300
nbd: add support for io_wait implement in nbd
nixun Sep 14, 2018
c546755
mk: move config.h to include/spdk directory
Sep 28, 2018
c4fee1e
mk: don't use '-include spdk/config.h'
Sep 27, 2018
b49d7e3
nvmf/rdma: Add shared receive queue support
EugeneKochetov Oct 4, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tags
cscope.out
dpdk-*
CUnit-Memory-Dump.xml
config.h
include/spdk/config.h
CONFIG.local
*VC.db
.vscode
Expand Down
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

### nvme

spdk_nvme_ctrlr_cmd_security_send() and spdk_nvme_ctrlr_cmd_security_receive()
were added to support sending or receiving security protocol data to or from
nvme controller.

spdk_nvme_ns_get_extended_sector_size() was added. This function includes
the metadata size per sector (if any). spdk_nvme_ns_get_sector_size() still
returns only the data size per sector, not including metadata.
Expand All @@ -22,6 +26,25 @@ does not at this time confer any SPDK ABI compatibility claims.

spdk_bdev_alias_del_all() was added to delete all alias from block device.

A new virtual bdev module has been added to perform at rest data encryption using the DPDK CryptoDev
Framework. The module initially uses a software AESNI CBC cipher with experimental support for the
Intel QAT hardware accelerator also currently implemented with support for CBC cipher. Future work
may include additional ciphers as well as consideration for authentication. NOTE: this module is
currently marked as experimental. Do not use in production.

The RAID virtual bdev module is now always enabled by default. The configure --with-raid and
--without-raid options are now ignored and deprecated and will be removed in the next release.

### Environment Abstraction Layer and Event Framework

The size parameter of spdk_mem_map_translate is now a pointer. This allows the
function to report back the actual size of the translation relative to the original
request made by the user.

A new structure spdk_mem_map_ops has been introduced to hold memory map related
callbacks. This structure is now passed as the second argument of spdk_mem_map_alloc
in lieu of the notify callback.

### iscsi

Parameter names of `set_iscsi_options` and `get_iscsi_global_params` RPC
Expand All @@ -40,6 +63,14 @@ specified. This default has been removed. Users must now explicitly specify
the location of this file to load CHAP shared secrets from a file, or use
the related iSCSI RPC methods to add them at runtime.

### NVMe-oF Target
New `configure` options `--with-rdma-srq` and `--without-rdma-srq` [default],
provide the capability to enable or disable shared receive queue support
in RDMA transport for NVMe-oF target.
Size of shared receive queue is defined by transport configuration file parameter
`MaxSRQDepth` and `nvmf_create_transport` RPC method parameter `max_srq_depth`.
Default size is 4096.

### Miscellaneous

The ReactorMask config file parameter has been deprecated. Users should
Expand All @@ -50,6 +81,30 @@ Default config file pathnames have been removed from iscsi_tgt, nvmf_tgt
and vhost. Config file pathnames may now only be specified using the
-c command line option.

Users may no longer set DPDK_DIR in their environment to specify the
location of the DPDK installation used to build SPDK. Using DPDK_DIR
has not been the documented nor recommended way to specify the DPDK
location for several releases, but removing it ensures no unexpected
surprises for users who may have DPDK_DIR defined for other reasons.
Users should just use the "configure" script to specify the DPDK
location before building SPDK.

Although we know that many developers still use Python 2 we are officially
switching to Python3 with requirement that all new code must be valid also
for Python 2 up to the EOL which is year 2020.

Invoking interpreter explicitly is forbidden for executable scripts. There
is no need to use syntax like "python ./scripts/rpc.py". All executable
scripts must contain proper shebang pointing to the right interpreter.
Scripts without shebang musn't be executable.

A Python script has been added to enable conversion of old INI config file
to new JSON-RPC config file format. This script can be found at
scripts/config_converter.py. Example how this script can be used:
~~~{.sh}
cat old_format.ini | scripts/config_converter.py > new_json_format.json
~~~

## v18.07:

### bdev
Expand Down
11 changes: 3 additions & 8 deletions CONFIG
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ CONFIG_PREFIX?=/usr/local
# Build with debug logging. Turn off for performance testing and normal usage
CONFIG_DEBUG?=n

# Show backtrace when logging message at level <= lvl (ERROR, WARN, NOTICE, DEBUG)
#CONFIG_LOG_BACKTRACE?=lvl
# Build with support of backtrace printing in log messages. Requires libunwind.
#CONFIG_LOG_BACKTRACE?=n

# Treat warnings as errors (fail the build on any warning).
CONFIG_WERROR?=n
Expand Down Expand Up @@ -66,9 +66,7 @@ CONFIG_TESTS?=y
CONFIG_ENV?=$(SPDK_ROOT_DIR)/lib/env_dpdk

# This directory should contain 'include' and 'lib' directories for your DPDK
# installation. Alternatively you can specify this on the command line
# with 'make DPDK_DIR=/path/to/dpdk'. This is only a valid entry
# when using the default SPDK environment library.
# installation.
CONFIG_DPDK_DIR?=$(SPDK_ROOT_DIR)/dpdk/build

# Build SPDK FIO plugin. Requires FIO_SOURCE_DIR set to a valid
Expand Down Expand Up @@ -102,9 +100,6 @@ CONFIG_VPP?=n
# Requires libiscsi development libraries.
CONFIG_ISCSI_INITIATOR?=n

# Build with raid
CONFIG_RAID?=n

# Enable the dependencies for building the crypto vbdev
CONFIG_CRYPTO?=n

Expand Down
25 changes: 17 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ DIRS-$(CONFIG_SHARED) += shared_lib
DIRS-y += examples app include
DIRS-$(CONFIG_TESTS) += test

.PHONY: all clean $(DIRS-y) config.h CONFIG.local mk/cc.mk cc_version cxx_version
.PHONY: all clean $(DIRS-y) include/spdk/config.h CONFIG.local mk/cc.mk cc_version cxx_version

ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
ifeq ($(CURDIR)/dpdk/build,$(CONFIG_DPDK_DIR))
Expand All @@ -52,33 +52,42 @@ endif
endif
endif

ifeq ($(CONFIG_SHARED),y)
LIB = shared_lib
else
LIB = lib
endif

all: $(DIRS-y)
clean: $(DIRS-y)
$(Q)rm -f mk/cc.mk
$(Q)rm -f config.h
$(Q)rm -f include/spdk/config.h

install: all
$(Q)echo "Installed to $(DESTDIR)$(CONFIG_PREFIX)"

shared_lib: lib
lib: $(DPDKBUILD)
app: lib
test: lib
examples: lib
app: $(LIB)
test: $(LIB)
examples: $(LIB)
pkgdep:
sh ./scripts/pkgdep.sh

$(DIRS-y): mk/cc.mk config.h
$(DIRS-y): mk/cc.mk include/spdk/config.h

mk/cc.mk:
$(Q)scripts/detect_cc.sh --cc=$(CC) --cxx=$(CXX) --lto=$(CONFIG_LTO) > $@.tmp; \
cmp -s $@.tmp $@ || mv $@.tmp $@ ; \
rm -f $@.tmp

config.h: CONFIG CONFIG.local scripts/genconfig.py
include/spdk/config.h: CONFIG CONFIG.local scripts/genconfig.py
$(Q)PYCMD=$$(cat PYTHON_COMMAND 2>/dev/null) ; \
test -z "$$PYCMD" && PYCMD=python ; \
$$PYCMD scripts/genconfig.py $(MAKEFLAGS) > $@.tmp; \
echo "#ifndef SPDK_CONFIG_H" > $@.tmp; \
echo "#define SPDK_CONFIG_H" >> $@.tmp; \
$$PYCMD scripts/genconfig.py $(MAKEFLAGS) >> $@.tmp; \
echo "#endif /* SPDK_CONFIG_H */" >> $@.tmp; \
cmp -s $@.tmp $@ || mv $@.tmp $@ ; \
rm -f $@.tmp

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ make CONFIG_RDMA=y
~~~

Users may wish to use a version of DPDK different from the submodule included
in the SPDK repository. To specify an alternate DPDK installation, run
configure with the --with-dpdk option. For example:
in the SPDK repository. Note, this includes the ability to build not only
from DPDK sources, but also just with the includes and libraries
installed via the dpdk and dpdk-devel packages. To specify an alternate DPDK
installation, run configure with the --with-dpdk option. For example:

Linux:

Expand Down
1 change: 1 addition & 0 deletions app/spdk_tgt/spdk_tgt.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

#include "spdk/stdinc.h"

#include "spdk/config.h"
#include "spdk/env.h"
#include "spdk/event.h"
#include "spdk/vhost.h"
Expand Down
12 changes: 9 additions & 3 deletions autobuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,20 @@ echo "** END ** Info for Hostname: $HOSTNAME"

timing_enter autobuild

./configure $config_params

timing_enter check_format
if [ $SPDK_RUN_CHECK_FORMAT -eq 1 ]; then
./scripts/check_format.sh
fi
timing_exit check_format

$MAKE $MAKEFLAGS clean
if [ $SPDK_BUILD_SHARED_OBJECT -eq 1 ]; then
./configure $config_params --with-shared
$MAKE $MAKEFLAGS
$MAKE $MAKEFLAGS clean
report_test_completion "shared_object_build"
fi

scanbuild=''
make_timing_label='make'
if [ $SPDK_RUN_SCANBUILD -eq 1 ] && hash scan-build; then
Expand All @@ -53,10 +59,10 @@ if [ $SPDK_RUN_UBSAN -eq 1 ]; then
fi

echo $scanbuild
$MAKE $MAKEFLAGS clean

timing_enter "$make_timing_label"
fail=0
./configure $config_params
time $scanbuild $MAKE $MAKEFLAGS || fail=1
if [ $fail -eq 1 ]; then
if [ -d $out/scan-build-tmp ]; then
Expand Down
6 changes: 6 additions & 0 deletions autotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ if [ $SPDK_TEST_BLOCKDEV -eq 1 ]; then
fi
fi

if [ $SPDK_TEST_JSON -eq 1 ]; then
run_test suite test/config_converter/test_converter.sh
fi

if [ $SPDK_TEST_EVENT -eq 1 ]; then
run_test suite test/event/event.sh
fi
Expand Down Expand Up @@ -140,6 +144,7 @@ fi
if [ $SPDK_TEST_NVMF -eq 1 ]; then
run_test suite ./test/nvmf/nvmf.sh
run_test suite ./test/nvmf/nvmfjson/json_config.sh
run_test suite ./test/spdkcli/nvmf.sh
fi

if [ $SPDK_TEST_VHOST -eq 1 ]; then
Expand Down Expand Up @@ -209,6 +214,7 @@ if [ $SPDK_TEST_LVOL -eq 1 ]; then
test_cases+="700,701,702,750,751,752,753,754,755,756,757,758,759,"
test_cases+="800,801,802,803,804,10000"
run_test suite ./test/lvol/lvol.sh --test-cases=$test_cases
run_test suite ./test/blobstore/blob_io_wait/blob_io_wait.sh
report_test_completion "lvol"
timing_exit lvol
fi
Expand Down
56 changes: 20 additions & 36 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ function usage()
echo " --prefix=path Configure installation prefix (default: /usr/local)"
echo ""
echo " --enable-debug Configure for debug builds"
echo " --enable-log-bt=lvl Show backtrace using libunwind when logging message at level <= lvl."
echo " Valid values are: ERROR, WARN, NOTICE, DEBUG."
echo " --enable-log-bt Enable support of backtrace printing in SPDK logs (requires libunwind)."
echo " --enable-werror Treat compiler warnings as errors"
echo " --enable-asan Enable address sanitizer"
echo " --enable-ubsan Enable undefined behavior sanitizer"
Expand Down Expand Up @@ -51,12 +50,12 @@ function usage()
echo " No path required."
echo " rdma [disabled]"
echo " No path required."
echo " rdma-srq [disabled]"
echo " No path required."
echo " shared Required to build spdk shared libraries."
echo " No path required."
echo " iscsi-initiator [disabled]"
echo " No path required."
echo " raid [disabled]"
echo " No path required."
echo " vtune Required to profile I/O under Intel VTune Amplifier XE."
echo " example: /opt/intel/vtune_amplifier_xe_version"
echo ""
Expand Down Expand Up @@ -93,8 +92,11 @@ for i in "$@"; do
--disable-debug)
CONFIG_DEBUG=n
;;
--enable-log-bt=*)
CONFIG_LOG_BACKTRACE=${i#*=}
--enable-log-bt)
CONFIG_LOG_BACKTRACE=y
;;
--disable-log-bt)
CONFIG_LOG_BACKTRACE=n
;;
--enable-asan)
CONFIG_ASAN=y
Expand Down Expand Up @@ -148,18 +150,23 @@ for i in "$@"; do
CONFIG_RBD=n
;;
--with-raid)
CONFIG_RAID=y
echo "Warning: the RAID module does not support multiple iovecs per request and will not work with vhost"
echo "--with-raid option ignored and is now deprecated. RAID module is always enabled."
;;
--without-raid)
CONFIG_RAID=n
echo "--without-raid option ignored and is now deprecated. RAID module is always enabled."
;;
--with-rdma)
CONFIG_RDMA=y
;;
--without-rdma)
CONFIG_RDMA=n
;;
--with-rdma-srq)
CONFIG_RDMA_SRQ=y
;;
--without-rdma-srq)
CONFIG_RDMA_SRQ=n
;;
--with-shared)
CONFIG_SHARED=y
;;
Expand Down Expand Up @@ -247,15 +254,6 @@ for i in "$@"; do
esac
done

case "$CONFIG_LOG_BACKTRACE" in
""|ERROR|WARN|NOTICE|DEBUG)
;;
*)
echo "Invalid '--enable-log-bt=$CONFIG_LOG_BACKTRACE' option. Valid levels are ERROR, WARN, NOTICE or DEBUG"
exit 1
;;
esac

if [ -z "$CONFIG_ENV" ]; then
if [ -z "$CONFIG_DPDK_DIR" ]; then
rootdir=$(readlink -f $(dirname $0))
Expand Down Expand Up @@ -339,6 +337,7 @@ than or equal to 4.14 will see significantly reduced performance.
fi

if [[ "$CONFIG_CRYPTO" = "y" ]]; then
echo NOTE: Crypto is currently marked as experimental. Do not use in production.
set +e
nasm_ver=$(nasm -v | sed 's/[^0-9]*//g' | awk '{print substr ($0, 0, 5)}')
ipsec="$(find /usr -name intel-ipsec-mb.h 2>/dev/null)"
Expand Down Expand Up @@ -429,6 +428,9 @@ fi
if [ -n "$CONFIG_RDMA_SEND_WITH_INVAL" ]; then
echo "CONFIG_RDMA_SEND_WITH_INVAL?=$CONFIG_RDMA_SEND_WITH_INVAL" >> CONFIG.local
fi
if [ -n "$CONFIG_RDMA_SRQ" ]; then
echo "CONFIG_RDMA_SRQ?=$CONFIG_RDMA_SRQ" >> CONFIG.local
fi
if [ -n "$CONFIG_SHARED" ]; then
echo "CONFIG_SHARED?=$CONFIG_SHARED" >> CONFIG.local
fi
Expand All @@ -438,9 +440,6 @@ fi
if [ -n "$CONFIG_RBD" ]; then
echo "CONFIG_RBD?=$CONFIG_RBD" >> CONFIG.local
fi
if [ -n "$CONFIG_RAID" ]; then
echo "CONFIG_RAID?=$CONFIG_RAID" >> CONFIG.local
fi
if [ -n "$CONFIG_VTUNE" ]; then
echo "CONFIG_VTUNE?=$CONFIG_VTUNE" >> CONFIG.local
fi
Expand All @@ -462,21 +461,6 @@ if [ -n "$DESTDIR" ]; then
echo "DESTDIR?=$DESTDIR" >> CONFIG.local
fi

python_command=
for interpreter in python3 python2 python ; do
type $interpreter > /dev/null 2>&1 || continue
python_command=$interpreter
break
done
if [[ -z "$python_command" ]] ; then
echo "Could not find python interpreter! Bailing out."
exit 1
fi

rm -f PYTHON_COMMAND
echo $python_command > PYTHON_COMMAND
$python_command scripts/genconfig.py > config.h

echo "done."
if [[ "$OSTYPE" == "freebsd"* ]]; then
echo "Type 'gmake' to build."
Expand Down
Loading