Commit Graph

350 Commits

Author SHA1 Message Date
Daniel Verkamp
f9d52c9ebd lvol: add destroy_lvol_bdev RPC method
This is the first step toward fixing the behavior of the lvol bdev
module so that it handles spdk_bdev_unregister() correctly.

Currently, when an lvol bdev is unregistered, this causes the associated
lvol to be deleted; this isn't the desired behavior, since
spdk_bdev_unregister() is just meant to drop the currently-exposed bdev,
as in a hot-unplug event, not destroy the backing storage.

The current implementation of the new destroy_lvol_bdev method still
calls into the exsting (broken) spdk_bdev_unregister() path, but this at
least lets us fix the existing delete_bdev RPC callers that really
intended to destroy the lvol.

The next step is to make vbdev_lvol_destroy() call spdk_lvol_destroy()
instead of unregistering the bdev, which will require cleanup in the
generic lvol layer to remove the close_only flag.

Change-Id: Ic4cb51305d31f6d7366a82ba7bf7b19ebbcd3e9c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408084
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-24 21:33:56 +00:00
Changpeng Liu
ef4a5bc922 rpc/vhost_nvme: add rpc support for vhost-nvme target
Change-Id: I215bc269dee704e60a167023e2a6c24d3ae1fab0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/395404
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-20 15:24:50 -04:00
GangCao
cb1c88d19f vbdev/passthru: add the construct_passthru_bdev RPC method
Add the RPC method to construct a passthru bdev.

The usage as following:

usage:
rpc.py construct_passthru_bdev [-h] -b BASE_BDEV_NAME -p PASSTHRU_BDEV_NAME

Change-Id: I87bcfde499a9f0c2f5758e36e6772e0fc2928d20
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/406891
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-20 14:58:13 -04:00
Karol Latecki
83795a1600 spdkcli: initial version with bdev management
Initial version for SPDKCli
Possible basic management of:
- Bdevs: malloc, nvme, aio, lvol
	create / delete operations.
- Lvol stores:
	create / delete operations.

Adding dependency to pkgdep.sh.

Change-Id: I1a03d7660dad0335e25734b8ffb90592a5b337c2
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/405039
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2018-04-20 13:25:21 -04:00
GangCao
ffba4fdbc3 bdev/qos: add RPC method to set QoS at runtime
This patch adds a new RPC method to configure QoS on bdev
at runtime.

For example:

set_bdev_qos_limit_iops Malloc0 20000 --> Enable QoS on this
block device with 20000 IOPS rate limiting.

Change-Id: I1ee8b313b769fb5a664820f4ba827e0230be4b5d
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/393255
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-19 13:47:54 -04:00
Daniel Verkamp
3ac5d089dc scripts/rpc.py: use dashes in --long-args
Fix a few inconsistent long argument names that had underscores instead
of dashes.  Python argparse already converts these to underscores in the
names added to the args object.

Change-Id: I547c58b7066f28eb99b0ed55ab0313efcf2eb04c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408101
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-18 16:49:14 -04:00
Pawel Wodkowski
1a6dac405b bdev/virito: add JSON config dump and generic create RPC
The new construct_virtio_dev allow creating virtio SCSI and blk for both
PCI and user transports.

Change-Id: Ibd79c4fb75e3cbd993b46227d86e915c1b740a18
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/405419
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-17 17:16:06 -04:00
Tomasz Zawadzki
0629b01d21 test/rbd: add configurable monitoring IP address for ceph
Ceph monitor IP address was always 127.0.0.1, with this change
it can be configured at setup time.

Since each test might prefer to specify different addresses
or ones that do not exist at start of autotest.sh. rbd_setup was
moved to begining of each test respectively.

Change-Id: I5626f7ea979d0db921208355ba23314cf48e971f
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/407910
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-17 13:55:44 -04:00
Ben Walker
bdfeddd3a3 Add strncpy to the list of banned functions
strncpy does not guarantee that the resulting strings
are null terminated, which leads to mistakes. It's
always better to use a function like snprintf instead,
so ban it.

Change-Id: I6ca56103a35df3364a04bdd68937768bc0479235
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/407027
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-13 16:15:52 -04:00
Ben Walker
e450a34aa9 check_format: Ignore rte_vhost code in forbidden function check
Also print out line numbers.

