Commit Graph

1591 Commits

Author SHA1 Message Date
Dariusz Stojaczyk
4f5bf64af1 pep8: fix E305 (2 blank lines after functions)
pep8 2.2.0 fixes E305 check, which currently causes
our check_format.sh to fail.

Checking Python style... Python formatting errors detected
test/lvol/lvol_test.py:12:1: E305 expected 2 blank lines after class or
function definition, found 1
test/vhost/common/run_fio.py:160:1: E305 expected 2 blank lines after
class or function definition, found 1

E305 differs from E302 as follows:
* E302    expected 2 blank lines, found 0
* E305    expected 2 blank lines after end of function or class

Change-Id: I2f6c3e1fa9fcb1b2c6d26690c1c65f39d7447875
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/405208
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-27 00:59:37 -04:00
Seth Howell
0bc7c3de4b test: move lib/ioat up one directory
Change-Id: I83c1c1228791d44e716599be5a9b2d9ac5a361d9
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/404975
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-27 00:46:52 -04:00
Seth Howell
8c5de263a1 test: move lib/nvme up one directory
Change-Id: I40c29b30c7098e34f2aa860612eeb82f2fb01ff3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/404974
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-27 00:46:52 -04:00
Seth Howell
c1961daedb test: move histogram_perf under the app directory
Change-Id: I3740d1a6744181bb93c07e9a5c58d0c5f4cc404e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/404970
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-23 19:45:09 -04:00
Seth Howell
656c4a7abe test: move test/lib/blobfs under test/blobfs
Change-Id: Icaac9df0623148e6c785d2b1a560b165a1a03408
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/404966
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-23 19:45:09 -04:00
Seth Howell
f9d5ed28ca test: move the bdev directory up one level
Change-Id: I6e291c3361b9b8529e4ad44c4bc41bdb4b3b2b47
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/404957
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-23 19:45:09 -04:00
Seth Howell
b337d878ca test: move config directory under common directory
Change-Id: I9db13ab60348000f1bfeb39888fbaea6535d26ae
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/404953
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-23 19:45:09 -04:00
Daniel Verkamp
764616bc47 test/unittest.sh: ignore dpdk in ut_coverage
Change-Id: I0ad9b2cf286c92da9d0b2d5ff66def8dd6b71e7f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404424
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-23 12:43:15 -04:00
Daniel Verkamp
f565a9fb04 test/unittest.sh: use absolute paths for lcov
This fixes some versions of lcov that treat relative paths incorrectly
when processing the -r option.

Change-Id: I15325abc79c39022380c9cc142a48afa0335012b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404419
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-23 12:43:15 -04:00
Pawel Kaminski
a15c694c19 test/vhost: Enable newest changes in vhost scsi hotremove tests
from hotplug/common.sh library

Change-Id: I21d74fcdd57fd2703d4457c528246ea4a7a4597d
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/402575
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-23 04:17:52 -04:00
Karol Latecki
028c8cb4ac test/vhost: remove virsh use from filesystem test
Refactor filesystem test so that it does not use virsh, only qemu.

Source compliation on filesystem was replaced with FIO+verify
on file located on mounted filesystem.
Reason for this change is that test for single filesystem type
took about 1:30 for just compilation itself.
Considering that we have 4 filesystems in test with 2 different
vhost controllers, it took way too long.

Change spaces to tabs.

Change-Id: I396d653efe2bbf76934b2532576455be43632ff4
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/398603
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-23 04:08:28 -04:00
Jim Harris
3fe80a337c lvol: remove num_clusters member from spdk_lvol
This is not needed - we can easily get the number
of clusters from the underlying blob.

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

Reviewed-on: https://review.gerrithub.io/404615
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-23 04:02:13 -04:00
Pawel Wodkowski
dd9d121da5 test/vhost: use vm_is_running in vm_shutdown_all
Fix test timeout. QEMU pid is leaking from one test run into another
test run. This make test see random process with the same PID and skip
running VM.

