Commit Graph

9298 Commits

Author SHA1 Message Date
Chunyang Hui
8522624d03 opal: Add multiuser support
Admin can enable user and add user to locking range.
Then the user can lock/unlock his range.

Change-Id: Ifc5a8cf5c6b5febeb59c86333981f0cf5b938500
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460891
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>
2019-07-22 04:32:59 +00:00
Chunyang Hui
63133871d2 opal: Set terminal attribute for secure input
Previously we use getpass. But it looks like this
is obsolete, this patch is to fix this.

Change-Id: If3b667cea8e09aab170bfdb75b8d51e6855bb0b0
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461151
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>
2019-07-22 04:32:59 +00:00
Changpeng Liu
e27421b344 nvme: fix req leaks
There are many req leaks when a controller failure
occurs during submitting IO. It must free all of
the children before freeing the parent req.

If a part of the child req has been sent to the back end
and a part of the child req fails, removes the failed req
from the parent req and the parent req must be retained,
freeing the parent req after all of the submitted reqs return.

Change-Id: Ieb5423fd19c9bb0420f154b3cfc17918c2b80748
Signed-off-by: Huiming Xie <xiehuiming@huawei.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461734
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>
2019-07-22 04:15:34 +00:00
Changpeng Liu
c4f7c1bc2a nvme: put child I/O helper functions in nvme_internal.h
Existing children split functions defined in nvme_ns_cmd.c can
also be used in nvme_qpair.c to free children requests with error
paths.

Change-Id: I640b32884424709da67ee89ff780c2de45acc54c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461372
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-22 04:15:13 +00:00
Vitaliy Mysak
9fd7f2196b spdkcli: handle BrokenPipeError
Catch BrokenPipeError to display meaningful error message.

Withouth this change, user gets stacktrace
  when e.g. SPDK application was closed.

Change-Id: Ia7d8edb92a70b4c4b9e71a7d4ce38e265769936a
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461571
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-22 03:41:00 +00:00
Ziye Yang
9375616ae2 nvmf/tcp: code cleanup
move the staement location of TCP request setting and remove
the duplicated code.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia659756185547ff4f8aa26c5bc01f63defe6c113
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462589
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>
2019-07-22 02:40:35 +00:00
Vitaliy Mysak
6ef78fe661 spdkcli: handle intialiazation error
Catch exceptions during RPC client initialization
  to display meaningful error message.

Withouth this change, user gets stacktrace
  when e.g. SPDK application is not running.

Before:
```
Traceback (most recent call last):
  File "scripts/rpc/client.py", line 53, in __init__
    raise socket.error("Unix socket '%s' does not exist" % addr)
OSError: Unix socket '/var/tmp/spdk.sock' does not exist

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "scripts/spdkcli.py", line 74, in <module>
    main()
  File "scripts/spdkcli.py", line 47, in main
    with rpc.client.JSONRPCClient(args.socket) as client:
  File "scripts/rpc/client.py", line 56, in __init__
    "Error details: %s" % (addr, ex))
rpc.client.JSONRPCException: Error while connecting to /var/tmp/spdk.sock
Error details: Unix socket '/var/tmp/spdk.sock' does not exist
```

After:
```
Error while connecting to /var/tmp/spdk.sock
Error details: Unix socket '/var/tmp/spdk.sock' does not exist. SPDK not running?
```

Change-Id: I65862965b68acf3bd4709de598f04de49da27de2
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462020
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-22 02:24:11 +00:00
Vitaliy Mysak
9b81498be8 rpc.py: check if port is None during client init
RPC client constructor accepts optional port,
  but does not check if it's None in case of
  remote connection.
This patch adds the check and new error message
  related to it.

Case where port is unexpectedly None
  can be reproduced by starting spdkcli
  when SPDK socket does not exist.

Change-Id: I46e0b99547204c6fdeac421e5de9d6991387e207
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460974
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-22 02:24:11 +00:00
Pawel Kaminski
a15dcb0bf0 jsonrpc: always allocate response for request
We already have send buffer allocated. This will greatly improving code
as we guarantee by design that there is always JSON write context
object.

Change-Id: Id487c01448e1a65d9d4ef76d40a2a9f178b2f570
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/+/459341
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>
2019-07-19 20:56:54 +00:00
Ziye Yang
6ad6a1131b nvmf/tcp: Add a feature to allow set the sock priority of the connection.
This priority is used to differentiate the sock priority on the TCP connections
between  NVMe-oF TCP target and other TCP based applications.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I6ee294e647420b56d1d91a07c2e37bf34ce24e03
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461801
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>
2019-07-19 06:30:19 +00:00
Tianyu Yang
96b759297f lib/bdev: fix coredump when bdev initialize failed.
If subsystem bdev module initialize failed, it will call
spdk_bdev_init_complete(-1) -> (subsystem bdev)->fini
_spdk_bdev_finish_unregister_bdevs_iter -> spdk_bdev_module_finish_iter