Change-Id: I1beb363795d7c8b0d04cb501a2e7169b313134a0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/407495
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-13 16:15:52 -04:00
Karol Latecki
c43dc1f1e3 scripts/rpc.py: calculate num_blocks with floor division
If called with python 3 num_blocks will be calculated
as float number with .0 decimal part.
Change to floor division so that is't always int.

Change-Id: Ic0aae404e21a1bdfe7db291532d80d4b4598d307
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/407547
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-13 15:44:46 -04:00
Daniel Verkamp
7d45cfc3cc scripts/rpc.py: pass named args to lvol.py
Also add docstrings to all lvol.py methods.

Change-Id: I2fb0c0622450a8862d2d6182f1f800da4d15a780
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/407372
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
2018-04-12 13:21:02 -04:00
Karol Latecki
3142d978c3 scripts/rpc.py: Handle socket connection error
Handle socket exception, print it and exit cleanly.

Change-Id: I7ac899dfe329c7512339549991abea8a6cb09608
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/407308
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-04-12 11:24:04 -04:00
Slawomir Mrozowicz
7552707ef1 bdev: Enable lvol resize RPC
Enable test functions for lvol resize.

Change-Id: Ia4583af211350054797d2d8441083e582e6e2ab7
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-on: https://review.gerrithub.io/395043
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-10 19:24:04 -04:00
Tomasz Zawadzki
97934c5291 lvol: add snapshots and clones
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Change-Id: Ibc43e3ee65d85a83d78d6e15457ae57992a1188a
Reviewed-on: https://review.gerrithub.io/395059
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-10 13:46:09 -04:00
Jim Harris
218dcd840a bdev/pmem: change all NVML strings to PMDK
NVML (Non Volatile Memory Library) changed its name to
PMDK (Persistent Memory Development Kit), so make the
necessary changes to the SPDK repository.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id07a87eafb4e9a3099603030c58c0e927bafa608

Reviewed-on: https://review.gerrithub.io/406256
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-07 00:07:57 -04:00
Daniel Verkamp
f40c3e9825 check_format: add [v]sprintf() to banned functions
Fix up the single instance in the tree (dmaperf.c example) and
disallow more string functions with no destination buffer size.

Change-Id: I2bd39d6e848cd8a13536e26c4f0ee6713cf6dff9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/406829
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-06 18:31:14 -04:00
Daniel Verkamp
dad4745201 autotest: attempt to clean up Ceph mount
This can be left mounted from a previous build.  Try to clean it up
before starting up Ceph again.

Change-Id: I6273c2bbff53163177ea709dc4f4db4937a00a31
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/406627
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-06 16:41:54 -04:00
Daniel Verkamp
46cbc7408a scripts/rpc.py: fix load_config method check
The "method" check was looking in the wrong object, so it would always
fail and not call any of the methods.

Change-Id: I4c91428523256912f47dfced95ff53cc1630284a
Fixes: 4c7733618a ("json/rpc: Fix. Support not fully implemented subsystems.")
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/406659
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-05 17:27:00 -04:00
Pawel Kaminski
4c7733618a json/rpc: Fix. Support not fully implemented subsystems.
Change-Id: I3cbc052dd4732a48c0d182b90e0c1b12a2f218c6
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/406317
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-04 18:21:52 -04:00
Pawel Wodkowski
a5dbccf02b bdev/split: add RPC support
Split bdevs now can be create using "create_split_bdev". To keep
backward compatibility, this call will not fail if base bdev is not
available yet instead will add base bdev name to its live configuration
and create splits when base bdev will be created (during examin
process).

Change-Id: Ie26ffc0e947f6d88ff56830dd50999795283df2e
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/404164
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-04 16:03:00 -04:00
Daniel Verkamp
bacc51d33d scripts/rpc.py: add @call_cmd to resize_lvol_bdevs
This wrapper is currently commented out, but decorate it with @call_cmd
so it is up to date with the rest of the calls when we decide to enable
it.

Change-Id: I56d25fbfb0e06c8b791d75398ee36ce96dfdcfa4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/406213
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-03 18:09:27 -04:00
xuhuagen
a04b77e6bd rpc: rpc method 'load_config' should need 2 parameters.
Change-Id: I7a47d2187d135353d7f843a815fcbbb87ac4523b
Signed-off-by: xuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/406138
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-03 15:23:12 -04:00
xuhuagen
dd8b1719d2 rpc: rpc method 'get_rpc_method' does not need argument
Change-Id: I5e64a938e5df21f773476a7f96fea0a4a8a205c1
Signed-off-by: xuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/406123
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-03 15:04:16 -04:00
Karol Latecki
8d27c02378 scripts/rpc.py: move exit on error to rpc.py
Moving exit in case of error to rpc.py
By using exceptions in  client.py it is easier to use it
as module in other scripts.