Change-Id: I56940c55793535ab149c79775f5de284882ebd97
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/404476
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2018-03-23 04:00:21 -04:00
Pawel Kaminski
bbe53581bd test/vhost: Move thin provisioning test plan into test implementation
Change-Id: I507d670afd839aede737d553432202a33a920c06
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/403036
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2018-03-23 03:58:48 -04:00
Pawel Wodkowski
5ffa5c003a bdev: introduce 'get_bdevs_config' RPC call
Write information needed to recreate each bdev.

Change-Id: I3d2b24fd4aaa8b98ec558d864cc28b55a899452f
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/401217
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-23 03:57:44 -04:00
Liang Yan
2e0610a075 autotest: Add vtune test(porting from dts to autotest)
Add compiling SPDK with vtune test case.

Change-Id: I7ece8ef87e703eee5b1a8c326fd88224c9a02895
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/392424
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-23 03:48:37 -04:00
Pawel Wodkowski
bd4ecea505 subsystem: add per module configuration dump
Change-Id: I5c4e51cd9cd97b05ab9a95cbe084ff2741f6ef58
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/402323
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-23 02:47:40 -04:00
Ziye Yang
15ce326251 test/iscsi: Add iSCSI initiator test
This patch leverages bdevperf, which configures
an iscsi initiator bdev to test iSCSI target.

Change-Id: I94c9299ef1f286a13678495d270326f4616c6241
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/404068
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-21 20:35:42 -04:00
Jim Harris
2af15344ab bdev: add iSCSI initiator bdev module
This uses libiscsi to implement an iSCSI initiator bdev
module for SPDK.  Still a lots of work to do on this - posting
it in case anyone is interested in working on this further.

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

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Change-Id: I060e33de0cd6796246789bf0e1bb4f2df59d8f71
Reviewed-on: https://review.gerrithub.io/390313
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-21 20:35:42 -04:00
Pawel Niedzwiecki
b96cf2ef2a test/common: Separate failing nightly tests
Introduce RUN_NIGHTLY_FAILING flag for nightly tests
that are always or periodically failing.
A new cron job will be added to run test with this flag.

RUN_NIGHTLY_FAILING is set for:
test/vhost/readonly/readonly.sh
test/nvmf/multiconnection/multiconnection.sh
a fio job in test/lib/bdev/blockdev.sh

Change-Id: I32640c0d4b916156c2ee996a9847c7c9e64941f8
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/403985
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2018-03-21 12:52:10 -04:00
paul luse
2191985125 bdev: Vbdev Passthru Example
Example showing the basics of a vbdev via a module that implements
the main functions, and a few extras, needed for a vbdev. The tests
also demonstrate how to configure an application to use a vbdev and
an underlying bdev

Change-Id: I67bf542143eb6532465cdb6af63c0f2ab7084c0e
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/399768
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-20 19:10:08 -04:00
Daniel Verkamp
a05f88ff34 nvmf: retrieve namespace UUID from bdev
A new optional parameter is added to the NVMe-oF target namespace
options to set the Namespace UUID, which will be reported via the
Identify command Namespace Identification Descriptor list.

Change-Id: I53c6d6fa6475d3395d412d196b42000715e9ed81
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/400894
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>
2018-03-20 17:18:44 -04:00
Jim Harris
a8d3ac0cf4 io_channel: invoke unregister_cb on same thread unregister was called
The unregister callback is only invoked after all I/O channels related
to the I/O device have been freed.  The last I/O channel to be freed
might be on a thread different than the thread where spdk_io_device_unregister
was called.  If this is the case, send an event to the latter thread
so that the callback gets called on the same thread as spdk_io_device_unregister.

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

Reviewed-on: https://review.gerrithub.io/404414
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-19 21:50:19 -04:00
Chen Wang
a81dd12daf test/lvol: fix the range of test cases when use "all" parameter
Script will produce error when use "./test/lvol/lvol.sh all"
command. The range(1, test_counter() + 1) means run case 1,2,3...
but the case 2 doesn't exist.

Change-Id: I3e36b0e08dee1d2683da5a499a5db136d65d3022
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/404067
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-19 16:16:30 -04:00
Daniel Verkamp
c937fab3cb nvme: use uint32_t consistently for NSID values
A few places were accidentally storing namespace IDs in uint16_t.