In abovt path, spdk_bdev_module_finish_iter will repeate to call
bdev_module->module_fini function. Some bdevs will call spdk_io_device_unregister
which never call spdk_io_device_register. It will coredump when assert false in
spdk_io_device_unregister dev is null.

To fix this, let's check whether g_bdev_mgr.module_init_complete is equals true
and then call the bdev_module->module_fini.

Change-Id: Ia9a13318720d954e40eb2d666574bcb86e5f49e3
Signed-off-by: Tianyu Yang <yangtianyu2@huawei.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462382
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-19 06:29:25 +00:00
Karol Latecki
ac8b488982 bdev/rbd: add more descriptive rpc error messages
Improve error messages where possible.
Modify spdk_bdev_rbd_create() to return instead instead
of pointer for better return code handling.

Change-Id: I5fcf90794f5fe44296422c654c5f8d404f3d5eef
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461884
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>
2019-07-19 02:21:53 +00:00
Tomasz Zawadzki
a2664e7491 example/nvme_manage: change ranges to correct type on scanf()
scanf format specification '%ld' expects type 'long int *' for 'd',
but parameter 2 had a different type 'uint64_t*'.
Changed to SCNu64 to reflect the type for range_length and range_start.

Change-Id: I1637b2f7e982a33b45bc765a3e16f7f1302d84cb
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462481
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>
2019-07-19 01:34:28 +00:00
Mateusz Kozlowski
3500d9a98d lib/ftl: Add error log after IO failure
Adding some extra debug information for any failing IOs.

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: If38de30bcb80d291778ad7325a33b7786d02390d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461588
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-18 08:49:02 +00:00
Shuhei Matsumoto
6b92b21d21 CHANGELOG: NVMe-oF initiator can transfer I/O whose size is more than 128KiB
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I14b64ae265c6e387891cfdf220e97eaacc6dfab7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462367
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>
2019-07-18 08:47:42 +00:00
Shuhei Matsumoto
f84744e9d0 CHANGELOG: update for DIF feature
In SPDK 19.07, DIF insert and strip is supported for TCP transport of NVMe-oF
target, and  DIF reference tag remap is now supported for partitioned virtual
bdev modules.

This patch updates CHANGELOG to reflect these updates.

If summarizing shortly,

DIF insert/strip is supported in the NVMe/TCP target. User can choose
DIF insert/strip or pass-through based on the use case. DIF reference tag
remapping is supported in partition type virtual bdevs.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I452ccb60713928087e90bae0cfbf3393dfd61be7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462368
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>
2019-07-18 08:47:42 +00:00
Karol Latecki
89003d5ca7 bdev/rpc: add more descriptive rpc error messages
Improve error messages where possible.

Change-Id: I6e5a50a1422f55aff0b0bad53493edc80f345ccb
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461600
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>
2019-07-18 07:52:07 +00:00
Karol Latecki
6d442665fd bdev/rpc: remove if checks for obligatory rpc arguments
These arguments are obligatory and spdk_json_decode_object will
fail even before we reach the if block.

Change-Id: I3c17faf570aefc7d96d009a595cf3a76994977e7
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462043
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>
2019-07-18 07:52:07 +00:00
Karol Latecki
46ebf1b1e9 bdev/virtio: add more descriptive rpc error messages
Improve error messages where possible.

Change-Id: I68b48fd448636412a2b26241c787e7b7826c9a34
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461873
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>
2019-07-18 05:34:52 +00:00
Ben Walker
8f44d126b4 test/vhost: Group all vhost generated files into a single directory
Change-Id: I12b23363a6bc954eabd7cbde510a8a44b176fbd2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461385
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-18 05:31:13 +00:00
Vitaliy Mysak
0d33baa14c test/spdkcli: test start_subsystem_init command
Add an invocation of `start_subsystem_init` method of spdkcli to iscsi test.
This method is one of few that left untested in spdkcli.

iscsi test had to be changed a bit because `start_subsystem_init` requires
  spdk to be started with `--wait-for-rpc`.

This patch is related to trello task:
https://trello.com/c/CHOOxcGj/151-spdkcli-extend-test-coverage