Change-Id: Ic9ecef481ef5b6a169e1293b3dcf859ffbbe0e89
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/405739
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-03 11:59:33 -04:00
suman chakraborty
5e98dfd126 nvmf: add capability to add namespaces dynamically during active connection
1) The user should provide MaxNamespaces during the construction of the subsystem
2) The namespace which is added should have nsid less than or equal to MaxNamespaces
3) If the user does not provides MaxNamespaces then the exsisting behaviour continues where the nisd can grow dynamically when it is not connected.

Change-Id: I54769d9669575a5f6bf56fe5a262191ac51c474d
Signed-off-by: suman chakraborty <suman.chakraborty@wdc.com>
Reviewed-on: https://review.gerrithub.io/405375
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-30 19:24:29 -04:00
Daniel Verkamp
85f316b183 scripts/rpc.py: pass named args to nbd.py
Change-Id: I4703c813d80b805c7b747fc5ee8bc91ef3e20717
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405506
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-30 16:48:47 -04:00
Daniel Verkamp
94c0ce5503 scripts/rpc.py: fix help string for subsystem RPCs
These had an extra double quote at the beginning of the help string,
which showed up in the rpc.py -h output.

Change-Id: Iaa8ac94e3beb445091dcce41ffea90dde6c0fa22
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405505
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-30 16:48:47 -04:00
Daniel Verkamp
81088b8779 scripts/rpc.py: re-order delete_bdev function
The get_bdevs_config argparse and wrapper got inserted between the
delete_bdev wrapper and its argparse code.  Move the delete_bdev
function down so it is next to the parser setup for that method.

Change-Id: Ib0af5c3c89ce332ef689d44321f8724116a1241a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405503
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-30 16:48:47 -04:00
Daniel Verkamp
3eaf92650b scripts/rpc.py: pass named args to subsystem.py
As an example of how we want the Python wrappers for the RPC interface
to look, convert the methods in scripts/rpc/subsystem.py to have
explicitly named arguments and pass the JSONRPCClient object explicitly.

