Add a helper function to get DIF context when the passed NVMf request
is for I/O queue, NVMe read, write, or compare command, and its NSID
is valid.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I796c20607c7b64a8be85da5131c5ea95ffd9f8e4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458713
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Add a helper function to get necessary DIF information and set
them into the passed DIF context and return. This function will
be called only when the specific requirement is satisfied and
the caller will be added in the next patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic435886ca936a211f34278b813f547ffa43b9000
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458712
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Currently we test both transports under perf each time we run the nvmf
tests. Once we have created a jenkins job for the tcp transport, we will
only need to run this test against the specified transport for each job.
Change-Id: I053d11f4e6d6f4b86a3f29e6c8f43e1e196bedab
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460714
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
This is needed to create a job in jenkins that tests only the tcp
transport.
Change-Id: Iaa5a07617e9a241a9e4bd50105d5d5d1e849844e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460713
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
As we add more virtual machines for testing, we may want to decrease the
average size of emulated NVMe drives to conserve disk space. The current
ext4test in iscsi presupposes that the provided NVMe drive is at least
20 GiB. This patch removes this assumption but keeps the cap of 10 GiB
per split for the test.
Note: the reason for the 10 GiB max is so that large drives don't take
an incredibly long time to create the filesystem for very large drives.
Change-Id: I4035905de42d07bdcef795f39b0ccf4cb076c31f
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460728
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
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>
This patch removes restriction for using only first
namespace when testing nvme cli and includes other
namespaces than first one in nvme fio tests.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I047f85520b441313cf1788c06d8f4c7d7ef4e162
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457643
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>
Some tests return error if no namespace is found,
but such scenario should be accepted.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Icc799eac1ebc2d4f16017722da3c20d58788fb33
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459276
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>
Also made on the prints a DEBUG message instead and noticed the really
name that was being registered by this component so updated it to
make it look like the rest of SPDK.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I747a846cb365e7db49be50db941e83fb1b265ea0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460244
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Using the vhost_user API on the initiator side, we can craft arbitrary
requests to fuzz the vhost target APIs. This script currently supports
vhost_blk, but will support both vhost_blk and vhost_scsi.
Change-Id: I7f0af6ca2adabbc18b7029ea77b33f47fce9c16b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454682
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Enables us to test randomized data against the NVMe-oF target interface.
Change-Id: Ie7ab46949ccd89f74b10b79a24256aeae2df89ab
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/431571
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: qun wan <qun.wan@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Load reservation information based on ptpl configuration file, and
restore the information to NS data structure.
Change-Id: I5f46d49a6d1e6e49aab93ca7cd654469a3a08659
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455912
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>
When pdu->dif_ctx is not NULL, call spdk_dif_set_md_interleave_iovs
in nvme_tcp_build_iovs and nvme_tcp_build_payload_iovs to create
special SGL for the data segment to leave a space of metadata for
each block.
Add UT to verify if the update works correctly.
This update is very similar with the use case of
spdk_dif_set_md_interleave_iovs in iSCSI target.
Change-Id: Ie802cb4b7c541089579ecc2a630fc1e34004da55
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458923
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>
When DIF is inserted or stripped, nvme_tcp_pdu_set_data_buf must
shift the range of the buffer from LBA based to extended LBA based
because the extended LBA based range must be passed to create a special
temporary iovec array to leave a space of metadata for each block then.
This patch do the following:
- Add a pointer to the current DIF context to struct nvme_tcp_pdu.
This pointer is set when DIF is inserted or stripped to the current
NVMf request.
- When the pointer to the current DIF context in the PDU is set, get
the extended LBA based offset and length by calling
spdk_dif_get_range_with_md() and use them in nvme_tcp_pdu_set_data_buf().
- Original data length is set in the PDU and original data offset is
set in the current DIF context in nvme_tcp_pdu_set_data_buf().
- Add UT code.
Change-Id: Ic1f4fd326b5b3e3d4c74677592bda34d6949a11e
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458920
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>
Compilation Warning on fedora30.
ctrlr_ut.c:1146:12: warning: Assigned value is garbage or undefined
event.raw = rsp.nvme_cpl.cdw0;
^ ~~~~~~~~~~~~~~~~~
This is related to issue #822.
Change-Id: I58be6df56d309e257105b1d3c96247665c3e31a0
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459714
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Scripts were using a mix of two approaches, lets unify that so
just dollar-parenthesis syntax is used.
Also update two scripts from spdk/test which we previously missed.
Change-Id: I429f9bc158076462b419fae597f716c329f9b7aa
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460344
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Required due to recent changes to functional code, unclear how
the UT passed without these.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I3ea4401ee1842ef577793338f1567d20d73ad8bc
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459868
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
By moving the modprobe and modprobe -r calls into nvmftestinit and
nvmftestfini respectively, we can make these calls symmetric in all
cases The previous format where nvmfappstart was adding modules and
nvmfcleanup was being called independently to remove them started to
cause issues when we added the tcp transport.
I think this fixes#846
Change-Id: I68d18e0be5a2d4d2ea83a5a34f0aa2da268209fe
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460396
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@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>
When we insert the nvme-$TEST_TRANSPORT modules into the kernel, we
allow for it to fail. So, for the sake of symmetry, we should allow for
the opposite to be true.
Thanks to Maciej Wawryk for pointing out the discrepancy.
Change-Id: I3c551950cbe25382c2bbea4f390bead0ba6f2a37
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460395
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
It seems that autotest doesn't cover the function
nvme_tcp_build_sgl_request(), So add the unit test.
Change-Id: I2e243910cb38ffc49bdd6048b365dc7fa60892c2
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456728
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>
spdk_dma_*malloc() is about to be deprecated.
Change-Id: I2c2f0a9b85a9d4393296ec125537c7a244e08a55
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459558
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
spdk_dma_*malloc() is about to be deprecated.
Change-Id: I3949913f1a69d5c0b0798077cf794b1dbd5bf0cc
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459557
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
spdk_dma_*malloc() is about to be deprecated.
Change-Id: I749a557ab95162aa9bb91bf0ec9b53146c50fb0f
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459556
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
spdk_dma_*malloc() is about to be deprecated.
Change-Id: I3c3c65829ea9479ec6574716f41ed61fb0a8d81c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459555
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
spdk_dma_*malloc() is about to be deprecated.
Change-Id: I41f8d8ba2cde155074bfc4e0b6c43aa956c6cb40
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459554
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
spdk_dma_*malloc() is about to be deprecated.
Change-Id: I200525244d1896e5dd3e589db133d597b699997f
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459553
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
spdk_dma_*malloc() is about to be deprecated.
Change-Id: I3bd2c284a210acb3bc31a6443e52a237c4c4d1ae
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459552
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
spdk_dma_*malloc() is about to be deprecated.
Change-Id: I303ff9b4eecba1b7778d94416d19b8f8ca26297e
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459551
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
spdk_jsonrpc_begin_result() will be refactored to always
return non-null in subsequent patch and those raid tests
will no longer make sense, so we remove them now.
Change-Id: Ifd4570af4daab9c96cd8701440366e292f879204
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459659
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@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>
There was no UT to process SGL for PDU, and add UT in this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icd07683ba94b584cd3c6e5a88fee78d512d5832d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458541
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This patch adds UT code to test nvmf_tcp_send_c2h_data,
nvmf_tcp_calc_c2h_data_pdu_num, and nvmf_tcp_h2c_data_hdr_handle,
and verifies if the last changes works expectedly.
Change-Id: Idba21a4739635b7828049f1d71c3bc1595deaab0
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455626
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
And also add spdk_sock_group_get_ctx function
Change-Id: I2a2a58b0588ff7d99d3538ea0a633a3b8c7a234b
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454538
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>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Issue reports:
bdev_ut.c:1486:2: warning: Potential leak of memory pointed to by 'histogram'
poll_threads();
^~~~~~~~~~~~~~
1 warning generated.
Add Tear down the channels like other tests in this file.
Change-Id: Iaeff93ec6f17716dfb7638cf4dd5f6cfe2c2de06
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459939
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This fixes error on scan-build on Fedora 30, which assumes spdk_bdev_open()
is called from non-SPDK thread - failing before allocating spdk_bdev_desc:
bdev_ut.c:1766:17: warning: The left operand of '!=' is a garbage value
CU_ASSERT(desc != NULL);
This is related to issue #822.
Change-Id: I8ee2112bb4d71aafc93d63bddca083c009ec11f3
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459755
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: Changpeng Liu <changpeng.liu@intel.com>
Compile reports that device->map is not initialized.
In file included from rdma_ut.c:37:
/home/vagrant/spdk_repo/spdk/lib/nvmf/rdma.c:1542:44: warning: 1st function call argument is an uninitialized value
wr->sg_list[i].lkey = ((struct ibv_mr *)spdk_mem_map_translate(device->map,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/spdk_repo/spdk/lib/nvmf/rdma.c:1545:26: warning: 1st function call argument is an uninitialized value
wr->sg_list[i].lkey = spdk_mem_map_translate(device->map,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So add this to initialize memory map.
Change-Id: Ia6f6153a1558861b4283637dac47439651b043c7
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459927
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Compilation Warning on fedora30.
bdev_raid_ut.c:659:13: warning: Array access
(via field 'base_channel') results in a null pointer dereference
CU_ASSERT(ch_ctx->base_channel[index] == g_io_output[index].ch);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
bdev_raid_ut.c:2181:14: warning: Array access
(via field 'base_channel') results in a null pointer dereference
CU_ASSERT(ch_ctx->base_channel[j] == (void *)0x1);
^~~~~~~~~~~~~~~~~~~~~~~
This is related to issue #822.
Change-Id: I9fd066b16e9f4c1fedc95403d2ac6e609f862c65
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460094
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>
Purpose: Currently, there are many patches related with
NVMe-oF, especially related with big I/O. We need to
add a test case to guard this.
Change-Id: Iddd4070976fe6bf4926ca489d9c97f64a108a422
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460065
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>
Also, construct this path by grabbing the home directory
of the current user.
Change-Id: Ia8d5cc2be40c0c3ac693c80a3132b970f7124183
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456704
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
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>
This is much easier.
Change-Id: I4ae5f2f5b9393f65d07f39f03fa30628a40b01cf
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459304
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Placement_id is related with getsockopt with the optname=
SO_INCOMING_NAPI_ID. For some testing platform, it is not
supported with this macro, so use ifdef to avoid send this
to the kernel.
Change-Id: I9e49e6e15810af0cd5085b92469c15a53ac09ada
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454468
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Add file based reservation information definition, the data structure
can be used to store all the reservation information to a json
based configuration file, and enable this feature with REGISTER
command.
Change-Id: Ic93cfc5934a4ad96f11b96ec77bacb877edf6c10
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455909
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Scan-build didn't get that spdk_bs_init() assigns the blobstore to dev.bs
and there was no point at which it could fail (without *_FATAL) before checking it.
Additional assert added to make sure scan-build is aware.
lvol_ut.c:1105:27: warning: Access to field 'get_super_status' results in a dereference of a null pointer (loaded from field 'bs')
dev.bs->get_super_status = -1;
~~ ^
This is related to issue #822.
Change-Id: Id44d12ced4bc25490ca4e0949cbdfb89508a6e06
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459756
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
When we have a really large disk, setting up a nested lvol across the
entire drive can actually be quite time consuming. When trying to run
this test on an 800G p3700 I was actually getting timeouts on the rpcs
when creating the nested lvolstore. By only taking the first 20G of the
drive to set up the stores, we end up with a much quicker test and
conveniently get rid of the timeouts I was facing.
Change-Id: Ifd43c21c66bc77b615da9b0f421e95337b4c7019
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459849
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
With all the pieces in place we can finally remove
the legacy cross thread messages from vhost.
We replace spdk_vhost_allocate_reactor() with
spdk_vhost_get_poll_group(). The returned poll_group
has to be passed to spdk_vhost_session_send_event(),
where it will be assigned to the session. After the
session it started, that poll group will be used for
all the internal vhost cross-thread messaging.
Change-Id: I17f13d3cc6e2b64e4b614c3ceb1eddb31056669b
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452207
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This patch adds UT code to test if the bug in nvmf_tcp_pdu_set_data_buf
is fixed by the last patch.
Change-Id: I0b504ba37652de8300c85eea2f85218c837dd503
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455624
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Using malloc'ed string for string in iSCSI target has caused
scan-build error.
Define maximum port number of portal to be 32 and use fixed size string
whose size is 33 for spdk_iscsi_portal_grp::port.
This change will reduce the potential malloc failure.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie1fcdbd45ce000a9c1c53761195697555b8d030a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459709
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>
Using malloc'ed string for string in iSCSI target has caused
scan-build error.
Define maximum IP address of portal to be 256 and use fixed size string
whose size is 257 for spdk_iscsi_portal_grp::host.
This change will reduce the potential malloc failure.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iceeae94e250ea426f72ff72355a213606308da51
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459708
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>
Using malloc'ed string for string in iSCSI target has caused
scan-build error.
Maximum size of target name is already defined to be MAX_TARGET_NAME,
and hence use fixed size string whose size is MAX_TARGET_NAME + 1 for
spdk_iscsi_tgt_node::name.
Change psdk_iscsi_tgt_node::alias together.
This change will reduce the potential malloc failure.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iac4cd6e9d60173ddeb68ca21ce712126c13bc3c4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459707
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>
Using malloc'ed string for string in iSCSI target has caused
scan-build error.
Maximum size of initiator address is already defined to be
MAX_INITIATOR_ADDR, and hence use fixed size string whose size
is MAX_INITIATOR_ADDR + 1 for spdk_iscsi_initiator_mask::mask.
This change will reduce the potential malloc failure.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic39e08986c9377800ce58a1cb5b8401c6b71cf96
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459706
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>
Using malloc'ed string for string in iSCSI target has caused
scan-build error.
Maximum size of initiator name is already defined to be
MAX_INITIATOR_NAME, and hence use fixed size string whose size
is MAX_INITIATOR_NAME + 1 for spdk_iscsi_initiator_name::name.
This will also reduce the potential malloc failure.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic6bc172125fc6c9c0896499704d2a9b522106da0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459705
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>
Here is the an example to describe existing issue:
There is a Write request with 64KiB data length, and this IO is cross the IO
boundary. We assume that the parent IO will have 2 children requests, one is
33KiB length, the other one is 31KiB. Here is the view of parent iovs, the
first 33KiB length data has 33 iovs:
iov.[0].iov_length = 1024;
.
.
iov.[31].iov_length = 256;
iov.[32].iov_length = 768;
.
.
iov.[64].iov_length = 1024;
In function _spdk_bdev_io_split(), then you can see that for the 33KiB length
child request, exiting code will run out of child child_iov space and return
error due to last one data buffer is not block size aligned.
Here we can rewind the existing offset to last block size aligned buffer to
avoid the error case, for backend which need aligned data buffer such as
AIO backend, the request will go through spdk_bdev_io_get_buf() again to
do the data copy, otherwise for those backend devices such as NVMe with
hardware SGL support, 256 data segment is fine for them.
Change-Id: I96ebdf29829d86f9b38fab28a7406eedc9fa44ef
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453604
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>
VMD section with Enable flag set to true
need to be defined in config file to
enumerate devices behind VMD.
Change-Id: I009926f41465298e3072a3cca1452e9808095c9b
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459764
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
VMD section with Enable flag set to true
need to be defined in config file to
enumerate devices behind VMD.
Change-Id: Ic830ec69149dcb80f9bf5ac7bd95ecc93d4b6f74
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459763
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
VMD section with Enable flag set to true
need to be defined in config file to
enumerate devices behind VMD.
Change-Id: Ib4d6fad99979d2e8ab61e18feb04661f388eb4c1
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459762
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
VMD section with Enable flag set to true
need to be defined in config file to
enumerate devices behind VMD.
Change-Id: If0bf702dcdc19bfaec44fb8867205f29f562097e
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459640
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Added check if band that is added to reloc
have any valid blocks. Return immediately
if there is no valid blocks.
Change-Id: I2bce088e0ad71479c6899fff96845397d12e2e92
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457625
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
In case ANM event occurs on open band there
can be situation that reloc will try to read
block on which there is ongoing write.
This is happening because lba valid map is
updated before write submission to allow sent
consistent metadata to disk before all user
writes are completed.
Added write offset to the each chunk and
add check to reloc if particular ppa is written
on that chunk.
Change-Id: Ic95a06e69381d2152a86984b65a0975afaff955d
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458056
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
In case ANM event occurs on open band
reloc need to be able to process such
event.
If band is not in closed sate do not
alloc lba map for it and do not set
it to free state after relocation.
Change-Id: I2f4a5770fef08271d222936ca19f3cc98e5e5be1
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457612
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>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Open bands need to have lba map segments
set to cached state to prevent read lba
map from disk during relocation events.
Change-Id: Ib4f1ed19131fad174c1d2f70e4c02e83701e2a0a
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457853
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Compilation Warning on fedora30.
iscsi_ut.c:184:31: warning: The left operand of '==' is a garbage value
CU_ASSERT(rsph->status_class == ISCSI_CLASS_INITIATOR_ERROR);
~~~~~~~~~~~~~~~~~~ ^
This is related to issue #822.
Change-Id: I221aa6601bae4a2d55bd557fcd1d001fbc616149
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459723
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@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>
Compilation Warning on fedora30.
dif_ut.c:151:24: warning: The left operand of '==' is a garbage value
return (iov->iov_base == iov_base && iov->iov_len == iov_len);
~~~~~~~~~~~~~ ^
This is related to issue #822.
Change-Id: Ie050c65d3747c551e2c26e84d3879742eaf86fd8
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459712
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
When possible we should make sure that no silent failures or
skipped tests.
Since some of the tests use fio, autotest should fail
in those places when it is missing.
Change-Id: I97581e2df30a02445b560e3b88d03ce92986d0fd
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456316
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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>
Just use a for loop, then we can delete all malloc
devices.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I34fb06c0d49333ab1b5bce0ea2e2b7ced7c50eb2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458045
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This will be used to get extended LBA based range or length in NVMe/TCP
target later.
Change-Id: Id0f08bdaeea634dbc05b34a0f7914be21aef9aae
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458706
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Add spdk_dif_update_crc32c_stream to update CRC32C by stream fashion.
spdk_dif_update_crc32c_stream utilizes the updated _dif_update_crc32c_split.
A minor bug was found in UT for spdk_dif_update_crc32c and is fixed
together in this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I92358e845e8e2e17c6f288aa718b947e71e6e1fb
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458919
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
For NVMe/TCP target, data segments which correspond to H2C or C2H PDU
will have any alignment, and _dif_update_crc32c_split will have to
process partial data block, particularly the following types:
- start and end are both within a data block.
- start is within a data block, and end is at the end of a block
On the other hand, _dif_update_crc32c_split had assumed that passed
block is always a complete block.
This patch exposes offset_in_block, data_len, and guard as parameters
of _dif_update_crc32c_split() and make _dif_verify_split() process
the above two types of data block properly.
The next patch will utilize the updated _dif_update_crc32c_split to
add spdk_dif_update_crc32c_stream().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iee29377ad49d4f209673fffb4de4a23a54f31766
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458918
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Like other test, need to add SPDK_CU_ASSERT_FATAL(TAILQ_EMPTY(&g_bdev_io_queue)).
To avoid issue:
scsi_bdev_ut.c:956:2: warning: Address of stack memory associated with local
variable 'task' is still referred to by the global variable 'g_io_wait_queue'
upon returning to the caller. This will be a dangling reference
ut_put_task(&task);
^~~~~~~~~~~~~~~~~~
waiting exit from while loop in ut_bdev_io_flush.
This is related to issue #822.
Change-Id: If390f5076582a0149646f0c2a408c3bcd3b4fab6
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459534
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Tests that were thus far performed using posix net framework
can now be run with VPP. This patch adds network interface
configuration for VPP to work in iSCSI tests.
Some tests are disabled on purpose:
- IP Migration, RBD and NVMe-oF due to their tests lacking network
namespace support
- rpc_config adding/deleting IP, as VPP has separate utility for that
calsoft.sh doesn't handle TCP stream properly and fails decoding iSCSI
requests when are divided by TCP segmentation. This is very common
situation for VPP and causes that calsoft.sh never PASS.
Change-Id: I7c80427ca1675a1789ce7440796cc8d9956f1c9e
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/394174
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
NOTE:
Due to some changes in VPP two cherry-picks from newer version of VPP
(at least 19.04):
"sock api: allow to start client with no rx_thread"
commit: 97dcf5bd26ca6de580943f5d39681f0144782c3d
"dlmalloc: honor 8 byte alignment requests"
commit: f5dc9fbf814865b31b52b20f5bf959e9ff818b25
These commits are already merged in VPP 19.04.
This patch includes also workaround for VPP 19.01.1 to prevent closing
sessions to already closed applications after timeout. It causes
intermittent segfaults.
This is temporal solution and should be solved with next releases of
VPP, but is required now to create more stable VPP environment.
Change-Id: If4b45b7159819cfd836dd7d50f333dbab2b38eab
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456462
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This patch prepares environment to allow compile applications and
libraries with VPP.
Change-Id: Icc067c17b57932062afa5e6a67791bd58de3a2cc
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456461
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
We have no guaranty that iscsiadm -m session shows all required iscsi
devices at some point of time after login. It may cause that not all
devices are used in further tests (e.g. in fio).
This patch allows to wait for a certain number of sessions after login.
Change-Id: I868cb8f1235dd04d88572bc8518e97de99a2c5e6
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458236
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Bdevperf up to now didn't use unregister callback when opening target
block deice. This is unsafe if test scenario involves target bdev
unregistering voluntarily, although with recent bdev layer update
not registering hotremove callback has become safer.
To be on the safe side, this patch registers a callback to transit
gone target into the I/O drain mode in case the target unregisters
during runtime.
Changes wrt previous versions of the patch:
- incorporated review comments
- updated callback functionality
- updated patch description.
Change-Id: I0dad2f4a7cf4acb22b363e23e4b670ca73d8c6f2
Signed-off-by: Andrey Kuzmin <akuzmin@jetstreamsoft.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447956
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
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>
Add spdk_dif_verify_stream to verify DIF by stream fashion.
spdk_dif_verify_stream utilizes the updated _dif_verify_split.
spdk_dif_verify_stream is very similar with spdk_dif_generate_stream().
UT code demonstrates how it is realized.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1c5d197cf4c0bbc82c8e7f4fa45ddc0b94051058
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458330
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
For NVMe/TCP target, data segments which correspond to H2C or C2H PDU
will have any alignment, and _dif_verify_split will have to process
partial data block, particularly the following types:
- start and end are both within a data block.
- start is within a data block, and end is at the end of a block
On the other hand, _dif_verify_split had assumed that passed block
is always a complete block.
According to the refactoring done in the last patch, this patch
exposes offset_in_block, data_len, and guard as parameters of
_dif_verify_split() and make _dif_verify_split() process the
above two types of data block properly.
The next patch will utilize the updated _dif_verify_split to
add spdk_dif_verify_stream().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic371d3ccefbd5fe8147a948a624013be2702128e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458329
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
As have updated the NVMe reset case, the check_io() must be executed
after ctrlr reset. It's easier to reproduce #819, so we can set a
short time.
Change-Id: I9ba867a6c2aa1a3921bace2e77acd28a069d9016
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457761
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Address translation wasn't correct for >32 bit length packed address.
This commit fixes the issue and adds a corresponding unit test.
This patch fixes issue #774:
https://github.com/spdk/spdk/issues/774
Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: Idce67c47f2a9888f9e2ae2eadaf71ccc34e5c260
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457114
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Updated doc to include section on how to compile SPDK with link
time optimization (lto) gcc flag prior to running the benchmark.
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Change-Id: I1af4033144dd9f7594bcf40621acb7fb52018e7a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459330
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Scanbuild error on fedora30 reports:
warning: Array access (via field 'write_buf') results in a null pointer dereference
if (context->write_buf[i]) {
In deallocated_value.c, cleanup function be used at many places to deal with failed
cases even context->write_buf is NULL, so add context->write_buf pointer check before
array data. I think context->read_buf is the same.
This is related to issue #822.
Change-Id: I33c685fd732da820c1dfc861eb991b92b41caa29
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458736
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Missing dependency libudev-devel. If not installed then
./cofnigure fails with:
checking for libudev.h... no
configure: error:
udev headers required
Change-Id: I53c8f522cbc8eb1e6b461fd78c0bf3305bfb09b9
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459323
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: Ben Walker <benjamin.walker@intel.com>
Currently we are missing cleanup routine for case when
power failure interrupts creating snapshot. This patch
add such routine.
For the case where we find blob with a parent snapshot ID
matching newly created snapshot we can finish whole process
during recovery by processing forward with setting snpashot
as read only, removing xattr and syncing. We should remove
snapshot only if there is no blob with parent pointing at
snapshot.
Fixes github issue #760
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I2f0e298164e07a2b4dfa5367e8878facef640702
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455216
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This is unit test for power failure event during snapshot
deletion. At the same time this is an example how to
use new power failure event functionality in unit tests.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I9212392f665576fa16edd28c609199d0e02dc434
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454608
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Both clean and dirty shutdown tests were expanded to perform additional
writes after restore, to make sure write pointers have been correctly
re-initialised and don't cause data corruption.
Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I662cf196319a39fb1cab455f5a76571904c20215
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457618
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Add test which causes dirty shutdown of ftl and attempts to restore
it. Without persistent cache it expects partial recovery of data
and zeroed out blocks in found open bands.
Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I316cbbb47d0d03b2c20247df43ba789f2fd018db
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456470
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This patch makes spdk_dif_set_md_interleave_iovs() and
spdk_dif_generate_stream() process unaligned start of data segment
properly by using ctx->data_offset.
Separating this patch into two may be required but this patch is
small and aggregating into a patch is good to test.
UT code demonstrates how it is realized.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idb5250aba4e12a34102e5ce067d725c685681177
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458142
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>
VMD section with Enable flag set to true
need to be defined in config file to
enumerate devices behind VMD.
Change-Id: Ib9454b1596dc9e0e35dae695f20d6e40dd2c1ab0
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458444
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Make it easier to reproduce issue #819 without setting long time.
To decrease the UT time.
Change-Id: I3dd0268a894113e1a12395618721afee6137588d
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457914
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Our test destination code of spdk is rsynced from host.
former link address of spdk "https://review.gerrithub.io/spdk/spdk"
is not very fast and always failed .
So changed to "https://github.com/spdk/spdk.git" ,this spdk just for
excuting start testing command.
Change-Id: I26b5c1556d8068becd5c5a94067cc64d9d32b5e6
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459223
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@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>
For NVMe/TCP target, data segments which correspond to H2C or C2H PDU
will have any alignment, and _dif_generate_split will have to process
partial data block, particularly the following types:
- start and end are both within a data block.
- start is within a data block, and end is at the end of a block
According to the refactoring done in the last patch, this patch
exposes offset_in_block, data_len, and guard as parameters of
_dif_generate_split() and make _dif_generate_split() process
the above two types of data block properly.
The next patch will utilize the updated _dif_generate_split in
spdk_dif_generate_stream().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4211e65ead7fc256a40748412c670e46f83b1731
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457544
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>
For NVMe/TCP target, data segments which correspond to H2C or C2H PDU
will have any alignment. spdk_dif_set_md_interleave_iovs() have allowed
reading data to have any alignment but had required data segment to
be a multiple of block size.
In other words, spdk_dif_set_md_interleave_iovs() had required that both
ctx->data_offset and (data_offset + data_len) must be a multiple of the
data block size.
This patch refines the algorithm to remove the latter requirement.
The update implies that spdk_dif_set_md_interleave_iovs support any
data buffer whose size is less than a single data block.
The update doesn't change parameters of spdk_dif_set_md_interleave_iovs
and existing UT should be passed.
This patch adds additional UT code to test these updates.
Change-Id: I88c7d2a80a8d92b54863b6ad1c3a9d2761a6195d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457542
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>
This patch adds mechanism to simulate power failure in
blobstore unit tests at any given moment in time.
This point in time is measured by number of IO operations
occured after triggering power failure with the number
of IO operations given as a parameter. Number of IO
operations parameter can be defined as any type IOs,
writes, reads, unmaps, writes zero or flushes.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I7be45331bb5110f6c16f01fd7c4e7984b2d1977d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454451
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This bug was found by code inspection. When PDU read restarts
after data segment, iov_offset must be reduced by data length.
However iov_offset had been reduced by buffer length by mistake.
Lack of UT code was the main reason of this bug. Hence add UT
code to test the fix of the bug together in this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I74f2f6ae8dca2e78a64bfdef8080c8031dfabb87
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458530
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>
Instead of doing some OS-specific magic to detect if the
spdk app has already initialized, just try to send it an
RPC. This serves mostly as cleanup, but also simplifies
test output in cases where the spdk app could not be fully
initialized. Previous waitforlisten implementation would
return as soon as the rpc subsystem was initialized, but
the app could have still failed on e.g. bdev initialization
later on. Since waitforlisten() returned success, the
script could continue its execution and try to execute
some RPCs. The logs from the SPDK app and the bash script
could easily mix, rendering the entire output not so clear
to the user.
To fix it, just try to send some RPC commands inside
waitforlisten().
Change-Id: I33eaf362e3cc645f8ea3ee22fd48db1643442129
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457562
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>
The test used waitforlisten() from autotest_common.sh to
wait for a socat instance and happened to work only by
a coincidence. As we can see in all the messages that
waitforlisten prints, that function is meant for SPDK
applications running an RPC server.
We're about to simplify waitforlisten a lot, so for now
just copy its current version to sock.sh and name it
waitfortcp(). Note that it already had to be stripped of
some rpc references.
Change-Id: Ibbe7cf67d20fbc277d407b20073154a96ddaaade
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458221
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>
Functions in this file already expect some variables
to be set by the calling script, so do the same with
$testdir and functions from autotest_common. We'll start
using `set -u` soon, so that variable expansion failure
will produce a clear error message (and will trigger ERR).
Change-Id: I3795af498639ad73a99cd03c6b5e72717fe5fd75
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458177
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>
autotest_common.sh used to be sourced from
test/spdkcli/common.sh (and it still is - we'll clean
it up in a separate patch). Let's source that file in
each spdkcli test script, just like we do in every
other test script.
Change-Id: I2e021bcda7402ee0c5a4a5f45f921bb0142b6783
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458176
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>
This file is meant to be just sourced somewhere, so
don't include autotest_common.sh inside. Also, don't
hardcode the default pool file path. Expect
$default_pool_file to be defined already. We'll define
`set -u` soon, so that we'll get a clear error if it's
not defined.
Change-Id: Ie9bb86f8a65d05c9fb2d3e56b8682cab8dd569d6
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458175
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>
This test defines a variable for "default_pool_file" path,
but keeps using the hardcoded path anyway. Fix that.
Change-Id: I767fdff1eb6a4638a0e028ca8f04bd94582664e7
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458174
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>
Replace them with `testdir` and `rootdir` that we use
in every other test. What was a BASE_DIR before is now
a testdir and what was a TEST_DIR is now a rootdir.
While here, also replace all "$rootdir/test/pmem"
occurences with "$testdir".
Change-Id: I9e5b867bbc481c9c9d6ff25378b6eda60690dd08
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458173
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>
It's always set in autotest_common.sh, there's no need
to set it again in each test script.
Change-Id: Ib14c4189c553dad54a3065c1a1d413a5fc5a5347
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457466
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>
Replace them with `testdir` and `rootdir` that we use
in every other test. What was a BASE_DIR before is now
a testdir and what was a TEST_DIR is now a rootdir.
While here, also move autotest_common.sh include to the
top of the file.
Change-Id: Ie15b7ec14bfb7536bcc7b3787eed930798d24c78
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457464
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
In fio.sh we used `set +e` for bdev deletion RPCs
and for `wait $fio_pid`. Disabling errors from those
RPCs doesn't make sense. We expect FIO to fail due
to bdev hotremoval, but the bdev hotremoval itself
must succeed.
Besides, it's easy to forget to undo `set +e` so
don't use it. For `wait` we can use the following
paradigm instead:
```
rc=0
wait $pid || rc=$?
```
The same applies to nmic.sh, where we expect some
RPC to fail.
Change-Id: I66ce3504a0c6b5da497759f0688b6c0ea6480b61
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457463
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
If bdev is configured to use separate buffers for metadata transfer,
but it doesn't support the write zeroes command, pass empty zeroed
buffer to make sure the metadata is cleared out as well.
Change-Id: If6f024266067e5764a28a276296f651d31da4792
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457628
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
With this change, bdevio tests are not ran immediately
after starting the application.
This will allow to configure new bdevs via RPC and
run tests on demand during script's execution.
Change-Id: I9740fca92c26cb2a39fbdc7cfb132ad53cec3787
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455235
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>
There was a gap where nbd tests could fail, but without
trap set the app would still be present.
When here removed trap from end of the script since,
no part of the script set it up.
Change-Id: I0c435c7cd603410c2cd7a034bf955ab424e413f0
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457615
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>
Starting with this patch it is possible to remove a
snapshot if there is only a one clone created from it.
In such case snapshot can be removed without any data
copying. This is achieved with following steps (case
with only one clone):
1. Open snapshot (Snapshot1) that shall be removed
2. Check if the Snapshot1 has no more than 1 clone (Clone1)
3. Remove Clone1 entry from Snapshot1
4. If the Snapshot1 has a parent snapshot (Snapshot2):
4a. Add Clone1 entry to the Snapshot2 clones list
4b. Remove Snapshot1 entry from Snapshot2 clones list
5. Open Clone1 blob
6. Freeze I/O operations on Clone1
7. Temporarily override md_ro flag for Snapshot1 and Clone1
for MD modification
8. Merge Snapshot1 and Clone1 clusters maps into Clone1
clusters map
9a. If Snapshot2 is present switch parent ID and backing
bs_dev on Clone1
9b. If Snapshot2 is not present set parent ID to
SPDK_BLOBID_INVALID and backing bs_dev to zeroes_dev
10. Sync MD on Clone1
11. Sync MD on Snapshot1
12. Restore MD flags for Clone1 and Snapshot1
13. Unfreeze I/O on Clone1
14. Close Clone1 blob
15. Remove Snapshot1
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I800724b981af894e01e1912d0077c5b34a2ae634
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445576
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Report issue on ubuntu18 :
"spdk/autobuild.sh: line 55: hash: scan-build: not found"
Check that ubuntu18 should install this package:
apt-get install -y clang-tools, to fit version of ubuntu18
and later.
Move clang-analyzer which for fedora to vm_setup.sh as well.
Change-Id: Ia702c492f8b0f64705c7c15ee57a861ca14521f9
signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457554
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
SQSIZE parameter validation in Connect command was broken because QID
field in qpair was used before intialization.
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I8a0b359937d661df3b9888e6084e7d0b4a9056ea
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455667
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
In a test case of op_login_session_normal_test(), it is expected that
the tag of the session has any value different from the connection but
the tag of the session was not initialized.
Fixes#826
Reported-by: lorneli <lorneli@163.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I62f7a4bd301c5a74ad6ba10b1b448189f750b324
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458339
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Lorne Li <lorneli@163.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This patch changes the meaning of the data_len parameter of
spdk_dif_set_md_interleave_iovs from `Expected data length of the payload`
to `Expected length of the newly read data in the extended LBA payload`.
This change will align the parameters of spdk_dif_set_md_intereleave_iovs
to of spdk_dif_generate_stream.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7f9c45e78be977625713acb79d2ae82d4375f419
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457543
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>
Previously RPC returned just number of cases that failed,
meanwhile return from the command was 0.
Now whenever there are failures, error is reported via RPC.
This will allow to use it in bash scripts with set -e used.
Change-Id: I34997dd5f08b561bc55f391287f9942861bda57a
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457614
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
There are some leaks in libiscsi that is external to SPDK.
With this patch, any leaks in libiscsi will be suppressed.
Please see examples of the leaks right now when running
bdevperf in initiator.sh test:
Direct leak of 176 byte(s) in 1 object(s) allocated from:
#0 0x7fd64dddfe50 in calloc (/lib64/libasan.so.5+0xeee50)
#1 0x7fd64c60edb4 in scsi_cdb_inquiry (/usr/lib64/iscsi/libiscsi.so.8+0x13db4)
Indirect leak of 256 byte(s) in 1 object(s) allocated from:
#0 0x7fd64dddfe50 in calloc (/lib64/libasan.so.5+0xeee50)
#1 0x7fd64c603a84 (/usr/lib64/iscsi/libiscsi.so.8+0x8a84)
Indirect leak of 52 byte(s) in 1 object(s) allocated from:
#0 0x7fd64dddfe50 in calloc (/lib64/libasan.so.5+0xeee50)
#1 0x7fd64c60d755 in scsi_malloc (/usr/lib64/iscsi/libiscsi.so.8+0x12755)
#2 0x7fd64c6097f8 (/usr/lib64/iscsi/libiscsi.so.8+0xe7f8)
Change-Id: I80ef23b1464841f683344c7aab99f1658a46cd36
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456766
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
ASAN needs to be LD_PRELOADed before SPDK fio_plugin
in order to analyze its code.
Just adding that will report any issues in fio binary as
well as the fio_plugin.
To prevent known fio leaks from affecting the results,
a suppression list for LeakSanitizer (used in conjunction with ASAN).
At this time the suppression list contains known leaks
for fio 3.3. The list might need adjustments as fio
version is updated.
Side note. Even though it is possible to specify directory
to ignore ("leak:/usr/src/fio/"). Which in theory should
suppress any leaks in fio. It has side effect of hiding
SPDK leaks as well, since the fio_plugins leaks are
seen as coming from /usr/src/fio/ioengines.c.
See below for examples of each suppressed error:
Direct leak of 42 byte(s) in 4 object(s) allocated from:
#0 0x7f9d52f3e320 in strdup (/lib64/libasan.so.5+0x3b320)
#1 0x41f267 in get_new_job /usr/src/fio/init.c:490
Direct leak of 914936 byte(s) in 10397 object(s) allocated from:
#0 0x7f74422e8ea6 in __interceptor_calloc (/lib64/libasan.so.5+0x10dea6)
#1 0x46402e in log_io_piece /usr/src/fio/iolog.c:214
Direct leak of 608 byte(s) in 19 object(s) allocated from:
#0 0x7f74422e8ca8 in __interceptor_malloc (/lib64/libasan.so.5+0x10dca8)
#1 0x44c4e1 in add_to_dump_list /usr/src/fio/parse.c:1039
#2 0x44c4e1 in parse_option /usr/src/fio/parse.c:1098
Direct leak of 173 byte(s) in 20 object(s) allocated from:
#0 0x7f744227153d in strdup (/lib64/libasan.so.5+0x9653d)
#1 0x44b50d in __handle_option /usr/src/fio/parse.c:718
Indirect leak of 111925528 byte(s) in 1271881 object(s) allocated from:
#0 0x7f74422e8ea6 in __interceptor_calloc (/lib64/libasan.so.5+0x10dea6)
#1 0x46402e in log_io_piece /usr/src/fio/iolog.c:214
Indirect leak of 171 byte(s) in 19 object(s) allocated from:
#0 0x7f744227153d in strdup (/lib64/libasan.so.5+0x9653d)
#1 0x44c4ed in add_to_dump_list /usr/src/fio/parse.c:1040
#2 0x44c4ed in parse_option /usr/src/fio/parse.c:1098
Indirect leak of 167 byte(s) in 19 object(s) allocated from:
#0 0x7f744227153d in strdup (/lib64/libasan.so.5+0x9653d)
#1 0x44c502 in add_to_dump_list /usr/src/fio/parse.c:1042
#2 0x44c502 in parse_option /usr/src/fio/parse.c:1098
Change-Id: I9b5811993508421be50b12af160645c77ea93d7e
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456315
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The lvol "tasting" done as a part of bdev examine is
done asynchronously in background, so we need to sleep
for a while before checking the list of created lvol
bdevs.
Fixes#801
Change-Id: Iab94ac5c66d329cd93955b53262fc03c6b3c9f3a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458228
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Make it able to run as standalone.
Change-Id: Ib8d5dcd300911978f3bd9192c00049a3617438f4
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457961
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>
Scripts were using a mix of two approaches, lets unify that so
just dollar-parenthesis syntax is used.
Change-Id: Id093b6c82d1f766ba6af13bed720977eceaa7ffc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457744
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This patch adds the UT regarding below function
iscsi_op_login_session_normal()
It covers the target related, connection related
and session related operations.
Change-Id: I570df82df850a0b359b2d57b4e1694d8cb16de37
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457925
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>
stay the print parameter same with it in the deallocate_complete().
Change-Id: I21734f2b3097fd3a1006e390ab87b0578f0cbc2a
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458029
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Partprobe is a program that informs the operating system kernel
of partition table changes, by requesting that the operating system
re-read the partition table. For instance, if you create a new
partition on one of your disks using parted, you should run
partprobe afterwards to make the kernel aware of the new partition
configuration.
This is useful for issue #799.And it's compatible with other systems.
Change-Id: Icd4c85193bd9d9e6c2b32b8463e75c7a6ff06f34
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457735
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
NVMe bdev module support separate metadata now but NVMf subsystem
cannot process bdev with separate metadata yet.
Hence reject any bdev with separate metadata to be attached
explicitly by this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I793c6c5f61deb766d7bf427ff67ccc57a48974cf
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457167
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Those tests are absolutely awful. For the last few days
they've been randomly failing way more often than usual
and we have no way of figuring out what the root cause is.
We know it's 'discover_bdevs' that hangs, but since it
doesn't produce any output (all redirected to null), we
can't get any relevant information out of it. The only
way to move forward is to rewrite this entire test from
scratch.
Change-Id: Ie874110008f82f3ca0dd62f733b0dac73160fbb8
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457766
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
We used `set +e` before bdev deletion RPCs and
`wait $fio_pid`. Disabling errors from those RPCs
doesn't make sense. We expect FIO to fail due to
bdev hotremoval, but the bdev hotremoval itself
must succeed.
Besides, it's easy to forget to undo `set +e` so
don't use it. For `wait` we can use the following
paradigm instead:
```
rc=0
wait $pid || rc=$?
```
Change-Id: I8716bd861eae85d7a8590d4bd26a65cfa10e0dc1
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457469
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
For reservation feature in NVMoF, we can't support the persist through
power loss feature, now we will add the configuration file parameter
with Namespace, after users set the configuration file parameter with
one NS, then the PTPL feature can be enabled.
Change-Id: Id72699093f7e68318b9529f7bacc5c9804f7f86b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455905
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This patch uses the change by the last patch to initialize DIF
context in SCSI layer. Besides this patch changes the name of a
parameter from offset to data_offset to clarify the meaning.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I54bf1168ec5959432aa15dae0360c0640138b033
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457541
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Data offset are intended to correspond to DATAO in NVMe/TCP and
Buffer Offset in iSCSI.
Previously for iSCSI, buffer offset had been merged to start block
address, but passing buffer offset separately from start block address
clarifies the logic more.
On the other hand, for NVMe/TCP, passing DATAO separately from start
block address will be critically important because DATAO will bave any
alignment and will be necessary to use for not only reference tag
but also guard computation.
This patch adds data_offset to struct spdk_dif_ctx and adds it to the
parameters of spdk_dif_ctx_init(). ref_tag_offset is also added to struct
spdk_dif_ctx and it is computed by dividing data_offset by data_block_size
and is used to compute reference tag.
The next patch will use this change when getting DIF context in SCSI.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id0e12ca9b1dc75d0589787520feb0c2ee0f844a5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457540
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
DIF UT code had used numerics extensibly for complex DIF insert/strip
UTs. But numerics was error prone and difficult to follow the logic.
Hence this patch changes numerics to variables in DIF insert/strip UTs.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I40cb27167c068855dc5d1eb9e0f36818d39c73fa
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457539
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
data_offset to spdk_dif_generate_stream() was wrong but the function
worked as expected because the wrong data_offset was in the same
data block as the correct data_offset.
But the subsequent patches will refine spdk_dif_generate_stream()
and this bug will cause UT failure. Hence fix the bug up front.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I45f2302deaf377fda0ec5454c61fb463231a39db
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457538
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
It's randomly times out on waitforlisten. See #815
Change-Id: Ib9a75d0a96756810cb25f2a1ddf72bc800ea4b5c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457483
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Read requested range of lba map during relocation
instead whole lba map.
To read partial lba map range single move now has
three states: read, read_lba_map and write.
Free queue and write queue were merged to a single
move queue.
Change-Id: I86839f2286d42d4debf87cea40091370e5283b15
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454747
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Keep track of read lba map segments to avoid
unnecessary traffic in case ANM events.
Lba map is divided on 4KB segments which can
store 512 lba entries.
In case multipe read request on same segment
keep pending request list and process it in
read_lba_map() completion callback.
Change-Id: I2661bdb716ab7c975140e0b37aebcb17aa23901d
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453371
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>
This is to solve below issue:
error 'Fio job '\''/migration-tc1.job'\'' does not exist'
Change-Id: I60dc6254d238878b03c5faf341b3201643286dfe
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457453
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>
This doesn't make difference right now, but would be
useful if we printed $BASH_SOURCE or $LINENO in xtrace
(via PS4). Those two will now point to the original
line where xtrace_restore was called rather than
always the single line inside autotest_common.sh.
Change-Id: Idf3ac8d00ad9610960678351014334013149b88d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456964
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>
Moving verifying test parameters to single function function.
This is start of series that will add RPC to start bdevperf tests,
allowing configuration beforehand.
In future verify_test_params() will be used to verify parameters
passed via RPC as well.
Change-Id: I0aff7d9fa9f99205b3559b0ea081aa3690013faa
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457223
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>
For the nvme device, I/Os are completed asynchronously. So we
need to check the outstanding I/Os before putting IO channel
when we hot remove the device. We should be sure that all the
I/Os have been completed when we change the sgroup->state to
PAUSED, so that we can update the subsystem.
Fix#615#755
Change-Id: I0f727a7bd0734fa9be1193e1f574892ab3e68b55
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452038
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
We're about to make SPDK vhost work against the upstream
rte_vhost from DPDK 19.05+ and vhost-nvme tests currently
stay in the way. vhost-nvme is only supported in our
modified rte_vhost fork and while it could be implemented
entirely in SPDK against the latest upstream rte_vhost
APIs, there are just no plans to do that now.
For that reason we disable all vhost-nvme tests.
Change-Id: I2d43bbe75dcab7535e7b1254ca75cb78b6d446fa
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456960
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Allow the user to select target bdev to be used by bdevperf. It's useful
when the config contains multiple bdevs, but only one is supposed to be
utilized by bdevperf directly.
Change-Id: I51aa645dcf60a4413057d86f68fe24442b280367
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456787
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>