Commit Graph

11643 Commits

Author SHA1 Message Date
Seth Howell
f146bbe42d lib/nvme: move common connect code into transport shim
This gets rid of some duplicate lines of code.

Change-Id: I24d4864921f6030672f3640b33f88f37a9e8175a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1136
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-06 10:29:21 +00:00
Shuhei Matsumoto
d559562eaf bdevperf: Use spdk_for_each_channel() for bdevperf_construct_targets_tasks()
This patch makes bdevperf_construct_targets_tasks() asynchronous
by using spdk_for_each_channel().

The next patch will make performance_dump() asynchronous even when
shutdown case by using spdk_for_each_channel().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1ebf39fe89a944d977d6f1808cf8607e8f477758
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/644
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>
2020-03-06 10:28:53 +00:00
Shuhei Matsumoto
19367440b6 bdevperf: Factor out creating tasks on group into a helper function
This is a preparation to make bdevperf_construct_targets_tasks()
asynchronous by using spdk_for_each_channel() in the next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I76c827550b2920abcba14abd7f15a3111ad10d39
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/643
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>
2020-03-06 10:28:53 +00:00
Shuhei Matsumoto
52d8f11ea8 bdevperf: Use spdk_for_each_channel() for bdevperf_construct/free_targets()
Squash changes for _bdevperf_construct_targets() and
bdevperf_free_targets() into a single patch to shrink the
patch series to reduce the burden of reviewers.

The pupose of the whole patch series is to move io_target from
core based to I/O channel based, and create SPDK thread per I/O channel.

It was not possible to create SPDK thread per core and then associate
target group with I/O channel as long as I tried.

So this patch moves io_target from core based to I/O channel based.
The later patch will create SPDK thread per I/O channel.

Each core has default reactor thread for now and so we can use
spdk_for_each_channel() even when we do not create and destroy SPDK
thread per target group yet.

The following is the detailed explanation:

_bdevperf_construct_targets():

Add a context for _bdevperf_construct_targets() to use
spdk_for_each_channel().

If g_every_core_for_each_bdev is false, set the target group to the
context and create target only on the group which matches the passed
group. If g_every_core_for_each_bdev is true, create target on all
groups.

Only the master thread can increment g_target_count. Hence hold
created number of targets temporary on the context and add it at
completion.

As a result of these changes, spdk_bdev_open() is called on the
thread which runs I/O to the bdev.

Hence bdevperf_target_gone() doesn't use message passing, and
bdevperf_complete() calls spdk_bdev_close() before sending
message to the master thread. Additionally, unregister pollers
directly in bdevperf_target_gone().

These changes also fix the potential issue that spdk_bdev_close()
would be called on the wrong thread if spdk_bdev_get_io_channel()
fails in bdevperf_submit_on_group().

bdevperf_free_targets():

Free each target on the thread which created it by using
spdk_for_each_channel().

This will make possible for us to use spdk_for_each_channel() for
performance dump even for shutdown case because
spdk_for_each_channel() is serialized if it is called on the same
thread.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4fcdb1024adf4704d3c59215da5669dfdc6cca1b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/641
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-06 10:28:53 +00:00
Tomasz Zawadzki
2731f52607 lib/blob: add md page parameter to _spdk_bs_load_replay_md_parse_page()
Further part of the series will hold array of md pages
in the ctx. Callers of _spdk_bs_load_replay_md_parse_page()
will make select which page to parse.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3fb70660672ba74bdb338eb1233409103903b215
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/983
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>
2020-03-06 10:28:43 +00:00
Tomasz Zawadzki
2a51c755db lib/blob: use common pointer to md page in load replay path
This is refactoring change for future patches.
struct spdk_bs_load_ctx will contain array of pages
instead of single one. Having to change just single
line for selection of page will make it easier to
read next patches in series.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If3dc1e7da7e61c7b4866307d859e55131a32d38b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/982
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>
2020-03-06 10:28:43 +00:00
Tomasz Zawadzki
f422548ea7 ut/blob: reload bs and verify xattr in blob_persist test
This patch adds better check if the xattr was removed.
It will identify potential bugs when first md sync
takes precedence over the second md sync.

As per suggestion in
https://review.spdk.io/gerrit/c/spdk/spdk/+/774/6/test/unit/lib/blob/blob.c/blob_ut.c#7655

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I463f2455614ef11cc1512dc2fb1972ba1f024337
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1109
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>
2020-03-06 10:28:28 +00:00
Tomasz Zawadzki
682e7c1719 ut/blob: add common function for dirty shutdown
Operation of dirty shutdown of blobstore and reloading
it occurs often enough in UT to provide a common function
to perform it.

