Commit Graph

6410 Commits

Author SHA1 Message Date
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
Pawel Wodkowski
34387cccec mk: introduce ldflags print target
This is inspired by pkg-config dicussion for SPDK packaging. For now it
used during nvme-cli building to remove greps on current configuration
just to discover proper LDFLAGS.

Change-Id: I18b3e7690dc27b8c418cb897e57e224850fa7435
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/428335
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-16 12:40:43 +00:00
Pawel Niedzwiecki
1c16c6c088 test/vhost: Fix vhost live migration
Fix variable name added in patch:
https://review.gerrithub.io/#/c/spdk/spdk/+/429049/

Change-Id: I0349dfd16f784a0cc92ff64beae3389c1de8b55c
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/429485
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-10-15 22:49:06 +00:00
Jim Harris
d40803609a test/iscsi: exclude *.o from ext4test.sh rsync
This will resolve out-of-space errors that have cropped
up as SPDK continues to grow.  There's no need to copy
*.o files to the mounted filesystem - we 'make clean'
right after the rsync anyways.

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

Reviewed-on: https://review.gerrithub.io/429517
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-10-15 22:20:17 +00:00
wuzhouhui
e8b0ae0393 bdev/raid: raid_bdev_remove_base_bdev: cleanup not registered raid bdev
If raid bdev creation failed, the bdev still be configuring and not
register it. For those raid bdev, raid_bdev_remove_base_bdev() should
cleanup them as well.

Change-Id: If2eda8ec80e7fdeb5e551fafe57a43a27ae0f9e6
Signed-off-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/427331
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-10-15 21:49:46 +00:00
wuzhouhui
5349f4b2d4 bdev/raid: do not set configuring raid bdev to offline
Previously, the difference between configuring and offline is
unclear, this patch just fixes it. The key difference should be
whether the raid bdev have ever registered. Offline is registered
before but unregistered now, and configuring has never registered.

According to the above, we should never set configuring raid bdev to
offline because it never got registered.

Change-Id: Id44ef6654e032993ffb8444e7e7ae3e43a9b0f16
Signed-off-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/428321
Chandler-Test-Pool: 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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-10-15 21:49:46 +00:00
Ben Walker
2c1aaa7604 pkgdep: Don't built intel-ipsec-mb as root
This leaves files created by the root user in the directory and
makes future calls to make clean fail.

Change-Id: Ie33d0d33e8c01a2d17f6991284c5118b5bd545ff
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/429282
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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>
2018-10-15 19:33:45 +00:00
Changpeng Liu
a2fdc4dd73 nvme: make identify NS id descriptors can be executed asynchronously
With Identify Namespace Identification Descriptors can be
executed asynchronously, most of functions in the controller
initialization now can be executed asynchronously now, for
host with multiple controllers this can save some time during
initialization.

Change-Id: I70e3c6c2c691134d2ae4c5969288cced1538c6cc
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/428585
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-10-15 17:57:56 +00:00
Changpeng Liu
92bf76c9a9 nvme: make identify ns can be executed asynchronously
Change-Id: I189ad8889c74937bf43bcf2c3029416ddb94976d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/425705
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2018-10-15 17:57:56 +00:00
Ziye Yang
4730cd3158 sock: set the fd with non_block flag.
Reason: For connect, we use non_block mode in
the initiator side, but we do not do it for
the accepted fd in the server side, which will
casue writev not return. And this patch can fix this.

PS: SPDK default use non block mode.

Change-Id: I709574573a089c2e63ca079829945e864d9f20c2
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/428654
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-10-15 17:57:31 +00:00
Ziye Yang
1f6a78620d iscsi: fix the iSCSI connection issue for lun hotplug
Only calling spdk_clear_all_transfer_task cannot solve all
the hotplug issue. The iSCSI task may successfully return
and own the bdev buffer inside the iSCSI task, so we need to
call this flush pdu function.

