Commit Graph

45 Commits

Author SHA1 Message Date
Pawel Niedzwiecki
c63d9de433 rpc/vhost: unify RPC "remove_vhost_controller" for all backends
replaced "remove_vhost_scsi_controller" and "remove_vhost_blk_controller"
with "remove_vhost_controller".

Change-Id: I6f4b180054c13f25aae992e9be50375d3750a376
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/377197
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>
2017-09-26 15:35:54 -04:00
Tomasz Zawadzki
e21aede946 lvol: add get_lvol_stores RPC
This patch shows UUID and base bdev for logical volume stores
when get_lvol_stores() RPC is called.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Idbd0bc6c4a0334e5af8d4a674a203ddb2270f3e4
Reviewed-on: https://review.gerrithub.io/374604
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-18 12:19:16 -04:00
Tomasz Zawadzki
27f44662ac lvol: Logical volume implementation
Change-Id: Ia96ae78ff9530d953181ac5f7255a38f3c8ec430
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Reviewed-on: https://review.gerrithub.io/375392
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>
2017-09-14 19:30:54 -04:00
Daniel Verkamp
691912ef44 nvmf: allow user to specify NSID via conf and RPC
The nvmf library now supports the ability to assign arbitrary NSIDs,
rather than automatically assigning the next one in line.  Expose this
functionality to the user via the configuration file and RPC interfaces.

Change-Id: Ia85a9a6dfe31a2cd0605c7a6c098eec0c1b7de68
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376463
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>
2017-09-05 13:03:09 -04:00
Daniel Verkamp
a2db49a121 nvmf: add AllowAnyHost option to subsystems
The previous behavior with an empty host NQN whitelist was to allow any
host to connect.

Change-Id: I5401e52d96642cf20afe0d50c692613e67262edf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376432
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>
2017-09-05 13:03:09 -04:00
Daniel Verkamp
70c3e1f2eb reactor: add context_switch_monitor RPC
This allows the user to enable/disable getrusage() monitoring at
runtime.

Also change the log level to INFO and enable the monitoring in all
builds, not just #ifdef DEBUG.

Change-Id: I2f5c3bc8cd83dcb2a72dc7078bf2cb43aa28827c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376473
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-09-01 12:46:18 -04:00
GangCao
21aade7a9c bdev: update the get_bdevs RPC method with optional parameter
Change-Id: I2a1c148deed1d6378eaf848d33b0f28cfeb1b65a
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/375274
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>
2017-08-28 15:19:34 -04:00
Daniel Verkamp
6d5285bdfb bdev/aio: rename "fname" to "filename"
The construct_aio_bdev RPC still accepts "fname" for backwards
compatibility.

Change-Id: Ibf44f5f3667c6de4b827f7f3f8787aff0a6c4fc9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/373834
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-11 19:36:30 -04:00
Daniel Verkamp
671179409c bdev/aio: allow user to override block size
Add a file-backed AIO bdev to test it out.

Change-Id: Ifdf206bbdf6cae9379fdc02c80755e96a7198bce
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/373673
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-11 19:36:30 -04:00
Pawel
83c2b65a4f vhost: RPC: unify RPC "get_vhost_controllers" for all backends
replaced "get_vhost_scsi_controllers" and "get_vhost_blk_controllers"
with "get_vhost_controllers"

Change-Id: I4988313e311e5b66632d8e216bde209c8ea5e318
Signed-off-by: Pawel Niedzwiecki<pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/369399
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-08-10 13:31:20 -04:00
Ben Walker
f6e62d2ce1 nvmf: Remove direct mode
There is now only virtual mode. Virtual mode has been
improved enough to reach feature parity with direct
mode and performance benchmarks show no degradation.
Simplify the code by always using virtual mode.

Change-Id: Id5cdb5d4d8c54e661b245ed7250c2f9d66ca2152
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/369496
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-08-02 13:57:45 -04:00
Daniel Verkamp
672ed49bbc rpc: add get_rpc_methods RPC call
Change-Id: I93690c923feb1a78e88dd5b9d69d9e8e24fd6034
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/370560
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-08-01 13:43:14 -04:00
cunyinch
f2b26eb113 bdev/error: Add support of "reset" for error injection bdev module.
Change-Id: If4cd8392a958eff7bda424b4bde3d48d833cef40
Signed-off-by: cunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/363682
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>
2017-07-06 15:02:06 -04:00
Pawel Niedzwiecki
a264d9d2a3 Vhost: add support of VITRIO_BLK_F_RO
-Add a configuration option: Read-only flag

Vhost block controller can be set in read-only mode.
Option can be enabled in config file or in RPC call:
'construct_vhost_block_controllerr' with '-r' option

Change-Id: I7e58243be00d33bc04120d573fd4ed7775bb9b2c
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/366086
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: Jim Harris <james.r.harris@intel.com>
2017-07-06 12:55:49 -04:00
Pawel Niedzwiecki
ff88449d6e vhost-block: add RPC calls
Following RPC calls are added
-add/remove controller
-list controllers