Change-Id: Iae9d709fb20bc1ac0a584ccd9683b721ce5de961
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403886
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-16 14:15:08 -04:00
Daniel Verkamp
a5fa52a40c test/lvol: fix "uudi" typo
These should presumably be "uuid".

Change-Id: I90ebca1f6e29a12267a7de3591d92143ccca9074
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404050
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-16 14:09:11 -04:00
Liang Yan
e213502e77 test/iscsi_tgt: remove duplicated lines from ip_migration.sh
Change-Id: Ia1310c136fbfef608590326edc9f7dae8f2e5fe9
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/403912
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-16 14:07:32 -04:00
Tomasz Zawadzki
609fb9a16b net: create NET_MODULE for compiling different net_implementations
Change-Id: Id370631770cb2e090c3efbe95cd86db4f6168c5e
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/403702
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 17:54:29 -04:00
Shuhei Matsumoto
372c5e1ec7 iscsi: Change the type of some negotiation params from uint32_t to bool
ImmediateData in negotation parameters can be controlled by the config
file and currently "Yes" or "No" are valid values of it in the config
file. "Yes" or "No" means almost bool. Additionally, ImmediateData is
defined as boolean value in the iSCSI specification as follows.

However ImmediateData is an uint32_t variable and 0 or 1 are used in
SPDK now.

In the upcoming JSON config file, boolean value should be set to
ImmediateData.

Hence change all variables and constants related with ImmediateData
to boolean in this patch.

InitialR2T, DataPDUInOrder, and DataSequenceInOrder are not controllable
by the config file but these are defined as boolean value in the
iSCSI specification.

Hence change them to bool too.

Besides, AllowDuplicateIsid is used almost as boolean value. Hence
change it to bool too.

InitialR2T=<boolean-value>
ImmediateData=<boolean-value>
DataPDUInOrder=<boolean-value>
DataSequenceInOrder=<boolean-value>

Change-Id: I9f98b219687b3600194563b1d6b85551f4586144
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403237
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-14 13:41:22 -04:00
Tomasz Zawadzki
9004ca4a63 net/sock: separate sock.c from posix related functions
This enables more clear division of spdk_sock_* functions
and spdk_posix_* ones.

Change-Id: I329eaf99de9390c8473b57427966dfe6af777abb
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/403700
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-14 13:08:09 -04:00
Daniel Verkamp
524e8fc976 nvmf: centralize duplicate subsystem NQN check
This should be enforced by the main NVMe-oF target library, not in the
event subsystem code.

Change-Id: Ibce4fd78710b4a9da374e3d5979df4a16e91533c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403380
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-14 12:54:15 -04:00
Seth Howell
12e840b937 test/unit: move unittest.sh and dependencies here.
All files called directly by the unittest.sh script are now located in
the test/unit directory.

Change-Id: I95cfb3d5b7c6ede59d7183c39466f32b7e676643
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/401717
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 18:44:34 -04:00
Daniel Verkamp
d4ef1338b0 bdev: make QoS channel management thread safe
We must hold bdev->mutex around all QoS channel manipulations, not just
channel_count; otherwise, there are race conditions.

Change-Id: I6183aef83f4d5789bded426a1832e3faaa688363
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403367
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 14:06:23 -04:00
Liang Yan
abd86265d3 test/iscsi_tgt: Update comment for disable CHAP authentication
Change-Id: I428d1be7db33efc1a44fa3f703ca154179fad2c0
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/403441
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-13 12:10:03 -04:00
Roman Sudarikov
c3bc40a6ef io_channel: add return value to pollers
This will be used to track time used in pollers - each poller can now
indicate if it found any work to do or not.

For cases where it was obvious and the infrastructure was already in
place, existing pollers have been modified to return 0 or a positive
value to indicate whether work was done.  Other pollers have been
modified to return -1 by default, indicating that the poller isn't
indicating anything about whether work was performed.  This will allow
us to find un-annotated pollers easily in the future and fix them
incrementally.

