Commit Graph

10919 Commits

Author SHA1 Message Date
Wojciech Malikowski
7083fa3e35 lib/ftl: Remove group from ftl physical address
ftl_ppa address do not need to expose group
information when FTL will move to zones API.

Change-Id: Iece1b32f9bcd8985260668c953089eb9951f13cc
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467603
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-10 08:42:51 +00:00
GangCao
70db9e5cb9 bdev/nvme: allow the nvme opts set when no nvme bdev configured
In the case that there is no NVMe bdev configured and RPC is
running, it shall still allow the NVMe options set. Once there
is one NVMe bdev configured, it will not allow the NVMe options
set.

Change-Id: Ib6a527174137a5d4df7babe206d2527e600500c0
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479489
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>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-08 15:47:30 +00:00
Ben Walker
d31eb732af nvmf/tcp: Allocate pdu pool out of hugepages
It is faster for the kernel to pin memory in hugepages, so allocate
the pdu pool from hugepages. This will help more
with upcoming changes to leverage MSG_ZEROCOPY.

Change-Id: I9ce581acca9c6edb71bd8119258966e3b405db77
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475801
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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: Or Gerlitz <gerlitz.or@gmail.com>
2020-01-08 15:47:08 +00:00
Ben Walker
053fa66b10 nvmf/tcp: Minimize the places where the tqpair state changes
All transitions to the EXITING state go through the disconnect function
now

Change-Id: Ia55816351b2998bfef26130b6ffdc4a1010567a1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470533
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-08 15:47:08 +00:00
Ben Walker
04a4aab2e0 nvmf/tcp: Simplify handling of spdk_nvmf_tcp_pdu_get failures
This function can't actually return NULL. It aborts if we get
our math wrong.

Change-Id: Iaf77112addc3c14c70755a56043c5dba3427890d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478911
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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-01-08 15:47:08 +00:00
Seth Howell
75aaaa6bd9 autobuild: move build_doc under run_test.
Change-Id: I3808305681df2da7faf215a88045949e6a1a0b4d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478551
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 15:46:18 +00:00
Seth Howell
a15440b5ec autobuild: move make install under run_test
Change-Id: I0dcbbb05e90da8ad3760e68f5316ebc139bb03f8
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478550
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 15:46:18 +00:00
Seth Howell
a74675deb5 autobuild: reorganize prework for script.
Change-Id: I83edd918a34cfad60658c55fb33882339a2199a5
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478549
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-08 15:46:18 +00:00
Seth Howell
3f1902ef57 autobuild: move header dep check under run_test
Change-Id: Ia98d34e2d4083f1fee22076cd3367b17af08e125
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478548
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 15:46:18 +00:00
Seth Howell
ab47796eca autobuild: move porcelain check under run_test
Change-Id: I1731e7806b1bf380656b78c1b0fd51711fe3cc68
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478547
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 15:46:18 +00:00
Seth Howell
ee156e0a11 autobuild: move so deps script under run_test
Change-Id: I212f4dc806e66b23fcaace2342a63dc0f029a27b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478546
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-08 15:46:18 +00:00
Seth Howell
8e90ee663f autobuild.sh: move make under run_test.
Change-Id: Iaba2303e34a57aeb6beeafe6e33ea2cb345fc129
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478545
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 15:46:18 +00:00
Seth Howell
06070794b6 autobuild: move ocf_precompile under run_test.
Change-Id: I04caa5d24f6cddecc2a963de8c4fc7d0ad3bf470
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478544
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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-01-08 15:46:18 +00:00
Seth Howell
c29666a19c autobuild.sh: make basic functions use run_test.
run_test already calls report_test_completion so where we were calling
report_test_completion, we can now just echo out that we are using
valgrind or the other tools and run_test will take care of the rest.

Change-Id: I24bef432599fe7e8deaa1011ccff0140d36dc731
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478543
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@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-01-08 15:46:18 +00:00
Seth Howell
39fe5c849b autotest_common: fix xtrace_restore_enable
My previous patch enabling this to be called recursively didn't
take into account that a single call to xtrace_restore would
override multiple levels of xtrace_disable nesting. This change fixes
that.