Change-Id: Idba407a61640de32875f7c347d609b6b9137dd63
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/363688
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-07-05 14:33:28 -04:00
Daniel Verkamp
8486e38d4a nvmf/rpc: add trtype alias for transport names
Use "trtype" to represent transport types in nvmf_tgt RPCs for
consistency with the NVMe-oF spec and other SPDK RPCs.

The current "transport" names are still supported for compatibility with
existing RPC users.

Change-Id: Ib03dda384dc01a41a18c06c56baff16b82d36c00
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367422
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>
2017-06-30 12:43:18 -04:00
cunyinch
c15ceac1a5 bdev/error: Change the global error information to per bdev.
Change-Id: Iea492a36d23caa5d514f2c80e168486f7f616fda
Signed-off-by: cunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/363676
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>
2017-06-08 19:25:10 -04:00
Cunyin Chang
32b4ab71a2 bdev/error: Add new bdev/error to inject errors in bdev layer.
Change-Id: I3c68cb5911b3662dbb35f551dc291d5ebdd84bf6
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-05-18 07:56:14 -07:00
Dariusz Stojaczyk
679e2831bd vhost: added rpc commands to remove vhost controllers and devices
Added new rpc commands together with underlying vhost API and tests.

Change-Id: Ib9c6a530d0909193ea5115aaac4920c44f39613c
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-05-18 01:01:46 -07:00
Jim Harris
4eafea0360 bdev: add a null bdev module
Also change the discovery/nvmf.sh test to use it.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I56bce9a84bd46f13b6d4f34da81abf23413f2598
2017-05-15 14:00:37 -07:00
Daniel Verkamp
6f01da764c scripts/rpc.py: add -v option for verbose mode
Change-Id: I0b2e18706644b5d9bd53b07228ab3e92eba583e1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-04 09:19:14 -07:00
Ben Walker
6d7b6e882c bdev/aio: The user now provides the names of AIO bdevs
The user now must choose the name for each AIO bdev. This
provides consistency for names across restarts.

Change-Id: I13ced1d02bb28c51d314512d60f739499b0c7d8d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-03-20 15:18:03 -07:00
Ben Walker
d326998ce7 bdev/nvme: Names are now explicitly assigned by the user
Names for the NVMe bdevs are now assigned by the user.
This means the same name will always be assigned to the
same device, even across restarts.

Change-Id: If9825ec9abcb5236b4671bc44a825e4f0d704fe3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-03-15 17:42:45 -07:00
Ziye Yang
b0ad3322f0 bdev/nvme: RPC call can now specify remote NVMe-oF devices
Change-Id: Ief3cf71489f0725249d51851b8d3270cb4e034db
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-14 08:38:04 -07:00
Pawel Wodkowski
73c95f5476 scsi: remove delete_lun RPC call and move claimed flag
Move claimed flag to struct spdk_scsi_lun and remove RPC call that allow
SCSI LUN to be deleted by user.

Change-Id: I0fe57d33ab017816ab4799bce259807735e0c783
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2017-03-13 11:27:22 -07:00
Daniel Verkamp
30a10e68a4 bdev: add delete_bdev RPC
Change-Id: Iac0298d5f10c937107a70287af4586a5c37e73bf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-08 12:36:32 -07:00
Piotr Pelplinski
1dbf53eebf vhost: add a library and app for userspace vhost-scsi processing
This patch adds a library, application and test scripts for extending
SPDK to present virtio-scsi controllers to QEMU-based VMs and
process I/O submitted to devices attached to those controllers.
This functionality is dependent on QEMU patches to enable
vhost-scsi in userspace - those patches are currently working their
way through the QEMU mailing list, but temporary patches to enable
this functionality in QEMU will be made available shortly through the
SPDK github repository.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com>
Signed-off-by: Michal Kosciowski <michal.kosciowski@intel.com>
Signed-off-by: Karol Latecki <karolx.latecki@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>

Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com>
Change-Id: I138e4021f0ac4b1cd9a6e4041783cdf06e6f0efb
2017-03-06 12:44:35 -07:00
Ben Walker
dd16a7277d rpc: Decouple RPC config from instance ID
Instance ID is too overloaded and the uses are beginning
to conflict. Separate the RPC configuration out.

Change-Id: I712731130339fee4fc8de4dc2d0fea7040773c58
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-02-14 14:47:25 -07:00
GangCao
4f752e1d75 nvmf_tgt: assign different core for subsystems under RPC mode
Change-Id: Ib751c45f916f66b682d3011397f1f8fe794b08d8
Signed-off-by: GangCao <gang.cao@intel.com>
2017-01-25 15:56:24 -07:00
Daniel Verkamp
9cc423f061 scripts/rpc.py: add Unix socket support
Change-Id: I0750563f4fc706ddd803c9679f63aa006427c8a5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-15 08:06:33 -07:00
Pawel Wodkowski
7dce704c20 scrips/rpc.py: add vhost scsi RPC commands
Add new commands:
get_vhost_scsi_controllers
construct_vhost_scsi_controller
add_vhost_scsi_lun

