Commit Graph

3706 Commits

Author SHA1 Message Date
Daniel Verkamp
3c8991eb41 autotest_common: add server addr param to waitforlisten
Allow overriding the default RPC server address.

Change-Id: I9ff11b0d8a244cbc1ca0e5b291ab2f88d0b257c8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388285
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>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
2017-11-21 16:33:55 -05:00
Daniel Verkamp
ec1551c598 test/vhost/initiator: fix discover_bdevs usage
discover_bdevs previously took a port number for the RPC service, but
after commit 6bef902ca5 ("rpc: add default UNIX domain socket listen
address"), running rpc.py with just a -p (port) parameter doesn't have
the expected effect, since the default server_addr is now a UNIX domain
socket path, and the port is ignored.

Change discover_bdevs to accept a socket path instead of a port number
to fix the issue for the vhost/initiator test; no other callers use the
disover_bdevs rpc_port argument, so this is the only instance that needs
to change.

Change-Id: I4e290f175ccc79caa3c4ef76c062641b9fe489a8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388283
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>
2017-11-21 16:33:55 -05:00
Xiaodong Liu
834a9bb7e8 vhost: remove needless if branch for bvdev/svdev
Change-Id: I362f748fa44fda8b574458cffa6f222d71e770b6
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/388348
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
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>
2017-11-21 16:10:09 -05:00
Shuhei Matsumoto
b8705bf48c iscsi: manage IG's name and mask by linked list
To add initiators to an existing target, manage name and netmask
of initiator group by linked list. It is not easy for array to
detect duplication and change configuration.

Change-Id: Id9e77740e24ac309a33d8de1be37663681160d94
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/379932
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-11-21 16:06:30 -05:00
Shuhei Matsumoto
92ef1a64ec iscsi and ut/iscsi: return code to fail of IG creation
spdk_iscsi_init_grp_create_from_configfile() returns 0 even if
creating an initiator group (IG) is failed due to empty netmask or
initiator name. This will be unexpected behavior for end users.
Hence change the return code from 0 to -ENVAL for this failure.

Besides do the following.

Change other error return codes in the function by using errno too.

Current IG don't have any UT code in repository. UT code to confirm
this fix is also submitted.

Change-Id: Ic918feb5c6a3e772b325664d881b2673b553a217
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/384408
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-21 16:06:30 -05:00
Maciej Szwed
cf6fe9b15d lvol: add unmap and write zeros support
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ic11a56c5616098ff42f31f78aa96289af5965118

Reviewed-on: https://review.gerrithub.io/387611
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-21 13:28:22 -05:00
Maciej Szwed
f6e075cd54 blobstore: add unmap and write zeros support
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: If89275acfb1560982e332148a99ed3c83f8cb34f

Reviewed-on: https://review.gerrithub.io/387609
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-21 13:28:22 -05:00
Karol Latecki
65ff2125be test/vhost: move vhost split disk tests to nightly
Move vhost tests with split disk configuration to nightly test
to save some per-patch testing time.

Change-Id: I837a66cd9b02935c3bbef1f9ae019cbf53d5869b
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/388372
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-21 13:20:13 -05:00
Karol Latecki
5764d85c09 test/vhost: fix typo in spdk_vhost.sh
Typo caused lvol blk test to not run.

Change-Id: I1e26b96757450a3ea860e0b74a0b7d976c86bdf2
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/388413
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-21 13:20:13 -05:00
lu fan
2716cd2a76 nvme_manage: retry the input command instead of just quitting.
Change-Id: Ifd924bcee94bc4e36530b42a07afb5141b150cad
Signed-off-by: lu fan <lux.fan@intel.com>
Reviewed-on: https://review.gerrithub.io/387722
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>
2017-11-20 19:36:06 -05:00
Pawel
f539bb0374 ut/vhost: move mock functions to common vhost file
Adding new functions to core vhost requires adding their equivalent
mocks in both vhost_scsi_ut and vhost_blk_ut separatly. By adding common
file "test_vhost.c", we can prevent duplicate mock functions.

Change-Id: I4542ae092e158b94b25559216e1fc46e10c1a1ae
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/383357
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
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>
2017-11-20 19:34:53 -05:00
Dariusz Stojaczyk
f53d6c7a43 rpc: only unlink unix domain socket if *we* have created it
We used to unlink the unix domain socket
regardless of who created it. Even we
got the "socket already exists" error
on init, we would still unlink the socket
on shutdown.

Change-Id: Ib14382d6d7e127d8f51f6544cbb063594e040879
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/388284
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-11-20 19:30:04 -05:00
Dariusz Stojaczyk
5bdbe36ee9 event/subsystem: fix subsystem init failure handling
Deinitialize only those subsystem that
have been fully initialized.

Change-Id: I86cdd4cda0a80c107956843ed8198072e898a743
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/386892
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-11-20 19:28:44 -05:00
Young Tack Jin
d0a4c8e0a9 bdev/nvme: support meta data on vendor specific commands
spdk_bdev_nvme_io_passthru_md() is verified on QEMU NVMe
and will be verified on Cosmos mini OpenSSD.

Change-Id: Ib759b6b6095deaa4ae7cf746f3a241f678295605
Signed-off-by: Young Tack Jin <youngtack.jin@circuitblvd.com>
Reviewed-on: https://review.gerrithub.io/387114
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>
2017-11-20 19:26:48 -05:00
Daniel Verkamp
7c2ad9e3be config: default CONFIG_DPDK_DIR to dpdk submodule
This allows 'make' without 'configure' to work out of the box if the
user has already updated the dpdk submodule.

Using 'configure' is still the recommended way to build SPDK.

Change-Id: I59fda03197939a745d2ed92b4d15ae0d7d8cdba5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388053
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-20 19:24:46 -05:00
John Meneghini
70b1de2d03 env: add conditional compile to remove rlimit code
- for environments that don't support rlimits

Change-Id: I6dde1eb9e1cb2274462a450625d8bc70a3889163
Signed-off-by: John Meneghini <johnm@netapp.com>
Reviewed-on: https://review.gerrithub.io/386355
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
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>
2017-11-20 19:16:42 -05:00
Cunyin Chang
5de74d085d nvmf: Fix the bug when destroy rdma queue pair.
We probably do not allocate the mgmt_channel when we destroy the
rdma queue pair, add the judgment before put the io channnel.

Change-Id: I528c9686907c04c5025ff9d3872f24f2996e9d33
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/388159
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-11-20 16:48:15 -05:00
Daniel Verkamp
d244764809 dpdk: switch DPDK submodule to spdk-17.11 branch
Change-Id: I162bfd8090bb376cee08c5e811d632e4d2c6db10
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/387861
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>
2017-11-20 16:47:54 -05:00
Dariusz Stojaczyk
414e6df7ff vhost: clarify some error messages
Change-Id: I761a599b993aab3b6df3189efaae15d9a2b0c8a0
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/387748
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: Changpeng Liu <changpeng.liu@intel.com>
2017-11-17 19:18:30 -05:00
Ziye Yang
8d716531a6 nvme/perf: fix print message while not finding devices
Change-Id: Ie7282eb2e9f403ae51c449389216bcaf45808277
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/386190
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: Ben Walker <benjamin.walker@intel.com>
2017-11-17 18:26:24 -05:00
Karol Latecki
bc6540ad05 test/lvol: add friendly name specific tests
Adding positive and negative lvol friendly names specific tests.
Test plan updated.
Also fix some test naming discrepancies between plan and
script while at it

Change-Id: Ifb1a62d6a231f4f4ebfb5bb6178d941fc2b9770d
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/385552
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-11-17 18:24:08 -05:00
Lukasz Galka
3a6f8dc856 test/lvol: Add lvol tasting test
Add lvol tasting positive test case.
Adding new autotest config option for better control
where test is executed

Change-Id: Ic08b2395bd14e15072711b97c77b7e1ce26dd2b7
Signed-off-by: Lukasz Galka <lukaszx.galka@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/383432
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-11-17 18:24:08 -05:00
Dariusz Stojaczyk
f91894490b event/subsystem: remove unused params from g_next_subsystem->fini
Change-Id: I61ee650848cefe592fda23af8e1ed9aa6efb8b88
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/386890
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-17 13:10:52 -05:00
Cunyin Chang
8bd0514b35 test: remove unused test code for iscsi hotplug.
Change-Id: I53c7911bfd1a530f37d5eddd22ab1611ac9d763e
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/386370
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>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-17 11:25:39 -05:00
Cunyin Chang
9124d31bb1 test: Add iscsi tgt hotplug test in bdev layer.
Change-Id: Ib45cfc3431189cd4c5b829c9b1396c4732adb40e
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/386361
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>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-17 11:25:39 -05:00
Ziye Yang
5fa2274ccb io_channel: change return type of spdk_channel_msg
Change the return type of spdk_channel_msg from
void to int. If this msg executed in a failure,
we do not need continue sending the message to other
threads, we can just tell the original thread, and
let the orgiginal thread call the spdk_channel_for_each_cpl
call back.

Thus we can track the qpair creation/destroy case for bdev
reset in nvme bdev module;

Change-Id: Ide9dffd1f84a29fcf61d8339a9ece2a0245d968d
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/387284
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-17 11:25:14 -05:00
Ben Walker
00b02039c5 event: Pollers must now be unregistered from the thread they run on.
Change-Id: I8ea8c59a0c67176c0c0c39abf807afad61ff3828
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387689
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-11-17 11:11:23 -05:00
Ben Walker
fcb4776fe7 event: Pollers must now be registered from the thread they run on.
Change-Id: I864cd8a6c206dfbe62fcb3f72275c1ae51aa4ed7
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387688
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-11-17 11:11:23 -05:00
Ben Walker
03bb015cda nbd: Remove extra event on shutdown
nbd_start(), nbd_poll(), and nbd_stop() will all be called
on the same core, so the poller unregister will complete
synchronously.

Change-Id: I4f83f3821102277704422ed63d4cde424324e0a4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387686
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: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-17 11:11:23 -05:00
Ben Walker
4927c20681 iscsi: Treat unregistering pollers as a synchronous operation
We always unregister pollers from the core they're running on,
so we don't need the async completion event when unregistering
them. To avoid changing the logic, create events instead.

Change-Id: Ib50d93e1578684bea69200d89a5e0d383acc8cfe
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387685
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-11-17 11:11:23 -05:00
Ben Walker
9b63a93bab nvmf_tgt: Unregister pollers from the core they were polling on.
Change-Id: I129b278accb9f6e029abeba21701f633ecc775a5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387684
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>
2017-11-17 11:11:23 -05:00
Ben Walker
9102eef73d Revert "test/bdevio: add delay before starting unit tests"
This reverts commit be2cb0c535.

Change-Id: Ie337700dbedbd2e5a57afcfb8bd256bd344db4c1
Reviewed-on: https://review.gerrithub.io/387683
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
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>
2017-11-17 11:11:23 -05:00
Ben Walker
435138b76d scsi: Register all pollers to the current core
Register all pollers to the current core. If necessary, send
an event to the correct core before registering.

Change-Id: Ie34cc8b11143a58c0f621c87c409a3d09d929648
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387682
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
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>
2017-11-17 11:11:23 -05:00
Ben Walker
bfd55056b0 nvmf_tgt: Remove AcceptorCore config parameter
Historically, polling for new connections was costly.
Now, it's very inexpensive and there isn't a reason
to change which core it occurs on. Simplify
initialization and configuration by removing it.

Change-Id: I1cc4c321bb5986289bd48860cb270b0b552e3baa
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387681
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: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-17 11:11:23 -05:00
Ben Walker
8cd7252f04 nvmf_tgt: Create pollers for poll groups on same core
Create the poller for a given poll group from the core
we intend to use it from.

Change-Id: I8bfb970f31f86b8b29f7fe89d82178b3f27da50b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387680
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-17 11:11:23 -05:00
Ben Walker
95bbc6bf29 io_channel: Add spdk_io_channel_from_ctx
This is the inverse operation of spdk_io_channel_get_ctx.

Change-Id: Ica6593240dfb05cb53dc7ec910bc0a78270e81c0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387679
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-17 11:11:23 -05:00
Karol Latecki
8175e30229 test/vhost: Remove norandommap from vhost initiator tests
Removing norandommap as it is not correct to use with
verify-enabled tests

From fio man:
Normally fio will cover every block of the file when doing
random I/O. If this parameter is given, a new offset will be
chosen without looking at past I/O history.
This parameter is mutually exclusive with verify.

Change-Id: I739642461b3dbe9ab8698836aa120bfb14c2b79e
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/385431
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-16 18:26:35 -05:00
Paul Luse
a23fa64c83 blobcli: fix error path for non-CLI mode
This same code with the same test doesn't fail with the rest of
17.10 but was a real problem in script mode on error would call
spdk_app_stop() twice. In the unload_bs() path if there's no
bs loaded script mode will exit through another code path so
don't want to call spdk_app_stop() here.

Change-Id: I0175350c7e1a54b4b304b8b184d08076e6e2e0f0
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/387808
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-11-16 18:25:35 -05:00
Liang Yan
bb28be8adc event: ignore duplicated shutdown signals if signal received
Change-Id: Ib1e184f831eef82432308279c6d8ea43088748ef
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/387273
Reviewed-by: Ziye Yang <optimistyzy@gmail.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-11-16 18:24:46 -05:00
Daniel Verkamp
ed53cba059 nvme: normalize PCI addresses before comparing
Use the env abstraction PCI functions to compare PCI addresses so that
details like whether or not domain is specified or whether 0-padding is
present don't affect the comparison.

For example, 0000:01:00.0 should compare equal to 01:00.0.

Change-Id: I9f3aaeb5f8fdbf3e246e31a41b4c09151288015e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/387202
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>
2017-11-16 18:17:09 -05:00
Barry Spinney
9f1fd30d5c Fix build issues when building on an ARM 64 platform
This patch arranges to have dpdk built with the
T=arm64-armv8a-linuxapp-gcc make option when building on
an ARM 64 platform.

Change-Id: I46d266af9171f02e78ed51cec8052c4f91304092
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Reviewed-on: https://review.gerrithub.io/386708
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-11-16 11:58:16 -05:00
Ed Rodriguez
63bf022b93 trace: Move trace flags to separate implementation file
Change-Id: Ibe31b961fec36644cf64716c512429d68e873e88
Signed-off-by: Ed rodriguez <edwinr@netapp.com>
Reviewed-on: https://review.gerrithub.io/386170
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-15 18:57:12 -05:00
Maciej Szwed
c8b22dd071 unit/lvol: negative unit tests for lvols load
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Id50593446bd3ce5383ca10e917a541a0246cf3a7
Reviewed-on: https://review.gerrithub.io/384076
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-15 18:05:09 -05:00
Maciej Szwed
bdba3e7e01 lvol: fix lvol store load on lvols load fail
Currently when one of lvols fail during loading we end up
with empty lvol store loaded, where we actually should
unload lvol store as well.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I90ce3b79baba0db0d875b106c94924be394aada9

Reviewed-on: https://review.gerrithub.io/385950
Reviewed-by: Piotr Pelpliński <piotr.pelplinski@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-15 18:05:09 -05:00
Cunyin Chang
97f3104bc7 blobfs: Add conf parse for blobfs.
This patch make the cache buffer shift of blobfs configurable. We
can configure the cache buffer shift according workload, it will
help to improve the performance.

Change-Id: Ied1c2e5d6fd9eaa7aa0759c03c654fcf2e77aa23
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/383381
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-15 18:03:00 -05:00
Ziye Yang
cc57c4a9bc fio_plugin: check the whether the qpair can be allocated.
If it cannot be allocated, we should return error.

Change-Id: I48aa50a8842c35ee112fe7185128b1bc1930176e
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/386369
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-15 18:00:07 -05:00
Daniel Verkamp
322cae6af4 build: remove tab from spdk_lib_list_to_files
The tab inside the define ends up in the output when called, which leads
to problems if the output is quoted (the tab will be treated as part of
the filename).

Change-Id: I1038e1650a74861660fa4164dbde065217bc7b99
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/387631
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>
2017-11-15 17:57:07 -05:00
Daniel Verkamp
52412ab10b build: include spdk.app.mk in all app Makefiles
This will be used to include common app-specific rules in upcoming
patches (it currently makes no difference).

Change-Id: Ia828ba01c94fc9f70e15db3fc1d9cafda387e912
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/387629
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>
2017-11-15 17:57:07 -05:00
Paul Luse
db26b96fc0 blobcli: fix issue with command parsing
Introduced when bdev was added as a required option, logic
problem with command parsing that broke things when in
command mode with, for example, providing a bogus option.

Change-Id: I067bf2783f572c6d4fa7660691bb90c470744130
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/387634
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: Ben Walker <benjamin.walker@intel.com>
2017-11-15 17:55:40 -05:00
Ben Walker
ea134c5cbf nvmf: Store subsystems in array instead of a list
This helps enforce uniqueness of the subsystem id and
allows for quick lookup by that id.

Change-Id: I4d2948892839d42b8c2b2a406682848415ad2bd6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/376251
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-11-15 17:54:13 -05:00