Change-Id: Ifebfa56604a38434fac5c76ba7263267574ff199
Signed-off-by: Roman Sudarikov <roman.sudarikov@intel.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/391042
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-13 11:16:20 -04:00
Daniel Verkamp
abe4c73f40 io_channel: use spdk_poller_fn consistently
There are two separate function pointer types declared in io_channel.h:
spdk_thread_fn for cross-thread messages, and spdk_poller_fn for
pollers.  They currently have the same signature, but this will be
changing in an upcoming patch, so we need to fix the poller-related
functions to use the correct type (a few were using spdk_thread_fn by
mistake).

Change-Id: I0f0d8f1eea9905395125fc91e0355a49e65be99e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403598
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-13 11:16:20 -04:00
Daniel Verkamp
19100ed580 bdev: rename spdk_bdev_module_if -> spdk_bdev_module
This better matches the style in the rest of SPDK.

No functional change - this is a pure find/replace of
spdk_bdev_module_if to spdk_bdev_module.  Instances of this struct will
be renamed in another patch.

Change-Id: I3f6933c8a366e625fc3a1b6401aee26ee03ba69c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403368
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 00:55:12 -04:00
Seth Howell
f1bf28de41 test: set all coremasks to use 8 or fewer cores.
This will allow us to reduce core assignments for build pool vms to 8.

Change-Id: I405a12f2c1041f77f90add0b5d27abd75f7b948d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/403559
Reviewed-by: John Kariuki <John.K.Kariuki@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>
2018-03-13 00:51:37 -04:00
Jim Harris
b24fdae1a8 Revert "blob: queue sync requests if one already in progress"
BlobFS shutdown path needs to be investigated more with these
changes.

This reverts commit a137b9afd0.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8b04b24e178945d62db20668b9e500f278ae955b
Reviewed-on: https://review.gerrithub.io/403600
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-12 20:37:49 -04:00
Jim Harris
a137b9afd0 blob: queue sync requests if one already in progress
For any given blob, if an spdk_blob_sync_md() operation
is already in progress, queue additional spdk_blob_sync_md()
operations until the previous one completes.

This ensures proper ordering of writing metadata to
disk.

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

Reviewed-on: https://review.gerrithub.io/401257
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-12 16:24:40 -04:00
Shuhei Matsumoto
1732428a2b bdevperf: IOPS average by exponential moving average
- Cumulative Moving Average (CMA): average of all data up to current
- Exponential Moving Average (EMA): weighted mean of the previous n
  data and more weight is given to recent
- Simple Moving Average (SMA): unweighted mean of the previous n data

Currently bdevperf support only CMA to know average of IOPS. However
CMA may not be appropriate to know the trend of IOPS. EMA or SMA will
be better to take the role.

The formula of EMA utilized in bdevperf is the following

Multiplier = (2 / (Time periods + 1))
EMA: EMA[n+1] = (IOPS - EMA[n]} x multiplier + EMA[n].

One of the source of the formula is https://github.com/patharanordev/ema

Change-Id: Ia7a282f6d173ace470e05b19ee6dee5edf640617
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/398886
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 14:53:17 -05:00
Shuhei Matsumoto
3af8e26df8 iscsi: Change function names of iSCSI subsystem configuration
Portal, portal group, initiator group, and target node don't use fixed size
array anymore. To use the same naming rule in iSCSI subsystem and in SPDK
is helpful to understand and maintain. Current naming rule is not bad but
to use unified and compact name is prioritized at this time.

This patch changes function names as follows:
- spdk_iscsi_init_tgt_nodes() -> spdk_iscsi_parse_tgt_nodes()
- spdk_cf_add_iscsi_tgt_node() -> spdk_iscsi_parse_tgt_node()

- spdk_iscsi_portal_grp_array_create() -> spdk_iscsi_parse_portal_grps()
- spdk_iscsi_portal_grp_create_from_configfile() -> spdk_iscsi_parse_portal_grp()
- spdk_iscsi_portal_create_from_configline() -> spdk_iscsi_parse_portal()
- spdk_iscsi_portal_grp_array_destroy() -> spdk_iscsi_portal_grps_destroy()

- spdk_iscsi_init_grp_array_create() -> spdk_iscsi_parse_init_grps()
- spdk_iscsi_init_grp_create_from_configfile() -> spdk_iscsi_parse_init_grp()
- spdk_iscsi_init_grp_array_destroy() -> spdk_iscsi_init_grps_destroy()