fixes: 190b2245c5

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2167ba460e68223c9426b3d71e9c17019f947924
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478959
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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>
2020-01-08 15:46:18 +00:00
Seth Howell
fd73cb78d8 check_format: add SC2015 to SHCK_EXCLUDE list.
This shellcheck case warns users when they use the pattern A && B || C
so that they don't accidentally try to use it as an if-then-else
statement. However, there is a valid way of using this pattern to
denote, do A, if it succeeds, do B, if either A or B fails, do C.

Change-Id: I283b433c15d07873befd182e8327f2e0602490aa
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476960
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-08 15:46:18 +00:00
Seth Howell
64569ea5e5 test: differentiate between different nvmf transports.
We have to do this explicitly so that the list of completed tests that
comes out at the end is explicit as well.

Change-Id: Ic89357f2ebd89ea80f00010a78b2a2ad05b22591
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476963
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-08 15:46:18 +00:00
Shuhei Matsumoto
71600c57b3 bdevperf: Add struct spdk_bdevperf and allocate its global instance
Add struct spdk_bdevperf and include header of io_target_group list
in it, and then allocate its global instance g_bdevperf statically.
Rename g_head by groups for clarification.

The next patch will register g_bdevperf as SPDK IO device and
allocate io_target_group as context of the corresponding IO channel.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6755ce8cc05b00cbc0d5dc7983ec01fe3483f4cf
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478779
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-01-08 09:12:35 +00:00
Shuhei Matsumoto
679f6d6e3c bdevperf: bdevperf_fini() and rpc_perform_tests_cb() refer g_run_rc directly
Remove a parameter from bdevperf_fini() and rpc_perform_tests_cb()
and they refer g_run_rc directly.  This is a preparation to the next
patch to avoid introducing any dynamically allocated context.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I42f1c7e8bc662799b3fcbf2769139174bb527314
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478834
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 09:12:35 +00:00
Shuhei Matsumoto
ceaee98aa9 bdevperf: Extract and inline bdevperf_free_targets() into bdevperf_test_done()
We don't have ordering constraint between bdevperf_free_targets()
and sending RPC response. So extract bdevperf_free_targets() from
bdevperf_fini() and rpc_perform_tests_cb() and inline it into
bdevperf_test_done(). As a result of this change, bdevperf_fini()
calls just spdk_app_stop(), but is still necessary in the subsequent
patches. So keep bdevperf_fini().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie8ed2d04db754b8a265296932f73d3a602d1f90b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479373
Reviewed-by: Changpeng Liu <changpeng.liu@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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 09:12:35 +00:00
Shuhei Matsumoto
411f1c90c6 bdevperf: Factor out finish operation of command line and RPC invocation
Factor out test finish operation of command line invocation case and
RPC invocation case.  Then apply the new funciton bdevperf_test_done()
to all calls bdevperf_fini() or rpc_perform_tests_cb().

The purpose of this refactoring is as follows:
- Consolidating finish operation improves code readability and
  maintainability, and may enable further improvement in future.
