That test used to call an inexistent function in its
ERR trap. That's for one. Second, none of the SPDK tests
should set the ERR trap themselves - it's set once in
autotest_common.sh and prints the backtrace. What test
scripts should do is setting SIGINT/EXIT traps - fix it now.
Change-Id: I46c82651be78eeaec16ac52396c5e80a0405e5ff
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1331
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
%*s prints at least * characters and may add padding to the string.
%.*s prints at most * characters.
In a few places we used the first instead of the second and
printed some garbage to screen (in the best case...).
Change-Id: I97a862be61a5e43aa61e8230044dbd64a9db33bd
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1569
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
There's a small error when building rocksdb in blobfs db_bench
with gcc9:
"strncpy output truncated before terminating nul copying as many
bytes from a string as its length [-Werror=stringop-truncation]"
It's not a real bug for in the code "strncpy" truncates the null
terminator but set it later, which has been reported here:
https://github.com/facebook/rocksdb/issues/4017
Just adding "-Wno-error=stringop-truncation" to silent the compiler.
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I95993605f0376f5c101fb487596721b384319bcb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1594
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>
Use SPDK thread library in unit tests for compress bdev. This will
enable us to write unit tests for refactoring.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iac3867cca460b998c9b3953aae5241ffddc3168b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1451
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
When using --local acutally wait for fio processes
to finish and then gather results back to the host
system.
--local allows to run independent fio instances
on guest systems, avoiding fio client-server mode.
This will come in handy when trying to run fio bdev
plugin with virtio bdevs in guest systems.
At the moment fio plugin does not work in client-
server mode, so "local" must be used"
Change-Id: I2020c1b636fbf4ab1fe8ef590639e0dbfd905414
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1533
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Nbd package will enable tests that uses them.
Python2 is outdated. Python3 should be available.
Change-Id: I244c82b8ab2b8e4217dfb814f69882b2963fac70
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1079
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
CUnit provides a helper macro CU_ADD_TEST() that
simplifies usage of CU_add_test() function.
Test name no longer needs to be provided,
as it will be inherited from function name.
This is a follow up to
https://review.spdk.io/gerrit/c/spdk/spdk/+/931
Change-Id: I8078f02e08b14f12328ae022d7090ba13fbd64e4
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1239
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This patch changes the way that unittests initialize.
The new way is shorter and simpler.
It assumes that error during initialization is a fatal error,
but in our cases it always is.
This patch is a followp up to
https://review.spdk.io/gerrit/c/spdk/spdk/+/930
lvol_ut.c is the only test that skipped because
it runs same tests multiple times which is not allowed
by new method.
Change-Id: I0baf7ad09a35d5fca2dc4a03b4453c12c14f38a7
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1238
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Previously the SPDK NVMe driver always set PSDT to 01b for hardware SGLs
which is aligned to the Linux NVMe driver, for this case the metadata length
is not required when filling the NVMe command fields. There is no alignment
nor granularity requirement for Data Blocks for PSDT 01b case. And if the
drive reported that it needs dword alignment with SGL, for this case, when
using spearate metadata, it needs a length parameter to fill the SGL descriptor.
Change-Id: I56ffaada775fe66de7637dae15b509ee9556e80a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1351
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The specification says when PRACT is 1 and metadata size is 8, the
controller generates and appends protection information to the end
of the logical block data, this looks like only valid for extended
LBA format, but from real test with different drives, for separate
metadata case, some drives require host allocated buffer while some
not, for metadata bigger than 8 bytes cases, they all need host
buffer, so we allocate this buffer in host for all cases here.
Change-Id: I1aca8eb84e089ff5819a5f2680409c193847c40b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1391
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Currently SPDK rejects Connect command when subsystem is not active.
This change allows to queue Connect command and execute it when
the subsystem goes back to active state. To queue the command we
should know subsystem_poll_group, in current implementation
this poll_group is known only when controller is already created.
To get the poll_group for Connect command we can retrive subsystem
subnqn, find subsystem and get poll_group by subsystem->id.
Increment subsystem_poll_group->io_outstanding even for Connect
cmd in order to prevent subsystem change state during the
connection process. Update spdk_nvmf_request_complete -
decrement io_outstanding for Connect cmd.
Fixes#1256
Change-Id: I724abb911696d7234a9c9d27458eba24739b26fd
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1273
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This unittest uses CU_add_suite_with_setup_and_teardown()
which was added in CUnit 2.1-3 released over 5 years ago.
This is the most commonly packaged version of CUnit on
not EOL'd distributions.
Unfortunetly there is incorrectly created package on CentOS7.
CUnit-devel-2.1.3-8.el7.x86_64.rpm despite its name
contains CUnit 2.1-2.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5ebf9973b1f3df9ff6cc1f0dc61dcf691096605e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1530
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>
Make sure that we can parse domain with 32 bit address.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I83ca08d5156c58b97e96b3884b5c6d6afcd1969a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1536
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
run_fio.py was initially added (as the name suggests)
to run fio workloads on VM guests in client-server
mode during vhost tests.
Over time some of it's functionality was moved to
test/vhost/common.sh, so at the moment this script just
creates a command string and starts it. Using separate
Python script is just an overkill.
run_fio.py also contained an option to measure
VMEXITS on the guest side, which is never run in tests.
If needed we can re-add it in other commits.
Change-Id: I87a4c824dc09220bb6ce709355ee2d65e0ce3540
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1460
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Update QAT link to latest version.
Previous version does not compile on kernels 5.5+ and gcc 9.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I115f6ead9ccc40a08774a1508b19a8ac7572845e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1476
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Some of the values were passed as literals rather than
values of variables.
Resulting in following errors:
08:34:32 # fio --name=fio_test --filename=/dev/nbd0 --offset=0 --size=lvol_size --rw=write --direct=1 --do_verify=1 --verify=pattern --verify_pattern=0xcc --verify_state_save=0
fio: failed parsing size=lvol_size
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If0cd104d83646c1e5c23029cdc27a18340982187
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1458
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
The period was being treated as a wildcard by awk so it was improperly
parsing the libspdk_sock*.so library versions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I37d3cfaf7bf9c29c6d5efb647e68d8a8be715a2b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1513
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Run iscsicleanup once before running the tests. This is
to ensure we delete any stale entries or files if they
were not removed properly in previous test runs.
Fixes#1311
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Idb415adddfaa7cbb443377a292fae357c1707e79
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1539
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>
Test in event.sh take 5 seconds on CI at this time.
For the tests to run both SPDK_RUN_FUNCTIONAL_TEST
and SPDK_TEST_EVENT had to be enabled.
This served as very minor time saver, so removing
this flag shouldn't affter test times more that the
5 seconds.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie3eaa587daf28b2efbc3cfdff5ad648b7529e7f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1493
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Building docs is tested in autobuild_test_suite
when SPDK_TEST_AUTOBUILD is enabled.
SPDK_BUILD_DOC can be safely removed.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic871febdcaba708e2fbe6a55d31ec3ddb101a818
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1492
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Building "--with-shared" is tested in autobuild_test_suite
when SPDK_TEST_AUTOBUILD is enabled.
SPDK_BUILD_SHARED_OBJECT can be safely removed.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I05b1d04c3e28ce72c0a4a6deb89d0b6d02e2bb67
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1491
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This kind of changes are now done through out the UTs in SPDK.
Patch here just adds them here as well.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I66fc06bbea038e328ba27bdea58b6e6479eee122
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1487
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
lvs_load, lvols_load and lvol_open were already added to the suite.
Commit 2f22884 mistakenly added those three when adding lvol_refcnt.
To remove those UT actually fixes earlier in the series were required,
as incorrect errnos were checked before and this specific order of
UTs set the right errno between them.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7188be49171b6254146c6d144f9a54a689151b60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1486
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Simply some of the functions can be replaced with the stub
defines, so they were.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3095855c02c605fe0d66ee720a5025cdd8933873
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1485
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
There are three types of callbacks in lvol library:
- void(cb_arg,lvs,errno)
- void(cb_arg,lvol,errno)
- void(cb_arg,errno)
First two are used in cases where result of operation is
either lvs or lvol.
Last one is used for any operation that does not produce
either.
There is no need to keep more than one callback function
for last one, since they all are doing the same thing.
lvol_op_complete(), lvol_store_op_complete(), close_cb() and
destroy_cb() are now replaced with op_complete().
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Idd8fcf327ef56ad7d27e2e31cad9ddc44c80e5c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1484
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
There were two variables (g_lvserrno and g_lvolerrno) to
assign and check after operations.
This caused issues when developer mistakenly created callback
that assigns one and then checks the other.
This UT is ran to completion each time and only single operation
is done at once. There is no need to account for both.
This patch removes g_lvolerrno.
Next one will simplify callbacks.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7d16b1913c13de56e1df2f5e36db11f15430979b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1483
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Still testing to do both basic functionality as well as use of
various combinations of options.
Instead of using LBA range locking to protect the threads from
each other, this solution assigns a specific LBA range per target.
The LBA ranges are based on how many threads are working on any
one target.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I6a6588506a43292969fffe1baf060148d6772ee5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1207
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Without the shebang, the builtin file command assumes autotest_common.sh
is a c file. This is obviously not the case, but it messes up file type
checking when we are confirming that all files are checked against scanbuild.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I45f32b23ef01b07ce9b72caed743e6670b99055e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1311
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This file is not included in any other test files and it isn't compiled.
It appears to be a remnant of when we had distinct vhost_blk and vhost_scsi
unit tests.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0b29d9e601f9d86b51cf8ba52ec5dc96bd02eef9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1310
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This is to avoid spammy stderr comming from ceph/stop.sh:
+ umount /dev/loop200p2
umount: /dev/loop200p2: not mounted.
+ losetup -d /dev/loop200
losetup: /dev/loop200: detach failed: No such device or address
Change-Id: Id1ecfc5da1a530c63d454bfacc8fb36c29549f8e
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1006
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Additionally, part_dev_by_gpt() is dropped in favor of having entire
gpt setup done from within the setup function.
Change-Id: If026215138f2de20176ebc920a2427c18de991b5
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1019
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
We only set the flag to false when the controller reports SGL supported
and can use byte contiguous buffer. Also check the data block's alignment
for hardware SGL.
Change-Id: Id936c49823963000d0543fc95fbb6edba3118feb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1352
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Use serial number to identify connected nvme subsystem.
/dev/nvmeX might be taken by some other device which is
not even a part of the tests.
It also might be affected by previous tests and not
always show up with the expected name.
Fixes#1308
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I8d0e1b05f22a1263340014abdaf557f0fef5ad82
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1408
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Update spdk_thread_poll() to count SPDK thread stats correctly on multiple
SPDK threads per reactor configuration.
spdk_thread_poll() gets start time and reads TSC at end as end time,
and then gets delta between them as run time. Run time is added to idle
time or busy time according to the result of polling.
Reactor overhead is included into the next thread which calls
spdk_thread_poll() now.
spdk_thread_poll() saves the end time to the current thread to use it
as the start time of the next thread.
Unit test framework for this patch and the next patch need to access
thread->tsc_last. In the next patch, reactor will use the end time of
the current thread to the start time of the next thread in reactor_run()
to realize the idea.
Hence add an new API spdk_thread_get_last_tsc(). The corresponding
variable is named as tsc_last and it is good and is aligned with
DPDK (DPDK has used tsc_start and tsc_end as variable name). But
last_tsc will be better as API name because the last TSC value is
easier to understand.
Then add necessary unit test and update the unit test framework.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5e465e9283c032acb427576d0c90f9e1414f2271
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1048
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Group the global parameters into the global structure
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I552b536869221efb58bc30820b7adfc01c74c293
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1388
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>