For example "parse" is already used to explain the operation in portal_grp.c.
Hence using "parse" is familiar and not strange in iSCSI.

Change-Id: Ieff952069d39bd96b7afa1586bfff927968accc2
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403149
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-09 13:52:04 -05:00
GangCao
a2142f3a33 bdev/qos: add the QoS rate limiting support on bdev
This patch is to add the basic support of QoS on bdev.

Including two major functionalities:

1. The QoS rate limiting algorithm:
	a. New IO will be always queued first also under
	   the no memory condition
	b. Start the QoS IO operation based on the limit
	c. A poller started in each millisecond to reset
	   the rate limit and send new IOs down
	d. The rate limit is based on the millisecond and
	   converted from user configurable IOsPerSecond

2. The Master Thread management:
	a. Add a per bdev channel_count
	b. Whenever QoS is enabled on bdev, if QoS bdev
	   channel is not created, create the QoS bdev
	   channel and assign the QoS thread
	c. When new IOs coming from different channels
	   (threads), pass the IOs to the QoS bdev channel
	   through the thread event
	d. When the IOs are completed from the QoS bdev
	   channel, pass the IOs back to its orignal
	   channel(thread)
	e. Destroy the QoS bdev channel when it is the
	   last bdev channel for this bdev. Defer the
	   destruction if current thread is not QoS thread

Change-Id: Ie4444551d7c3c7de52f6513c9db926628796adb4
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/393136
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 13:48:21 -05:00
Pawel Kaminski
6255620460 test/vhost: Vhost blk hotremove test plan.
Change-Id: I2deb9ae125eecf5592d59902cc5a530993f0fa54
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/402276
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 13:17:14 -05:00
GangCao
8f1f9137b1 test/nvme-cli: use the macro instead of hard-coded value
Change-Id: Iee2ae343d5e6a292a6c0e188903d80c794202dde
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/403246
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 13:10:32 -05:00
Pawel Wodkowski
4d36735401 bdev: rework bdev module registration
Currently SPDK_BDEV_MODULE_REGISTER() take many parameters. Extending it
(eg for incoming JSON configuration dump/load) is quite challenging and
error prone. As we are already here in next patches, rework this macro
to take one parameter - the pointer to struct spdk_bdev_module_if.

This patch also remove following macros:
SPDK_GET_BDEV_MODULE - this is not really needed, to find module outside
module translation unit use spdk_bdev_module_list_find()

SPDK_BDEV_MODULE_ASYNC_INIT and SPDK_BDEV_MODULE_ASYNC_FINI - replaced
by bool fields in spdk_bdev_module_if struct.

Change-Id: Ief88e023fbbaee7d5402c838dbecbdffd4dfb259
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/402883
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-09 12:07:35 -05:00
Pawel Wodkowski
4294719ed7 subsystem: make subsystem declaration macro just register subsystem
Don't do anything under the scene as adding/removing fields in struct
spdk_subsystem will require both macro change and C file changes.

Change-Id: I11bc0d5758edd7e0e0bd3f93e251d868cd9b1d2b
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/401850
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-09 12:07:35 -05:00
Pawel Wodkowski
5333a632ce test/migration: debug VM shutdown issue
Although migration successfully end Test Case 1 fail because
of some VM shutdown issue. This look like test issue.
Temporarily increase verbosity in vm_shutdown  function to debug
this issue.

Change-Id: I3d54775b2e4e7286bd86359a7ac5ca2a9d8ad750
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/402531
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-09 12:07:19 -05:00
Pawel Kaminski
9df7fac17f test/vhost: Vhost scsi hotremove test plan
Change-Id: I3d6a62499326046bb856ff8ca4d906295f5cd027
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/401173
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 09:55:59 -05:00
Jim Harris
2fb1264121 test/iscsi: disable calsoft tc_ffp_29_4
This test is incorrect - it sends immediate data
greater than negotiated FirstBurstLength, but
expects an R2T.  This is illegal and SPDK is
rejecting the PDU correctly.

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

Reviewed-on: https://review.gerrithub.io/403213
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
2018-03-08 19:09:40 -05:00