Change-Id: I255173d0880334e8acccc980a4ce04c380f64435
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/428801
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-10-15 17:57:31 +00:00
shahar salzman
ac5aa20821 lib/copy: unregister copy engine on finish
Change-Id: Idba8ad8afbf92c493d84271fd34443877993997a
Signed-off-by: shahar salzman <shahar.salzman@kaminario.com>
Reviewed-on: https://review.gerrithub.io/428305
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-10-15 17:42:20 +00:00
Pawel Kaminski
09a9130ed2 test/spdkcli: Add load and save config commands.
Change-Id: I499f54b025080ad1916acc0cf265a58c806da002
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/428494
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@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 17:32:09 +00:00
Piotr Pelplinski
36cc61388c vbdev_lvol: set optimal_io_boundary to cluster size
This patch sets optimal_io_boundary to cluster size, so that splitting
happens in bdev layer rather than blobstore layer.

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I0230cb4a188d605845a709e9c3c9061e822ef0f5

Reviewed-on: https://review.gerrithub.io/428065
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-10-15 17:29:30 +00:00
Piotr Pelplinski
acca82acf2 nvmf: set noiob no larger than mdts
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I875cc9d6a6bd1e9e9ac25ca9103a2070226ac236

Reviewed-on: https://review.gerrithub.io/428877
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-10-15 17:29:30 +00:00
Piotr Pelplinski
ddda03ef64 ctrlr_bdev: change spdk_nvmf_bdev_ctrlr_identify_ns to return void
This function doesn't return error code

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I67a8fa7393990470e509baa8934e78bc6f6a6c9e

Reviewed-on: https://review.gerrithub.io/429441
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-10-15 17:29:30 +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
Darek Stojaczyk
f0cb7b871e autorun: passthrough WITH_DPDK_DIR to autotest.sh
This variable will be used for something more than
just building SPDK, namely installing the freebsd
contigmem kernel module.

Note: Installing a module requires root priviledges
and can't be done as a part of autobuild.

Change-Id: I45cc797493cc4ff22c1f8d0dd5e4e56642d54d11
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/429186
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@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-12 23:46:14 +00:00
Pawel Wodkowski
7818939c6d util: make spdk_parse_ip_addr return -EINVAL instead -1
Change-Id: Idcdaeb5603c5fbe369884ced52e569cc3149be39
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/429228
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-10-12 23:34:27 +00:00
Pawel Wodkowski
0c2a320bcd iscsi, rpc: free init options if decoding failed
Detected aby ASAN


Change-Id: I49f160ddc20334a147f39c39015cb340d29f722b
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/429227
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-10-12 23:34:27 +00:00
shahar salzman
1ca4b47252 lib/bdev: reset bdev internal properties
Initiailize fields later assumed to be NULL

Change-Id: I61e054dd275c6c04fb3f826adc445e56f0add331
Signed-off-by: shahar salzman <shahar.salzman@kaminario.com>
Reviewed-on: https://review.gerrithub.io/428304
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: Jim Harris <james.r.harris@intel.com>
2018-10-12 22:50:02 +00:00
shahar salzman
3e868ad401 lib: reset globals to allow re-init
Change-Id: I96b5410a92f176aef11e00829fdebd36910ac2d4
Signed-off-by: shahar salzman <shahar.salzman@kaminario.com>
Reviewed-on: https://review.gerrithub.io/428302
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-12 22:50:02 +00:00
Darek Stojaczyk
d94846c7f0 autotest: remove usages of deprecated --with-raid
The RAID module is no longer marked experimental and
is now built by default. Using '--with-raid' was giving
us an additional deprecation message:

> --with-raid option ignored and is now deprecated.
> RAID module is always enabled.

Change-Id: If9cc65a4900fc93d07fa88a3ebe3498001916285
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/429179
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-10-12 22:47:50 +00:00
GangCao
e6819a3c52 lib/nvmf_tgt:remove the g_active_poll_groups variable
So far this global variable is just for tracking purpose.
Would like to remove it by now and if needed for other
usage, we can have it there later.

