Commit Graph

11474 Commits

Author SHA1 Message Date
Alla Kiseleva
14db3c7e4b perf: Add NSID in perf output information
Currently an option is implemented to monitor a correlation between the
core and namespace.

Previously:
==================================================================
Device Information
RDMA (addr:1.1.75.2 subnqn:nqn.2016-06.io.spdk:cnode1) from core  0:
RDMA (addr:1.1.75.2 subnqn:nqn.2016-06.io.spdk:cnode1) from core  0:
==================================================================

Now:
========================================================================
Device Information
RDMA (addr:1.1.75.2 subnqn:nqn.2016-06.io.spdk:cnode1) NSID 1 from core 0:
RDMA (addr:1.1.75.2 subnqn:nqn.2016-06.io.spdk:cnode1) NSID 2 from core 0:
========================================================================

Signed-off-by: Alla Kiseleva <c_allaki@mellanox.com>
Change-Id: I35e39c62bbdac05152f35e11eb1d560eb0e50404
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/955
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@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>
2020-03-06 10:27:39 +00:00
Shuhei Matsumoto
c688f5e93e lib/vhost: Replace global cpuset by local one in vhost_get_poll_group()
Replace g_tmp_cpuset by tmp_cpuset local in vhost_get_poll_group()
without any side effect.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibb01d2c77d6d82d7cc81df722e7848b357d4e9e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/840
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-03-05 13:35:54 +00:00
Darek Stojaczyk
a5bcbbefcb test/rocksdb: fix db_bench build with gcc9
GCC9 complains:
./db/version_edit.h:134:71: error: implicitly-declared "constexpr
rocksdb::FileDescriptor::FileDescriptor(const
rocksdb::FileDescriptor&)" is deprecated [-Werror=deprecated-copy]

From what I see this can be fixed by explicitly
defining some constructors and assignment operators,
even setting them to `= default;`. I didn't dig into
this further, just ignore the warning for now.

Change-Id: Ia0ee0cc5fc1dce36f7098959d383b08855a825df
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1082
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-03-05 13:33:23 +00:00
Vitaliy Mysak
d4653a31e0 env_dpdk: dont treat NULL as error in spdk_map_bar_rte()
We use `spdk_map_bar_rte()` to read mapped addresses
from PCI BARs.
This function is currently checking for NULL in each pair.
But in PCI memory, some registers can be left unused,
in which case they are set to 0.
As a result, we may read some NULL pointers from BARs,
which is OK.
To check if given address is indeed invalid, we should first
check if it is used.
So it is best to delegate such checks to the
user of this function.
In fact, users already do the NULL check where it is needed
(ex: virtio_pci.c:390, nvme_pcie.c:589)
so this patch just removes them from `spdk_map_bar_rte()`.

This solves github issue #1206

Change-Id: I88021ceca1b9e9d503b224f790819999cd16da01
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1129
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-05 13:31:50 +00:00
yidong0635
9d93c08234 rdma: Fix Segmentation fault when not sufficient memory for RDMA queue.
Fix Segmentation fault on the target side.
Issue:
rdma.c:2752:spdk_nvmf_rdma_listen: *NOTICE*: *** NVMe/RDMA Target Listening on 192.168.35.11 port 4420 ***
rdma.c: 789:nvmf_rdma_resources_create: *ERROR*: Unable to allocate sufficient memory for RDMA queue.
rdma.c:3385:spdk_nvmf_rdma_poll_group_create: *ERROR*: Unable to allocate resources for shared receive queue.
Segmentation fault (core dumped)