Change-Id: I4f49f2ce499ef849d4d41a391844f5947c1b133d
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462213
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>
2019-07-18 05:29:00 +00:00
Vitaliy Mysak
60bf34d1f0 scripts/rpc: change default value from None to {}
JSONRPCClient.call recieved optional `params` value,
  but then `params` was used in `json.dumps` function (line #159)
  as a dictionary, so `None` was treated as dictionary
  in some cases, which resulted in TypeError.

This patch fixes above issue by changing
  the default value from `None` to `{}`.

Change-Id: I27ca0ccc2d970c0ff9e8117f02203c03e417adf0
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462070
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>
2019-07-18 05:29:00 +00:00
Karol Latecki
2805cad12f bdev/compress: add more descriptive rpc error messages
Improve error messages where possible.
Modify parts of the code so that it follows the same pattern
as in previousle changed bdev modules.

Change-Id: I6672a14900326029c670bfca99a6d085093861c3
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461553
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-18 04:25:44 +00:00
Karol Latecki
695ecf48bf bdev/delay: update rpc error messages
Consolidate rpc error handling with previous bdev rpc
changes.

Change-Id: I3f0ac3b3a0f09869e8ad7edb4bd4c8fd1e42f6b6
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461557
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-18 04:25:40 +00:00
Karol Latecki
b8c84b1a39 bdev/error: add more descriptive rpc error messages
Improve error messages where possible.

Change-Id: Ieaae6f2477d4a9f636cc861afbe5d80b3c74a46c
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461562
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: Vitaliy Mysak <vitaliy.mysak@intel.com>
2019-07-18 04:25:27 +00:00
Karol Latecki
955518d6fc bdev/iscsi: add more descriptive rpc error messages
Improve error messages where possible.

Change-Id: If08bad9f4fc88b51403b89c3f5bfc8894ef4300a
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461567
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-18 04:25:09 +00:00
Karol Latecki
c6f2b30918 bdev/raid: add more descriptive rpc error messages
Improve error messages where possible.
Unify returned error codes and messages with previous
changes done in other bdev modules.

Change-Id: Id35b61e8157fab9940e5811b71289978a6f23b05
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461591
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-18 04:24:45 +00:00
Darek Stojaczyk
fa3e0a68c1 ut: move all spdk_env_* mocks to test_env.c
Cleanup.

Change-Id: If6c24ef6fcea5531007e6d4f10ee896939ffaa12
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460906
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>
2019-07-18 04:21:08 +00:00
Seth Howell
266ca94013 Revert "shared_lib: add as_needed to the libspdk.so linker script"
This reverts commit 346fefc364.
That commit breaks the shared object build when linking against the
implicit top level linker script. It makes it so that none of the
constructor functions get properly linked in.

Change-Id: I3477acbd86f44b6d5e949eb6725ca4c1b71a55b5
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462149
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>
2019-07-18 04:12:05 +00:00
Seth Howell
4edb785f49 test/nvmf: add || true to kill commands.
In the RDMA transport, the initiator doesn't properly pick up the lost
connection and we have to kill it. However for TCP, the initiator
realizes the closed socket and fails out. Then when we go to kill it, it
fails the test. So add and || true when killing the perf processes.

Change-Id: Ifed5d726946bad2e9396db40b40f1fee72b4597f
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461993
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>
2019-07-18 04:10:52 +00:00
Ziye Yang
ecb4ea90ce sock: Add the socket priority setting function.
Purpose: This API can be used to set the socket
with different priority.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I9df1122bf6ae640eba731e635a1784f4e9da4104
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461738
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>
2019-07-18 04:09:37 +00:00
Seth Howell
ae679483d6 test: add autofuzz.sh script family
These scripts are intended to be run as part of a standalone automated
jenkins fuzz testing job. hey are intentionally set to run for
approximately 20 minutes at a time.

Change-Id: I861e01abf8b86a7531111119655f487f8d982200
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462006
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>
2019-07-18 04:08:48 +00:00
Seth Howell
cf7bce72ae test/nvmf: add -o when creating tcp transports.
Kernel versions 5.0.x do not support the -o option from our target.
Currently, kernel versions 5.1.x and 5.2.x are broken for the tcp
transport in loopback, so in order to test against a stock fedora kernel
that works, we will need to use 5.0.x for at least the next few months
until the distributions start shipping 5.3.x which contains the fix we
need.

Change-Id: I41fc5956dd4b53f03879e0adf2427872cd2337ee
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461741
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: Changpeng Liu <changpeng.liu@intel.com>
2019-07-18 04:06:25 +00:00
Seth Howell
015ef22a8a test/nvmf: add NVMF_TRANSPORT_OPTS global
For a lot of the tests, we may want to specify different options for
each transport. I believe this will be more prevalent as we add more
transport specific options.

Change-Id: I83a915629460d1d869eaba4bc86822d7563402ac
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461740
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>
2019-07-18 04:06:25 +00:00
Wojciech Malikowski
1d717c7cd9 test/vmd: Basic VMD tests
Added basic tests for NVMe disks behind VMD.

Change-Id: I9613ca4aa813bab16f4085ac809dbdc8028f1cfc
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459639
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>
2019-07-18 03:52:37 +00:00
Karol Latecki
fd4d7fcb15 bdev/passthru: add more descriptive rpc error messages
Improve error messages where possible.

Change-Id: I778b4b49c1e54c0da77f6da7906df91d8aa95f9b
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461587
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-07-18 03:25:06 +00:00
Karol Latecki
c05355db23 bdev/lvol: add more descriptive rpc error messages
Improve error messages where possible.

Change-Id: I8f736fb6481d65b55e16e548fac0130cd152d3fa
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461575
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>
2019-07-18 03:24:26 +00:00
Karol Latecki
0965d63d3a bdev/lvol: remove optional flag for lvol_name in construct call
lvol_name is not an optional argument when creating a lvol bdev.
Also removing unnecessary if block.

Change-Id: I7d5790d648bce7f02bfed34bd714162d3ccb10ab
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461861
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>
2019-07-18 03:24:26 +00:00
Karol Latecki
75711828a9 bdev/lvol: remove if checks for obligatory rpc arguments
These arguments are obligatory and spdk_json_decode_object will
fail even before we reach the if block.

Change-Id: I295649629770ef062086308257da83a8bab44588
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461860
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>
2019-07-18 03:24:26 +00:00
paul luse
a755fb5f14 lib/reduce: use global zero buffer instead of zeroing scratch buffer
Eliminates need for memset on parts of our scratch buffer

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I00b7213d3c15562ceeda4d7a3ac2bb7cfd41bf66
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460010
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>
2019-07-18 03:21:59 +00:00
Maciej Szwed
074fa32636 scripts: Fix setup.sh to take into consideration other namespaces
Currently we do not switch driver for NVMe that is mounted.
The problem is that we take into consideration only the
first namespace, but any other namespace can be still mounted.
In such case we should not switch driver.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Idd13edccd0929574f2914a71e841e67871dd2e9f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457762
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-18 03:18:13 +00:00
Vitaliy Mysak
a8a53c7c4b test/spdkcli: dont use -v flag for app/match
app/match/match with -v flag prints content of the files
  even if match is successful. Such output is usually big
  and not useful, so it is better to print content only
  for failed cases.
This patch removes -v flag for match program
  to achieve described desired behaviour.

Change-Id: I3e2f24e35f5fa3aeead2e3945a44053bc9ff3240
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462023
Reviewed-by: Karol Latecki <karol.latecki@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>
2019-07-18 02:17:53 +00:00
Ziye Yang
4739f62365 nvmf: enable transport based scheduler decode in RPC.
Purpose: To eanble the transport based scheduler in RPC.
Previously, we only support it with configuration file.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I02ae9b1b316d4fec8b28b550e70dcdc78ce78722
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461645
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>
2019-07-17 15:01:20 +00:00
Maciej Wawryk
0abee610f0 test/setup: check open files limit
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I0826c93934025a5ec7126f0f6223d42177054f06
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462010
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>
2019-07-17 09:20:11 +00:00
Tomasz Zawadzki
45dd91af39 example/perf: remove unused HAVE_URING CFLAG
This patch removes HAVE_URING CFLAG that was unused by
the perf.c

Change-Id: I8af85324db147989e0d3b9bd48faa9587c23be06
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461592
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>
2019-07-17 05:09:16 +00:00
John Kariuki
4af44c234f nvme/perf: add bdevperf
Adding capability to use bdevperf to this script. We
need to use bdevperf to demonstrate performance of up
to 10 million IOPS per core. fio overhead limits that
number to less than 3 million IOPS/core.

Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Change-Id: Iad81fc73a961b05e168befbed01bf800b9888564
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459695
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-17 04:36:18 +00:00
Vitaliy Mysak
ed486dc4ef test/spdkcli: test lvol_stores show_details method
Add a match test for lvol_stores show_details methods.
This method is one of few ones that left untested in spdkcli.

Change-Id: I86197dace4cb40b108f61a138be01f095a38e97a
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461558
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>
2019-07-17 04:33:03 +00:00
Darek Stojaczyk
218f53b115 test/nvmf: remove shebang from the common file
The file is not meant to be executed, so shebang is
not needed - let's remove it.

Change-Id: I51c32613ffb25b43a2d1b96523a8f25c853594e4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461355
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>
2019-07-17 04:25:37 +00:00
Darek Stojaczyk
96ec8bff78 nvmf/rdma: switch to spdk_*malloc()
spdk_dma_*malloc() is about to be deprecated.

Change-Id: I5bcac50baca785255eb068086e67c07d120b042f
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459432
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-17 01:28:57 +00:00
Darek Stojaczyk
36ccca2c08 nvmf/tcp: switch to spdk_*malloc()
spdk_dma_*malloc() is about to be deprecated.

Change-Id: Ic42db528bbae4b3ca2e91cb9ac46def99ecb5f28
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459431
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-07-17 01:28:57 +00:00