- The next patch will consolidate bdevperf_free_targets() from
  bdevperf_fini() and rpc_perform_tests_cb() into bdevperf_test_done().
  This refactoring is a preparation.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I06801541e4c4ed28774debad56d901dbeb5a9193
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479372
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 09:12:35 +00:00
Shuhei Matsumoto
95754cd170 bdevperf: Reorder state checks in spdk_bdevperf_shutdown_cb()
io_target_group manages io_targets, and hence checking g_head
should be done earlier than checking g_target_count.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I112018d8f487b387ae5f4f444a342be2c8da167d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479350
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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: Paul Luse <paul.e.luse@intel.com>
2020-01-08 09:12:35 +00:00
dongx.yi
f7e8827aa6 nvmf/tcp: Using spdk_min instead of multi-lines codes.
We can use spdk_min to get the copy_len in spdk_nvmf_tcp_send_c2h_term_req.
It confirms copy_len it's not larger than SPDK_NVME_TCP_TERM_REQ_ERROR_DATA_MAX_SIZE

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: Id343928e1911e4ab77fca7463f3f0cc55889db30
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479118
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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: Ben Walker <benjamin.walker@intel.com>
2020-01-08 09:12:20 +00:00
dongx.yi
1044fe25e6 test/unit: Add set_host_id_cmds to unittest.
This function was ignored and a little different from others.
Add this to increase code coverage rate.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: I35b51feb8894aca54a3b21436bc21ec12e37adf7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475814
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-08 09:12:10 +00:00
Maciej Szwed
80da95481b unit/bdev: Rename stub_submit_request_aligned_buffer
Rename stub_submit_request_aligned_buffer function
to stub_submit_request_get_buf and its callback function
to stub_submit_request_get_buf_cb.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ie8cde43d30c5aa2d353bb33b023d5318948bee44

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478944
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:31:32 +00:00
Maciej Szwed
8ce615e4ee bdev/nvme: Add bdev_nvme_comparev function
This patch adds support for compare operation in
bdev nvme layer.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Iac54e85af5b377d10124c72e26ed2a4d8f078af4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477457
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-07 12:31:32 +00:00
Maciej Szwed
f76713837e nvme: Add spdk_nvme_ns_supports_compare function
This function returns information if compare
operation is supported by device.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I321e9bf6d146ac8d14ea4549cb4380735b30be6f

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477925
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-07 12:31:32 +00:00
Maciej Szwed
b95de9a3ca nvme: Add SPDK_NVME_NS_COMPARE_SUPPORTED flag
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I24d09cbe21cd2694b4c3433a365dffe75cda2fa8

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477924
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-07 12:31:32 +00:00
Maciej Szwed
f8d024b8c1 bdev: Add support for compare operations
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I45b99abe1ed760aa59785e5c4b4f71917e1f92c3
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477458
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-07 12:31:32 +00:00
Maciej Szwed
c7092e2b3a nvme: Add spdk_nvme_ns_cmd_comparev_with_md function
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I7eb89412673e01d9c84cb258f5152a31253d7a7f

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477025
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-07 12:31:32 +00:00
Maciej Szwed
334aeff9e1 nvme: Don't ring a doorbell for first of fused commands
This patch adds first_fused_submitted field in spdk_nvme_qpair
structure which is used for postponing ringing a doorbell for
fused commands.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ibfc43931891ebaadbafa4895c05af9f228440210

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477024
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-07 12:31:32 +00:00
Tomasz Kulasek
1c5d980300 lib/nvme: add hw support for fused operations
Change-Id: I2a184a2d60f18439947afa2d4855d51b92ed282e
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476137
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-07 12:31:32 +00:00
Seth Howell
8209c8cfa0 lib/nvmf: rdma qpairs now store device, not port.
The only reason the qpair ever uses the port is to get to
the device attributes so skip the middle man.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib14a97ceaa0c49176027d6c35c5cb2787a845cc1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478961
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:21:36 +00:00
dongx.yi
f591667964 virtio: Close fds when abnormal return.
Here should add close(kickfd) and close(callfd) when abnornal
return of failed to send VHOST_USER_SET_VRING_ENABLE.
Do this as the same with upper abnormal return.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: Ic61fc3f398f582f64da6b3f6ca7e237a3d411a8f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479123
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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: Ben Walker <benjamin.walker@intel.com>
2020-01-07 12:21:20 +00:00
Jacek Kalwas
2eda83904b nvmf/ctrlr: abort cmd for set features with save bit set
Features are not saveable by the controller as indicated
by ONCS field of the Identify Controller data.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I7e5bc2c701f5857e2c1481e8370b070089f88111
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479128
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:21:03 +00:00
GangCao
5d541746f3 nvmf: properly cleanup when failing to create subsystem
In the case of using CONF file, if two subsystems are assigned
with same subnqn, it fails at the second subsystem creation,
however the state machine is not set correctly.

The fix here is to properly set the state machine to roll back
the operations and destroy the created subsystem and exit the
application cleanly.

Change-Id: I4356802a12f7a2982485f61a69eceeb979033788
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476904
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-07 12:20:44 +00:00
Ziye Yang
c322751769 nvmf/tcp: Add the sock priority setting in conf file.
We already support in rpc and we also need the support in conf
file.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic0d64c48c21954d913ef7345ce35a767e8e285bd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476186
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-01-07 12:20:20 +00:00
dongx.yi
94f2def65a test/unit: Add nvme_uevent_ut.c to unittest.
Add nvme_uevent_ut.c to unittest, and test parse uevents.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: Id8bb8336790ae5e031b357dc49163d86dfa1cd57
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475080
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-07 12:20:01 +00:00
Tomasz Kulasek
f57842c2ca doc/nvme: using tools with nvme cuse
Change-Id: I4d4733c09a8ce0812c92e9cc91db88d36964cad5
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477919
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:19:33 +00:00
Tomasz Kulasek
dc6d84ccc2 doc/nvme: fix NVMe CUSE device node path
Change-Id: I1601e1985cd24aea283ce3d17ffb8de2fb4a687e
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478952
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:19:33 +00:00
GangCao
be4a5602ce blobfs: write IO directly if it is lba aligned
UT also added for the block aligned write and verification
of the written data.