These RPC commands are in preparation for an upcoming SPDK vhost-scsi
target.

Change-Id: I8dc3045f832df76a34c55f41dba213d480a3e5fe
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2016-11-23 12:42:10 -07:00
Daniel Verkamp
e1baabee4a bdev: add get_bdevs RPC
Add an RPC interface to list all blockdevs and their properties.

Change-Id: I50db730d5eff8cffcbe8fe5df6b3461457e8581e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-02 09:10:54 -07:00
Daniel Verkamp
7d30f5aa1e bdev/rbd: use consistent block_size name in RPC
Rename the construct_rbd_bdev "size" parameter to block_size so that it
is consistent with other bdev construct RPCs.

Change-Id: I88f8ed35444495ffce9550dc224fbcbd58231787
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-31 13:48:27 -07:00
Daniel Verkamp
8d22515b52 rpc.py: trim whitespace before splitting args
Leading and trailing whitespace will otherwise lead to empty array
elements, which are not intended.

Change-Id: Ie7bd5dfce8cb9904090a06491d0bde4905de1e3a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-31 11:19:24 -07:00
Daniel Verkamp
0404c306cb bdev: make construct RPCs return the bdev names
When creating a bdev via the RPC interface, there was no way to know
what name it was assigned (other than predicting it based on the
numbering scheme).  Change all of the relevant RPC interfaces to return
an array of bdev names so they can be used to construct LUNs/subsystems
dynamically in scripts.

Change-Id: I8e03349bdc81afd3d69247396a20df5fcf050f40
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-31 11:17:46 -07:00
Daniel Verkamp
38d41acda4 check_format: check Python style with pep8
Also continue checking for errors after a problem has been found.

Change-Id: Iea37311e54f68fb6ba8c804ad4b2fb92d5238f36
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-18 13:35:19 -07:00
Cunyin Chang
0482640657 rpc: Rename construct_aio_lun to construct_aio_bdev
Change-Id: Iff2d030b854bfda77ed1e5eeea6f46119a5bb50a
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-18 09:51:31 -07:00
Cunyin Chang
134dce2669 rpc: Rename construct_malloc_lun to construct_malloc_bdev
Change-Id: I72f21881264226499a9cd64c72f3ab1b4808b2ec
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-18 09:51:31 -07:00
Cunyin Chang
f1fcdeb341 script: Add method to construct rbd bdev.
Change-Id: I2c1e083628ac5a1402b8e89bdf05ca2ed55bc1a5
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-13 22:07:53 -07:00
Cunyin Chang
e1f93d26db script: Add method to construct nvme bdev
Change-Id: I0b81fca543783e918eb1cd5f0d1cb0dd0e5de69c
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-14 01:54:46 +08:00
Daniel Verkamp
5ec0b3227d nvmf/rpc: make sure NVMe device is found in create
Extend the check added in commit
7552ee5512 ("nvmf_tgt: fail if NVMe
controller is not found") to the RPC interface.

Also remove the default PCI address from rpc.py, since it is not a
useful default - the user must specify a PCI address, which will vary
depending on the configuration of the machine.

Change-Id: If9a4e19ef2a84c9d839b467abc011046613f7168
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-13 08:50:03 -07:00
Daniel Verkamp
4afe9d1acb nvmf/rpc: make hosts parameter optional in create
Instead of a magical "All" value for allowing all hosts, allow the
caller of construct_nvmf_subsystem to omit the "hosts" parameter.

Change-Id: I97c7ae806a0be7142fb59708d47023e42e127fcc
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-13 08:50:03 -07:00
Daniel Verkamp
45c041449f nvmf/rpc: don't allow namespaces in direct mode
create_nvmf_subsystem should not allow the user to specify any
namespaces in direct mode.

Also remove the default Malloc0 namespace in rpc.py; the user
should be required to specify the list in virtual mode.

Change-Id: I3aaf7c64b9ceee89a3f7db15760a669527adb29d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-13 08:50:03 -07:00
Cunyin Chang
d20b90b21e nvmf: Add support for RPC interfaces.
Change-Id: I6f0fe35bf2876df181ad11294b62d64d97dcac2c
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-09-26 16:07:30 -07:00
Ben Walker
1e92d78a10 iscsi: Add an iscsi target application
Similar to our NVMf target, this is an iSCSI target that
can interoperate with the Linux and Windows standard iSCSI
initiators.

Change-Id: I6961c5ef99f7b161c396330ed5b543ea29b0ca7b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-08-04 13:15:33 -07:00