GDB:
Program terminated with signal 11, Segmentation fault.
736             if (resources->cmds_mr) {
(gdb) bt
736             if (resources->cmds_mr) {
(gdb) bt
0  nvmf_rdma_resources_destroy (resources=0x0) at rdma.c:736
1  0x0000000000497516 in spdk_nvmf_rdma_poll_group_destroy (group=group@entry=0x2fe1300) at rdma.c:3489
2  0x00000000004978bb in spdk_nvmf_rdma_poll_group_create (transport=0x2fe11d0) at rdma.c:3371
3  0x000000000048df70 in spdk_nvmf_transport_poll_group_create (transport=0x2fe11d0) at transport.c:267
4  0x000000000048a450 in spdk_nvmf_poll_group_add_transport (group=0x2f49af0, transport=<optimized out>) at nvmf.c:941
5  0x000000000048a6cb in spdk_nvmf_tgt_create_poll_group (io_device=0x2fce600, ctx_buf=0x2f49af0) at nvmf.c:122
6  0x00000000004a0492 in spdk_get_io_channel (io_device=0x2fce600) at thread.c:1324
7  0x000000000048a0e9 in spdk_nvmf_poll_group_create (tgt=<optimized out>) at nvmf.c:723
8  0x000000000047f230 in nvmf_tgt_create_poll_group (ctx=<optimized out>) at nvmf_tgt.c:356
9  0x000000000049f92b in spdk_on_thread (ctx=0x2f81b20) at thread.c:1065
10 0x000000000049f17d in _spdk_msg_queue_run_batch (max_msgs=<optimized out>, thread=0x1e67e90) at thread.c:554
11 spdk_thread_poll (thread=thread@entry=0x1e67e90, max_msgs=max_msgs@entry=0, now=now@entry=947267017376702) at thread.c:623
12 0x000000000049af86 in _spdk_reactor_run (arg=0x1e678c0) at reactor.c:342
13 0x000000000049b3a9 in spdk_reactors_start () at reactor.c:448
14 0x0000000000499a00 in spdk_app_start (opts=opts@entry=0x7ffc2a5e0ce0, start_fn=start_fn@entry=0x40aa80 <nvmf_tgt_started>,
						arg1=arg1@entry=0x0) at app.c:690
15 0x0000000000408237 in main (argc=5, argv=0x7ffc2a5e0e98) at nvmf_main.c:75

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Id9bf081964d0cf3575757e80fc7582b80776d554
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1073
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-05 13:31:28 +00:00
Jesse Grodman
e6bffc3eed Add AWS instructions to the README
Signed-off-by: Jesse Grodman <jgrodman@gmail.com>
Change-Id: I4ce5b04771fc0ac03ec29499421f45927a15c302
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1015
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-05 13:31:07 +00:00
Karol Latecki
6817babfa4 test/iscsi_tgt: do not silently skip calsoft tests
Remove if/exit steps from calsoft.sh and move the condition
to parent script iscsi_tgt.sh. This still to run iscsi_tgt.sh
on systems which don't have Calsoft installed but still allows
CI to detect missed tests thanks to autorun_post.py.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I0eb186fe80b377f0c023774adf8ff321af7dfa81
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1075
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-04 10:05:26 +00:00
Karol Latecki
148719dad9 test/common: skip run_test with warning
Add function to print warning with optional message
in case we'd like to skip a test.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Iacb1031aac0e17ce80327ca826c51fb2b99a6be0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1080
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>
2020-03-04 10:05:26 +00:00
Pawel Kaminski
7c1a9e156b test/vagrant: Add support for yum in vm_setup.sh scripts.
Install centos related packages using yum.

Change-Id: I718222b2fb6dd7b249404e13f91849c54de09013
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1031
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-03-04 10:05:17 +00:00
Jacek Kalwas
9b2c645294 build: add option to disable building examples
If examples are not needed using that option can reduce build time and
output logs so it is easier to spot most important issues/warnings.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Id279cba96ddf25d50a8748555d511d21f243bd7e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1047
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-04 10:05:10 +00:00
Tomasz Kulasek
b61e2479f5 sock/vpp: fix compilation with gcc9
Change-Id: Ia48a59807047ea2ab5103638fb49bfea9446f854
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1084
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-03-04 10:05:02 +00:00
Seth Howell
c5911f0224 mk: bump the shared object major version to 2.
This is to indicate the ABI breakage in the bdev library. A function's
argument list was changed which breaks both backwards and forwards
compatibility.

Going forward, all backwards compatibility breaking changes should be
marked with a rev of the SO major version for that library. All forwards
compatibility breaking changes should be marked with a rev of the SO
minor version.

Change-Id: I35e45c102c5c6de3c684919a10e5116f8f2c375f
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1066
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-04 10:04:52 +00:00
Seth Howell
07b909b08c Revert "shared_lib: bump version of all .SO to 1.1"
This reverts commit 2ce1406a59.

It seems that the typical practice for making SO version changes is
this. When a change has been made to an ABI that breaks backwards
compatibility, the major version should be updated. When a change has
been made which breaks forward compatibility (i.e. applications linked
to this ABI are not necessarily compatible with older versions of the
ABI due to added symbols).

We should update the major ABI version now, and
then going forward follow the pattern mentioned above.

Change-Id: I0ecd4ae64398dc1a6d2ce505303d012397a2047b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1065
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-03-04 10:04:52 +00:00
Tomasz Zawadzki
7265600d63 test/common: do not double exclude autotest_common.sh
No need to exclude the autotest_common.sh twice when
creating test list.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ice7be31a9d7d284dd411ebfd3854e075b37c0275
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1088
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-03-04 10:04:38 +00:00
Tomasz Zawadzki
eba5d05515 test/common: only scan .sh files for run_test
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6be62480adb37dd7b53429b831c5dcf5abfa5818
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1087
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-03-04 10:04:38 +00:00
Shuhei Matsumoto
39efe1512f lib/nvmf: Remove workaround for astyle format check about break-after-return-type
To avoid the strange formatting, typedef has been used. But this
comment is hard to get the meaning. So stop breaking after return
type for this case.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia03d6ec50610c395007fe172018b890733dce599
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1052
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-03-04 10:04:26 +00:00
Shuhei Matsumoto
4f4d0ab6c1 lib/iscsi: Remove workaround for astyle format check about break-after-return-type
To avoid the strange formatting, typedef has been used. But this
comment is hard to get the meaning. So stop breaking after return
type for this case.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I317604de67aab9f201d691e0f886bd673f451f3f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1051
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>
2020-03-04 10:04:26 +00:00
Shuhei Matsumoto
6383602952 lib/scsi: Remove workaround for astyle format check about break-after-return-type
To avoid the starnge formatting, typedef has been used. But this comment
is hard to get the meaning. So stop breaking after return type for this case.

The strange formating is

struct spdk_scsi_dev *
       spdk_scsi_dev_construct(const char *name, const char *bdev_name_list[],
                        int *lun_id_list, int num_luns, uint8_t protocol_id,
                        void (*hotremove_cb)(const struct spdk_scsi_lun *, void *),
                        void *hotremove_ctx)

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I20c30b225b3b96fa9207b4a89e3210c8a97fb1d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1050
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>
2020-03-04 10:04:26 +00:00
Pawel Kaminski
1499761380 test/vhost: Add negative test for vhost scsi target removal
Try to delete target from scsi contoller with invalid slot number

Change-Id: Ieac91d64093c3ebc6363bc4f2aef5b7ac86cbe79
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/935
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-03-04 10:04:17 +00:00
Pawel Kaminski
686b0d34d2 test/vhost Add negative test for vhost_create_blk_controller rpc
Try to create blk controller with bdev that is already
claimed by lvol module

Change-Id: Id034968e12c946d18c063056f5b7fb01883af6d6
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/929
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-03-04 10:04:17 +00:00
Pawel Kaminski
92e908e6bb test/vhost: Remove vhost_load_config function
It was removed for other/negative.sh test.
There is no need to keep it more for one scripts with test
as vhost configuration can set by series of rpcs.

Change-Id: I86937a5f38641f5ce48c00836e050623c90bdd27
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/915
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-03-04 10:04:17 +00:00
Pawel Kaminski
7b128ee46b test/vhost Add three negative tests for vhost_scsi_controller_add_target
Need one more malloc bdev.

Change-Id: I9884829e1683bfa0e9653f2edbb020d002b7b060
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1055
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-03-04 10:04:17 +00:00
Pawel Kaminski
dc3be4c8c1 test/vhost Remove json conf and use rps calls instead
Change-Id: I7d83130310cc1e7a1ab9d73c73ff47ef0961f14d
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/893
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-03-04 10:04:17 +00:00
Pawel Kaminski
f139b86f45 test/lvol: rewrite clone_bdev_only, clone_writing_clone and clone_and_snapshot_consistency to bash
Change-Id: I6a705557d621b758e35efd929a013918e969b91d
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/687
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-03-04 10:04:04 +00:00
Pawel Kaminski
9010c464da test/lvol: rewrite snapshot_of_snapshot to bash
Change-Id: Ia3a2807276ebd7b4d9b16bb533f23f3683d7b08c
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/686
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-03-04 10:04:04 +00:00
Pawel Kaminski
67609312cf test/lvol: rewrite snapshot_during_io_traffic to bash
Change-Id: Ic1081f5426e435d60f465ce0774498928f30d5a0
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/685
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-04 10:04:04 +00:00
Pawel Kaminski
94435f3876 test/lvol: rewrite snapshot_readonly and snapshot_compare_with_lvol_bdev to bash
Change-Id: I27e58b05c3c8e55b06ea64f1640c2a5702449b26
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/684
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>
2020-03-04 10:04:04 +00:00
Pawel Kaminski
2342070e07 test/lvol: rewrite tasting tests to bash
Rewriting test cases:
 - tasting_positive
 - tasting_lvol_store_positive
 - tasting_positive_with_different_lvol_store_cluster_size
These three python test cases were merged into one test,
as there was a lot of similarity between them.

Change-Id: Ie68568e2b6b9e574917b6b350e96b0f42c999c95
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/683
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>
2020-03-04 10:04:04 +00:00
Artur Paszkiewicz
2efe6d922b module/raid: partial completions for raid_bdev_io
Replace the 'expected' and 'completed' raid_bdev_io counters with a
single 'remaining' counter. This can represent either remaining blocks
or IOs required to complete the raid_bdev_io. Add a function which
decrements the counter and completes the raid_bdev_io if it reaches 0.

Change-Id: Ifa8bcc05c33e80159aad21d6e73d1f6185cca1cf
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/856
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-03-04 10:03:45 +00:00
Artur Paszkiewicz
73763d40ec module/raid: raid5 module
Add raid5 module and unit tests. Use './configure' with option
'--with-raid5' to enable it.

Change-Id: I9f07da8c3567fa65499444899c899adaa2e29550
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/855
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-03-04 10:03:45 +00:00
Shuhei Matsumoto
b992bb4e46 lib/thread: Add API spdk_poller_register_named() to set arbitrary name
Add an new API spdk_poller_register_named() to set arbitrary name
to the created poller. If NULL, the name is set to the pointer of
the poller function.

To set the name to the string of the poller function name conveniently,
add an new macro SPDK_POLLER_REGISTER() together in this patch.

All debug or error logs are changed to output poller name from pointer.

The added name will be used in the new RPC thread_get_pollers.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3be558dd795252f797e3e81fa2db2e8b128cf004
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/506
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-04 10:03:30 +00:00
Shuhei Matsumoto
cf669d0217 lib/thread: Move struct spdk_poller public in SPDK internal
thread_get_pollers RPC which will be added in the upcoming patches
will need to access internal of all pollers.

Following the last patch, expose struct spdk_poller internally among
SPDK libraries.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6844fc70165b4f127c49680ce592ac7b8c326cac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/594
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-04 10:03:30 +00:00
Shuhei Matsumoto
500f26e2fe lib/thread: Move struct spdk_thread public in SPDK internal
thread_get_pollers RPC which will be added in the upcoming patches
will need to access all pollers each thread has.

To avoid adding JSON related code into lib/thread/thread.c, expose
struct spdk_thread internally among SPDK libraries and RPC code will
access it.

The next patch will expose struct spdk_poller internally among
SPDK library for the same purpose.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8da039db3021966ca1e28f6f086bb4c2a8eeb84a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/973
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-04 10:03:30 +00:00
Shuhei Matsumoto
95b35daa5f rpc: Add thread_set_cpumask RPC
Add an new JSON RPC thread_set_cpumask to control CPU affinity of
the thread dynamically from outside of SPDK application.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6b6b794405f612200a2c3cb27dc4fc1ad2e88bec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/501
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-04 10:03:30 +00:00
Ziye Yang
34bff15a19 ftl ut: Fix the compilation issue.
If we did not configure with "--enable-debug". it will
trigger the compliation failure since this function is
not defined.

Change-Id: Ia1795da736be55d4dd1418a2e74edefff7797f11
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1097
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-03-04 05:02:35 +00:00
Michal Berger
692fce3222 test/common: Introduce timeout in discover_bdevs()
In case something goes awfully wrong with the test which calls this
particular function, e.g:

  https://ci.spdk.io/results/autotest-per-patch/builds/4787

the CI's autotest runs may be blocked for max of 15 minutes before
failing the build. Instead, introduce internal timeout for the
routine itself (default of 30s) and fail the test sooner when it
expires.

Change-Id: I2c792c1781987e80e34c1fa19ec3eef43c25e38a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1026
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>
2020-03-03 07:55:12 +00:00
Karol Latecki
ba5329d3e4 test/nvme: do not skip tests if nvme-cli is unavailable
We do not want to skip tests, especially that the
'if' statement is inside the test script.
So even though the test wasn't actually ran it still
is reported as executed because "spdk_nvme_cli.sh" returned
with rc=0.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I89c553aebcc1346f8f584dd86eeae1ca146e7340
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/980
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>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-03-03 07:55:07 +00:00
Richael Zhuang
ceb601188b test: fix error about unittest_thread uninitialised parameters
When running unittest_thread in fedora29 with memcheck, there is
error "Conditional jump or move depends on uninitialised value(s)"
in for_each_channel_unreg test.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I38abf4c70ff513e39232b83357d571dded8f02c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1072
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-03-03 07:55:01 +00:00
paul luse
9cc1013a83 module/crypto: replace one use of strlen with strnlen
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I5399b48c8cee9cdf57d424f42d4b2c5a16e4114a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1062
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-02 10:40:34 +00:00
paul luse
1fba97c9cc module/crypto: include XTS info in json dump
Oversight when XTS was added.

Fixes issue #1231

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iba0c875d2bbb055596b1a6e4c17c1efcd1640280
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1008
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-03-02 10:40:34 +00:00
Jin Yu
a8bdd24bc2 vhost: split desc_to_iovs function
Use the payload to construct iovs so that split desc
or packed desc can both work.

Change-Id: Ib2c60b6eb53d0d615594e97b3d3ae1a365908b6c
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1000
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-03-02 10:38:17 +00:00
GangCao
af561c1a4a Bdev/QoS: add a specific bdev_start_qos function
Change-Id: I93f930faf88703e22e156f4fe0c22e162f030894
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1030
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-02 10:35:01 +00:00
Michal Berger
70cc99bccf test/nvmf: Sanitize random string
In case the random string beggins with `-` (still a valid ascii char
that nvme supports) the rpc.py arg parser will treat it as an
additional argument instead of actual subsystem value.

To mitigate, escape the `-` in case it's the char that starts the
string.

Fixes: 1240

Change-Id: I07bd8134fb9fc16234e72e9ebd27e2b6b90d6b62
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1054
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-02 10:34:03 +00:00
Maciej Wawryk
23f78f22cf scripts/perf: extract SKT section to new file
PCM cpu measure give as result 1306 columns, we want check only ones which contains
SKTdata and SKTtraffic values.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I52b6781a7ff99e0d894f7f1c2b25b655fa274eb1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/946
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-03-02 10:33:48 +00:00
Konrad Sztyber
336505abbf lib/ftl: use per-io_channel write buffers
Replaced single global write buffer with the per-io_channel write
buffers.  This means that the "rwb" module and all of its references
were removed and replaced with the recently added interfaces.

Change-Id: Idc899d3a4d63a8a2bede1ac26549ed06e9a2e784
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/909
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>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
2020-03-02 10:27:06 +00:00
Konrad Sztyber
925cc3b8a9 lib/ftl: pending batches queue
Added queue responsible for keeping track of full, ready to be written
batches.  A batch might be put on this queue in case it'd already been
filled, but could not be written out due to lack of resources or it was
written out, but failed and needs to be resent.

Change-Id: Iba49cd359425300d21b8100f13f17189e99d4c7c
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/908
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>
Reviewed-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
2020-03-02 10:27:06 +00:00
Konrad Sztyber
17ad5c8ea3 lib/ftl: batch metadata buffers
Metadata buffer was added to ftl_batch structure.  It'll make it
possible to send writes with a separate metadata buffer.

Change-Id: I475c0982809cb0cc9aa6bcbc2a4935a6f15f19af
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/907
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: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
2020-03-02 10:27:06 +00:00
Konrad Sztyber
87731e1105 lib/ftl: write buffer entry address calculation
Two functions were added:
 - ftl_get_addr_from_entry() returning an address pointing at a given
   entry
 - and it's inverse, ftl_get_entry_from_addr(), returning a write buffer
   entry for a given address

Change-Id: Iea1e2e59f240f50183fdb549280a0f0b722efbef
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/906
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-02 10:27:06 +00:00
Konrad Sztyber
35fdf2dd9e lib/ftl: write buffer batches
This patch adds the ftl_batch strucutre, which describes a single batch
of data to be written to the disk.  It's comprised of multiple write
buffer entries (the actual number depends on the write unit size of the
underyling device).

Additionally, a function responsible for filling out a batch was added.
It iterates over available IO channels and dequeues submitted write
buffer entries until a batch is completed.  The IO channel queue is
shifted, so that each time the function is called a subsequent IO
channel is used first, which guarantees that all channels are treated
fairly.

Change-Id: Ie61d8c6cb51d5c5175540c975447bc27590c5cb4
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/905
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-02 10:27:06 +00:00
Konrad Sztyber
1e8c9a4de2 lib/ftl: write buffer acquire/release
Added functions responsible for acquiring/releasing write buffer entries
from the per-io_channel caches.  They're also in charge of limiting user
writes by reducing the number of available entries to the user.

Change-Id: I23adfe36065139036f9b72a016e34fbf6eb29230
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/904
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-02 10:27:06 +00:00