Change-Id: I2d1f36de46acc47bcf9ce841c0b234be40b0263c
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/429185
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-10-12 22:45:54 +00:00
yidong0635
b7201f8e7f lib/nvmf: fix a typo error
fix a typo error in lib/nvmf/nvmf_fc.h

Change-Id: I740391efe58203d0d6f5240a081f61a3b7b82d74
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/429089
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-10-12 17:40:16 +00:00
Seth Howell
5fbbb6c056 test/nvmf: Use create_transport instead of set_tgt_opts
When running these tests, we want to set the transport opts, not
necessarily the target opts. This will also open us up to doing broader
tests in the future against different transports.

Change-Id: I73112f82c371592456c65355f53f7970878a59c3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/429049
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: Changpeng Liu <changpeng.liu@intel.com>
2018-10-12 16:30:24 +00:00
Seth Howell
e6dac39cb0 nvmf/rdma: rename SPDK_NVMF_RDMA_DEFAULT_IO_UNIT_SIZE
This value for the rdma transport at least is tied very closely to the
size of the iover buffers. Changing the name makes it less confusing.

Change-Id: I8a703f023c37f794323b7280228340aa587243fe
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/428746
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-10-12 16:30:24 +00:00
Darek Stojaczyk
a9e484a660 memory: lock global mem_map only when necessary
Minor cleanup.

Change-Id: I9554163ae22836b50b954ec27ed27bcb848cb193
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/428883
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: Changpeng Liu <changpeng.liu@intel.com>
2018-10-12 16:29:30 +00:00
Ben Walker
438bae7966 nvme: Enable RNR Retry in RDMA transport
The initiator will now automatically retry sending
commands if the target is not ready.

Change-Id: I13354283f77d9ccba9645e83c77061cac1b07b0f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/428732
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-10-12 16:29:16 +00:00
GangCao
3daa9e6f75 lib/event: update the check of poller returned status
Per the definition of the poller returned value
 * return 0 to indicate that polling took place but no events were found;
 * return positive to indicate that polling took place and some events were processed;
 * return negative if the poller does not provide spin-wait information.

Have a change to compare whether positive.

Change-Id: Ic01fe7a663afeccbb145979670234e023dac1d07
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/428576
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-10-11 20:54:32 +00:00
wuzhouhui
5e2a99e508 rte_vhost: include <asm/mman.h> for CentOS-6
Gcc reports error "vhost_user.c:665: error: ‘MADV_DONTDUMP’ undeclared
(first use in this function)" when build in CentOS-6, include
<asm/mman.h> fixes it.

Change-Id: I1b19c0cb6424a8c5ad1e1dd7d1c724edeb06e171
Signed-off-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/428912
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: Jim Harris <james.r.harris@intel.com>
2018-10-11 20:47:40 +00:00
Piotr Pelplinski
ddb17216a7 nvmf: provide ctrlr to spdk_nvmf_ctrlr_identify_ns
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I90f68e9dbe00854f569f6574b9c89508f89caa43
Reviewed-on: https://review.gerrithub.io/428876
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-11 20:47:19 +00:00
Karol Latecki
1250a41664 scripts/perf: fix nvme perf scripts
Due to change of defauly Python interpreter to Python3
we need to decode byte object from check_output()
to utf-8, otherwise there is an error.

Change-Id: I83e2d79ec8c3934c5c6d00768288fbb4c5a50914
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/428172
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-10-11 20:46:18 +00:00
Seth Howell
5faf653f0c pkgdep.sh: Fix error handling for ipsec submodule
If the ipsec submodule is registered to spdk, an empty intel-ipsec-mb
directory will be created. We could potentially try to run make inside
of this empty directory, so instead do a preemptive submodule update.