Added ut_bs_dirty_load() to facilitate this.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0079dfabd64eaec6495db02fe200be1d6116f0c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1092
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: Jim Harris <james.r.harris@intel.com>
2020-03-06 10:28:28 +00:00
Tomasz Zawadzki
b8fedfa33d ut/blob: add common function to reload blobstore
Operation of unloading and loading blobstore
occurs often enough in UT to provide a common function
to perform it.

Added ut_bs_reload() to facilitate this.

Couple occurences in this patch actually fix
test cases where mistakenly opts were not passed.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib46ed395cd134feaa540e00a334ae861872b3ef4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1091
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: Jim Harris <james.r.harris@intel.com>
2020-03-06 10:28:28 +00:00
Tomasz Zawadzki
9e6b5aa4c2 ut/blob: always refer to local bs pointer, rather than g_bs
Couple unit tests were still refering to g_bs pointer,
rather than the one local to particular UT.

This patch fixes this.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If343eb561a48c4547d499139d76e1db6b2d7f3bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1090
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: Jim Harris <james.r.harris@intel.com>
2020-03-06 10:28:28 +00:00
Maciej Szczepaniak
8b27fbba38 lib/ftl: Make each ftl_l2p_set persistent when using pmem device for l2p
Signed-off-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
Change-Id: Ic176988664dc74d5c1d321914d7665516ba6704d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/911
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-06 10:28:21 +00:00
Maciej Szczepaniak
12642633bf bdev/ftl: Add ftl_path parameter to rpc parsing
Signed-off-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
Change-Id: I51cc68536f162b0d920d135ba491b1657e699618
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/880
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-06 10:28:21 +00:00
Maciej Szczepaniak
01ea524068 lib/ftl: Create l2p on l2p_path file if set in config
New spdk_ftl_conf parameter l2p_path, l2p_path defines
location of existing pmem file or device to use as l2p table.

ftl_dev_l2p_alloc now has two flows:
1. If l2p_path is set perform pmem_map_file (PMDK) of l2p_size on it
2. Else malloc l2p table as usual

l2p_get/set will use atomic_load/store on both of those storage
locations as PMDK pmem_memcpy family of functions is not thread safe.

Signed-off-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
Change-Id: I91806feb7aa0ef8057792bc120b09a39c63c8640
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/649
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-06 10:28:21 +00:00
Darek Stojaczyk
15a3067b78 autobuild: remove a lot of unnecessary scanbuild output
The loop was generating huge xtrace output that was
hardly helpful.

Change-Id: Ida683c01ec3a05674965bec972cc9f762a1f8fa0
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1053
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>
2020-03-06 10:28:15 +00:00
Richael Zhuang
a9c79c3337 env_dpdk: Fix error when using vfio with noiommu
When using vfio with enable_unsafe_noiommu_mode=Y, force iova-mode
as "pa" here for DPDK guesses it's "va", which cause the following
error: "EAL:   Expecting 'PA' IOVA mode but current mode is 'VA',
not initializing".

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I7c343498c5d6976a7c75d75438d6f9c35f1b6160
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1071
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>
2020-03-06 10:28:07 +00:00
WANGHAILIANG
bdbe33e663 lib/iscsi: Add a assert for conn->sock
In some cases, conn->sock will be lost, while conn pointer will still be.
A runtime error will apperars: null pointer of type 'struct spdk_sock'.
This only happens when ./configure with asan.
So I add a sssert to display this error explicitly when it occurs.

Change-Id: I7d012ac1a29a7fb0bce4815e0622582f23222a25
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1102
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: Ben Walker <benjamin.walker@intel.com>
2020-03-06 10:28:02 +00:00
Richael Zhuang
c49a710157 test/vhost: add "-g" for vhost_fuzz app
If the hugepage we use is 2MB, the numble of hugetlbfs will exceeds
the limit of 8. we must pass "-g" to vhost_fuzz app, which will pass
"--single-file-segments" to DPDK to create a single non-physically-
continuous hugetlbfs file for all its memory.

Here we pass "-g" to vhost_fuzz app which make the script work under
both 2MB and 1GB hugepage.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I0287584c54f03a379957d6885c23e21a1fd10c4b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1148
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-03-06 10:27:55 +00:00
Changpeng Liu
0841adda40 blobfs: move global cache initialization and free into a function
Also rename __initialize_cache()/__free_cache() to the new name
to reflect the logic.

Change-Id: I69bec4a10b2f21a7c40475fc2a99919bc526c556
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/976
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>
2020-03-06 10:27:45 +00:00
Changpeng Liu
1914de0920 blobfs: start a poller to do cache buffer reclaim regularly
Currently we will free the cache buffers in the file R/W
data path, however we can start a thread to do the cache
buffer reclaim regulary, so that we don't need to free
the cache buffer in the Rocksdb thread context.  By
doing this, we can also remove the global cache buffer
lock in following patches.

Change-Id: Icb0fbc49baecd1e9d86a5fcfe400758dfc3c53a2
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/941
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>
2020-03-06 10:27:45 +00:00
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