Change-Id: I8751f437c71dd7f3a4556fee420460d6dffdd4e5
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478424
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:19:14 +00:00
Jacek Kalwas
5df1966375 nvmf/ctrlr: improve debug info
It is useful to have sct and sc on request completion explicitly.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: If429123589694ba36111330699fee22238f8a557
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478602
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-07 12:18:14 +00:00
dongx.yi
3cf37bbfbc vhost: Inline the calculation of vhost session memory region.
There are for loops to do these calculations for vhost session memory region.
we can inline these for both in vhost_session_mem_register and
vhost_session_mem_unregister.

It not only removed the duplicated codes but also reduced the stack consumption.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: Idb9f5ea13e09aef6b24fa27a2bb809b15ece50e2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478820
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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: Ben Walker <benjamin.walker@intel.com>
2020-01-07 12:17:55 +00:00
Vitaliy Mysak
1a5d78e32e iscsi: replace fprintf by SPDK_LOG
Replace usage of fprintf(err, *MSG*) by SPDK_ERRLOG(*MSG*)
since in SPDK we always prefer later

Change-Id: I3e2b5c12caa572b32236f5ede01b754b2e1e2a53
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478940
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:17:19 +00:00
Tomasz Zawadzki
20c74e0c71 lib/blob: do not zero out cluster map for snapshot blob
Always when creating a snapshot, new blob is created.
That blob is explcitly set as thin provisioned with size of
the original blob in _spdk_bs_snapshot_origblob_open_cpl().

Thus it should always contain empty cluster map,
as API user has to interaction with it yet.

As sanity check for debug builds, verification if all clusters
are 0's is added.

This empty cluster map is later swapped into the original blob
in _spdk_bs_snapshot_swap_cluster_maps().

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4b935c0cf08917e9ad7b9bbedac4781890626eec
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478974
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:16:43 +00:00
Tomasz Zawadzki
44502e4293 lib/blob: simplify loading snapshot completion
Refactor blob loading when snapshot is present.
All paths now go through _spdk_blob_load_final().

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ifc927de6800501cdf62dba8d73e950af2a46d568
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479143
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:16:43 +00:00
Tomasz Zawadzki
42432d49dd lib/blob: all error paths on blob load use _spdk_blob_load_final()
Since all error paths for blob load are now the same,
they can go through common function to handle
freeing and calling the original cb.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib3afc7e62b6f9c872bb1d5f72ef61170aee966d7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479142
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:16:43 +00:00
Tomasz Zawadzki
e7b3be98a6 lib/blob: always pass cb_arg on blob load failure
Originally the code was suposed to determine if
loading the blob succeeded, based on passing the
cb_arg.
This breaks the logic of always getting the cb_arg in
cb_fn, and basing the success on bserrno.

In order to fix this, cb_fn always gets the passed
cb_arg. Meanwhile the cb_fn (_spdk_bs_open_blob_cpl(),
now checks the bserrno to determine failure.

In addition since _spdk_bs_open_blob() was the original
caller allocating the blob structure,
the  _spdk_bs_open_blob_cpl() is now responsible for freeing it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic7eb09f05e04b08dc54fc43243fd576f493cbeb2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479141
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:16:43 +00:00
Tomasz Zawadzki
3225f86bc2 lib/blob: save the sequence much earlier into blob load
The sequence was saved into the load context much later
into the loading, instead of right when ctx is allocated.

This will come in handy in later patches that refer to
sequence earlier (in error paths).

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ibe513dbd919f36874fcde763fc96d46973b60446
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479140
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:16:43 +00:00
JinYu
ada795302a nvmf_example: add the acceptor poller
Add acceptor poller to handle all the connections.

Change-Id: I3228547d63a5812b90fe4394641cf124d9e64d12
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468660
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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>
2020-01-07 12:16:05 +00:00