Change-Id: I367fdef468bf21ef91b8354155d199cea97c3daa
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/428404
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-10-11 20:45:47 +00:00
Ben Walker
e3cd058cb4 nvme: Don't alias sgl1 when building request
This makes this particular function consistent
with all of the other functions in this file, and
I feel it is slightly more readable.

Change-Id: I99ace5b9eb45b0f706ca85a64b155444f45c9815
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/428730
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-11 20:45:27 +00:00
Ben Walker
6b2fb186f6 nvme: Make it clearer which RDMA sgl element is being filled out
While more verbose, this makes it much more obvious that
an array of SGL elements is being filled out.

Change-Id: I98b8e5d46af32c5d7dbb990e267fdfd594942081
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/428729
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-11 20:45:27 +00:00
Ben Walker
3fe0db6ca3 nvme: Correctly set RDMA num_sge value for every command
Also add some comments.

Change-Id: I97c3a44f97aa3dadc114005c10bec83ae75994cf
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/428728
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-11 20:45:27 +00:00
Ben Walker
b99136081f nvme: Add clarifying comments when building RDMA SGLs
Change-Id: I9e0fc92e422de3fc65c5048a63f4c7dcc46f7324
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/428727
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-11 20:45:27 +00:00
Liu Xiaodong
c10f8e160e jsonrpc-client: add new C client library
It's a C libary for client to call rpc method.

Change-Id: I5378747bd9dab83a41801225ba794b3910d1f5a5
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/424061
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-10-11 20:07:44 +00:00
Lance Hartmann
8337cc2d0c env_dpdk: Eliminate unneeded start group ld opt
The ENV_LINKER_ARGS was employing both the linker --[start|end]-group
and --[whole|no-whole]-archive options around the DPDK_LIBs. With
the use of whole/no-whole, the start/end bracketing is unnecessary.

Change-Id: I97a2ac22df8c6b48ba674b9b292f5eea01823901
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/428737
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-10-11 20:05:29 +00:00
Darek Stojaczyk
f4cb6c90b4 memory: register each hotplugged page separately
The problem with registering the entire hotplugged memory
region is that it won't necessarily be unregistered in one
go. Registering each hugepage separately solves that
problem.

This puts a limitation on the number of pages that can
be allocated when using RDMA. We'll hopefully lift this
limitation sometime in future - probably levereging
ibv_rereg_mr, but for now we'll have to resort to either:

 a) using 1GB hugepages
 b) preallocating memory (with [-s|--mem-size <size>] app
    param) as it will be registered as just one region no
    matter what size it is. This memory won't be returned
    to the system until the SPDK app exits.

Change-Id: I6de997fb4901b772730ba6fe995dcc0640b85749
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/428716
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: Jim Harris <james.r.harris@intel.com>
2018-10-11 18:59:11 +00:00
Darek Stojaczyk
3372a72ca9 memory: allow unregistering multiple adjacent regions at once
All mem_maps will still receive separate unregister
notification for each registered region, but the
public memory unregister API is more flexible now.

This follows the VFIO_TYPE1v2_IOMMU interface, which
allows the same.

Change-Id: Ifc008afdc6bff39d9b3b4c892c379ade10c3098e
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/428715
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: Jim Harris <james.r.harris@intel.com>
2018-10-11 18:59:11 +00:00
Darek Stojaczyk
08039550d9 memory: don't allow unregistering a part of the registered region
Added sanity checks to prevent unregistering a memory
range that wasn't registered as a one, complete region.

Change-Id: I819b57560b2e48b0802113ffff9f72949d7a148a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/425556
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>
2018-10-11 18:59:11 +00:00
Darek Stojaczyk
a33e0943b0 memory: forbid registering a memory region more than once
Removed the reference count from the registrations map.

Although technically supported, registering a single memory
region more than once had a lot of unhandled cases and could
easily lead to a segfault.

RDMA maps require all memory to be unregistered in the same
chunks the memory was registered, which is often impossible
to achieve if a region was registered more than once:

1. register region    0x0 - 0x3 -> it gets mapped to
                                   a single ibv_mr