Change-Id: I9d2e194ce7fde535d323383925f7825ab93909de
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405500
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-30 16:48:47 -04:00
Daniel Verkamp
96dc91d608 scripts/rpc.py: pass client as separate parameter
Split client out of the args object and pass it as the first parameter
to all RPC methods instead.  This is a step toward decoupling the
rpc/*.py interface from the argparse front end.

Change-Id: Ib030862e0c79112e5c9acdde295d68983126a987
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405502
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-30 16:48:47 -04:00
Dariusz Stojaczyk
b351819679 bdev/virtio/rpc: allow listing created devices
Listing them through get_bdevs is not enough. Some
devices might not have any LUNs presented while expecting
some to be hotplugged in the future.

```
$ rpc.py get_virtio_scsi_devs
[
  {
    "virtio": {
      "vq_count": 18,
      "type": "user",
      "socket": "/tmp/vhost.0",
      "vq_size": 512
    },
    "name": "VirtioScsi0"
  }
]
```

Change-Id: I56857d7a0637300beba39a8d83a98447f1f74ce7
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/405182
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-28 13:12:06 -04:00
Daniel Verkamp
b1bdc370ca scripts/rpc.py: explicitly en/decode socket data
This is required to work on Python 3.

Change-Id: I1893d967027e3ccebfc6a796dcffa59209d477f9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404434
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-26 00:57:53 -04:00
Daniel Verkamp
e78866edf0 scripts/rpc.py: add parentheses to all print calls
This is necessary for rpc.py to work with Python 3.

Change-Id: I34d411090532ccc2603473ded20119681f8aa85a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404433
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-26 00:57:53 -04:00
Daniel Verkamp
0126c9ce7a scripts/rpc.py: use relative imports
This is necessary for rpc.py to work with Python 3.

Change-Id: I4bd57dd366941b2c12dd52d2a2f812abb5bafac7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404432
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-26 00:57:53 -04:00
Daniel Verkamp
e44aef95f8 scripts/rpc.py: move print_array to rpc.py
This isn't needed in client.py.

Change-Id: I7034aea06cd59af55a33e91cc4583aca899e7201
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404431
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-26 00:57:53 -04:00
Daniel Verkamp
80c81017ce scripts/rpc.py: remove unused int_arg()
Change-Id: I0b5acd748799d6c867844d60466b761c3a406920
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404430
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-26 00:57:53 -04:00
Daniel Verkamp
df897ed490 scripts/rpc.py: move printing into main rpc.py
The modules in scripts/rpc/*.py should be a generic, reusable library;
the printing should be done by the command-line frontend (rpc.py)
instead of the library code.

Change-Id: Ibeb022a3591f0a140fc43104d8dcf17d7041e48b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404426
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-26 00:57:53 -04:00
Daniel Verkamp
8d7ddde155 scripts/rpc.py: fix construct_virtio_pci_blk_bdev
This was accidentally duplicating construct_virtio_pci_scsi_bdev instead
of creating a new argparse subparser.

Change-Id: Ib687837ec9120718df6ea2375047da71a78810a3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404427
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-23 04:04:14 -04:00
Daniel Verkamp
3c4d173b79 scripts/rpc.py: remove get_luns wrapper
The get_luns RPC call was removed in commit a862d1cdd6 ("scsi: remove
lun_db"), but accidentally reintroduced in commit 4dd3f4a7fa ("rpc:
Break rpc client into individual python files").

Change-Id: Ie9e5241234e59ffdc19c86083d3d8ea753c6bc17
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404425
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2018-03-23 04:04:14 -04:00
Pawel Wodkowski
13a05f59cc bdev/rbd: add JSON config dump
Change-Id: I3122c899f76c1ce1eb422bcf73af87d1b41b9364
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/401223
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-23 03:57:44 -04:00
Pawel Wodkowski
5ffa5c003a bdev: introduce 'get_bdevs_config' RPC call
Write information needed to recreate each bdev.

Change-Id: I3d2b24fd4aaa8b98ec558d864cc28b55a899452f
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/401217
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-23 03:57:44 -04:00
Pawel Wodkowski
50d738b447 scripts/rpc: add configuration save and load
Change-Id: I37f2174fd6c3092b25e127a4cd578d202ee8c98a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/403351
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-23 02:47:40 -04:00
Pawel Wodkowski
bd4ecea505 subsystem: add per module configuration dump
Change-Id: I5c4e51cd9cd97b05ab9a95cbe084ff2741f6ef58
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/402323
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-23 02:47:40 -04:00
Jim Harris
2af15344ab bdev: add iSCSI initiator bdev module
This uses libiscsi to implement an iSCSI initiator bdev
module for SPDK.  Still a lots of work to do on this - posting
it in case anyone is interested in working on this further.

A number of todo items are listed in a README in the lib/bdev/iscsi
directory.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Change-Id: I060e33de0cd6796246789bf0e1bb4f2df59d8f71
Reviewed-on: https://review.gerrithub.io/390313
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-21 20:35:42 -04:00
param
a1ee118769 NVMf : RPC to remove listener
Change-Id: I20093dc7a5ab7147276cb6afb2ac1360649e49e9
Signed-off-by: param <kumaraparamesh92@gmail.com>
Reviewed-on: https://review.gerrithub.io/404012
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-19 16:24:04 -04:00
Pawel Wodkowski
14c4a4286f scripts/rpc: add timeout waiting for response
Optional '-t' parameter with default 60s.

Change-Id: Id1124d16ad2fc205433ee1e643939502c4641547
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/403350
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 19:36:46 -04:00
Daniel Verkamp
dbcc917d81 scripts/setup.sh: avoid clobbering $bdf variable
The get_nvme_name_from_bdf function uses the variable name $bdf, which
is also used as a loop iterator in its caller; since variables are
global by default in bash, this overwrites the original $bdf and may
cause unexpected behavior like skipping setup of some NVMe devices.

The long-term fix should be to declare all variables local in all
functions, but a minimal, targeted fix is to just rename the variable in
the inner function.

Change-Id: I53a877606a585415e8af525c6162ed7b0f67ba45
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403370
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-12 17:04:38 -04:00
Daniel Verkamp
84918cd9fa bdev/null: allow user to override UUID
Change-Id: I2fe5eb46d5e5b67451b472b82cde69e3606c6235
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403222
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-09 09:55:34 -05:00
Daniel Verkamp
eca9ac03e4 bdev/malloc: allow user to override UUID
This can be used to force specific UUIDs for testing.

Change-Id: I40c403fd00c142552d632dd5f0fbe1ea9a6c9962
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403221
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-09 09:55:34 -05:00