2. register region    0x1 - 0x2 -> nothing happens, this region
                                   is already registered
3. unregister region  0x0 - 0x3 -> 0x0-0x1 gets unregistered as
                                   one region. 0x2-0x3 gets
                                   unregistered as another
                                   (leading to segfault in the
                                   the current RDMA implementation)

The problem is that the last two regions share the same ibv_mr,
which SPDK tries to free twice. The second free causes a segfault.
vtophys map handles this case by registering each 2MB chunk
separately, but this solution cannot be applied for RDMA, as
NICs put a limitation (~2048) on the number of regions registered.

Another option is to keep a refcount of each ibv_mr allocated,
and free it only when the entire region was unregistered from the
SPDK mem map. This is however very tricky and RDMAmojo mentions
that freeing a memory buffer before unregistering its ibv_mr
may lead to a segfault.

Change-Id: I545c56e24ffa55bda211dea22aeb8a55d9631fe5
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/426085
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-10-11 18:59:11 +00:00
Darek Stojaczyk
6bcd929500 memory: do not merge adjacent registrations
Prevents us from unregistering two or more separately
registered regions with a single notification.

This fixes an ibv_mr leak in RDMA. When multiple registrations
were unregistered with a single notification, only the first
ibv_mr one would be freed and the remaining memory would
possibly still remain DMA-able.

As of now, unregistering multiple complete regions with
a single unregister call is not possible. It will be
implemented later, after the rest of the code is cleaned up.

Change-Id: I7d61867fa61fd7a4a8a644ff45cab17125d63e1b
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/425555
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-10-11 18:59:11 +00:00
Darek Stojaczyk
6c30e783c1 ut/memory: refactor mem_map_alloc() tests to CUnit tests
Moved them from test/env/vtophys to test/env/memory
because that's where they should land in the first
place. Our memory ut already test allocating a mem_map,
so just extend them with an extra test case now. Since we're
a unit test rather than a fully-fledged SPDK app, we can
simplify the code a lot now - we no longer have any memory
(hugepages) registered at the beginning of our test case,
hence we no longer need to alloc multiple dummy mem maps to
iterate through all registrations - we can simply hardcode
and predict which registrations are there.

Change-Id: I82cd00ea2ad2370bdc63846874885f8c55e11d53
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/428714
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: Jim Harris <james.r.harris@intel.com>
2018-10-11 18:59:11 +00:00
Darek Stojaczyk
cb9f0f3354 memory: fix initial mem_map notifying at vaddr 0
Newly registered mem maps weren't notified at vaddr 0
as we used value "0" to denote an unitialized, unset
variable. Since we *do* register vaddr 0 in our memory
unit tests let's switch unitialized vaddr value to
something different - like UINT64_MAX.

Change-Id: I9c902165e76155e068642abb9a656f3ae8ca1105
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/428713
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-10-11 18:59:11 +00:00
Darek Stojaczyk
0d57730e29 memory: fix segfault when freeing mem map with no notify_cb
In spdk_mem_map_alloc() we only do the memory walk when
notify_cb is provided, but spdk_mem_map_free() does the
memory walk undonditionally. Not anymore.

Change-Id: Ic8dfdc5cb2c99dc58e62ab0523cf5a18ba8691cc
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/428722
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-11 18:59:11 +00:00
Seth Howell
2b6d9ce21f configure: Move checks for nasm and ipsec
The way they were previously being checked was triggering the trap and
printing out a "Configuration failed" message even though the
configuration was successful.

Change-Id: I9de4f390c603631ebf5af5555ea7164aae2b6213
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/428663
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-10-11 18:50:27 +00:00
Ziye Yang
5c263046db sock: Update the spdk_sock_getaddr function.
Purpose: We need to get the port info in other applications
(e.g., NVMe-oF TCP/IP transport)

Change-Id: I3a4636e764e44425436bb064cb0062c6f3e44035
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/428313
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-10-11 04:58:49 +00:00