Also add docstrings to all app.py methods.
Change-Id: Ib234014630e8b47c55f8d96bede509952fe653c5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411940
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>
When running "setup.sh config" (or setup.sh without
specify a mode - which defaults to config), do not
unload the contigmem driver and then reload it. Over
time, memory can get fragmented and contigmem will fail,
crashing the system.
But still check if the requested HUGEMEM matches what was
previously specified. If a different amount was requested,
unload contigmem as before and then reload with the new
amount.
This patch brings FreeBSD behavior in line with Linux. On
Linux, we do not release all of the hugepages and then
reallocate them.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I18cb6fd4bdc1e1da0382423455ebce58c13bee7a
Reviewed-on: https://review.gerrithub.io/412238
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>
Change-Id: I15d6d89bc6fabd87b458113c777a66e3bf1dcecc
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/408699
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>
Change-Id: Ib999d3f082f5d632cb1aaf089504d0cd48e77539
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/408696
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>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Add a new function and its RPC caller. By using it, we can
get the statistics of all the bdevs or the specified bdev.
Meanwhile, with this patch, the open source tool 'sysstat/iostat'
can support for SPDK. The 'iostat' tool can call this function to
get the statistics of all the SPDK managed devices via the rpc
interface.
Change-Id: I135a7bbd49d923014bdf93720f78dd5a588d7afa
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/393130
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@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>
virtio_blk bdevs inherit the name string from their virtio
devices. The string is always freed on virtio device destroy, so
trying to free it as a part of bdev cleanup would always result
in a double free.
Change-Id: I47d20748ec12d9be201b9cd4f72bf89a61e80170
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/412073
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>
Logical volume store bdevs should report the same buffer alignment
requirements as the base bdev of the logical volume store. For example,
a lvolstore on a Linux AIO bdev should require aligned buffers.
Fixes#307.
Change-Id: I8e40dd428db882d18546caf678d1d4ef4462e2b4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/412064
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Change-Id: Ie56d5908af306eec75a360a7ce6078ba93bb2f4f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411746
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>
The whole params object is already optional, but making the parameter
optional as well allows the specification of an empty object for params
to work.
Some JSON-RPC clients make it more difficult to omit the params object
entirely; see issue #303.
Change-Id: If0ac4ebfba33fd2c85f729d2f1109e4d0e47aa3b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411740
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>
This makes a number of things much simpler and eliminates
the need for upcoming proposed reset handling.
Change-Id: I23a6badd0873f6dcf38ba1e55bf18d846c2843df
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/407357
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>
Make sure every event has a handler. No new code
to actually handle events yet.
Change-Id: I4d63898e9bd7fcaa7dc3486c07f42d75b4d48da0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/412074
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>
We don't need the astyle-devel package (this includes astyle.h and
libastyle.so, neither of which we use); astyle is sufficient.
This also fixes pkgdep on CentOS 6, which only has astyle, not
astyle-devel.
Change-Id: Idaf34b1727da4f7202c324788e6ae1a3397226b6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411642
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>
The "jsonrpc" field, per spec, is meant to contain the exact string
"2.0" to indicate the version of the JSON-RPC specification implemented
by the client. We don't do anything useful with this information except
to drop requests for (theoretical) other versions, so it should be safe
to allow the parameter to be optional. If the version is specified, we
will still validate that it is 2.0.
This enables interoperability with a Go JSON-RPC client, as mentioned in
issue #303: https://godoc.org/github.com/mafredri/cdp/rpcc
Change-Id: Ifde32b3f47a5d7942f4ab74b4d6029dd0168efa8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411742
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>
This package has been renamed to reflect the new upstream project name.
Change-Id: I71f6bfaf36fb1fe7dc4cb050e3d7faad1097994e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411781
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>
For the same reason as commit 31bf5d795e ("nvme: make timeout function
per process"), the AER callback also needs to be stored in the
per-process controller data structure.
Change-Id: I41425d81a2ab16c06ef9b900bef6a6128117fcb0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410953
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>
Pull in commit b354dddee3fc ("RHEL 6.4 support - use previous
'deprecated' attibute API").
Change-Id: I0e8c81dbbe49ceaced38f30493cd9012aecca47a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411729
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I923c808affabdb97a5237b76f9f5534d6fb41601
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/411048
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
The RDMA transport was not correctly registering new controllers on
creation. RDMA doesn't support multi-process, but it still needs a
single per-process structure for the owning process.
Change-Id: I337ab9d00b468671e7c7a21175682beed4cfdd2e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410958
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>
The hot remove callback is registered when we open the bdev in the
examine callback, but it's not used just during examine; change the name
of the callback to more accurately reflect what it is for.
Change-Id: Ie3e425e2e512f212d0dea40be12186c00e7a1091
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410943
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Purpose: To make the reqs recycle more flexible.
Change-Id: Ied37397a10dada22a7aee6bb5a316da6a0583073
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/410866
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>
The per-process controller data may only be touched while holding the
ctrlr_lock.
Change-Id: I18c8c4e43db4d58e6b86f0c0fd222f6d30830b85
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410952
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I7598222db5d76c1a1578fbb5935d4348f7c62f54
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410951
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This is to support older versions of pmap (specifically procps v 3.2.8
which ships with centOS 6) which don't support the -p and -X options.
Change-Id: Ic8d4b94985c165e8bf224204af48b5d856aa2403
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/411755
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>
Change print statement syntax and subprocess calls as well as some list
comprehension syntax.
Change-Id: Iebdea5f06be963e7f04af4df352aacef9b31a8eb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/410957
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Avoid sending CNS values other than 0 and 1 to controllers with the
Identify CNS quirk added in commit 6442451b10 ("nvme: add a quirk for
identify 0x2").
This probably doesn't affect either of the controllers with the quirk in
practice, since this command is already only sent to controllers that
report NVMe version 1.3 or newer, but let's add the check anyway for
consistency.
Change-Id: I858c28ab7d43714c501dd22d6797259054f0f0a8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410941
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>
Add a simple example for spdk_vhost_nvme_controller_construct
and spdk_vhost_nvme_dev_construct functions.
Change-Id: I38415a7f4b28faf071a74e9b87d141da78e43368
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/410532
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
save_config has '-f' as option and it is easier to use than '--filename'.
Change-Id: I553480d03431c65612e9df296f202572522d6aca
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/410864
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: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Missed to add object_begin to dump for portal group.
key of lun in luns is different between dump and load.
Change-Id: I16b95596478e0e4430c7186aa077bd107e375a93
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/410863
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>
'S' and 'f' was not ported from vhost target app.
Change-Id: I1a450b83e969fc3ede1d9b5c2478acd350bbd601
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410091
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>
This was omitted in one of previous commits.
Change-Id: I93ed4bae671bb36bf2b714ff6649b1f33a692647
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410094
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>
iscsi_url is not need after bdev creation. Also implementing get_config
RPC call in next patches is quite problematic as information how bdev is
created using iSCSI URL is lost (eg username).
Change-Id: I8b097617c09bd4636c28531ca20a59919b2b4f84
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/407769
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: Ziye Yang <optimistyzy@gmail.com>
The 4.16 Linux Kernel does not appear to have a noop scheduler for block
devices. Instead, it supplies a none option to turn off the scheduler
entirely.
Change-Id: I2dfb75b845cfff2ce2cabcfd86183b01432ad898
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/410954
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Fix deprecated print statements and properly encode strings for file and
process communications.
Change-Id: I896c9dd7b9b15be8684af267066dae8ca8df4f62
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/410949
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Python3 does not support the "except Exception, name:" syntax used in
test_cases.py
Change-Id: Ie90888d715c97c94c7686b797d955df2ead61915
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/410937
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
We've had cases (especially with vhost) in the past where we have
a valid vaddr but the backing page was not assigned yet. DPDK used
to return 0 as the phys addr in these cases but now it returns
RTE_BAD_IOVA. Unfortunately we don't have any tests currently
in the test pool that hit this condition, but at least one user
has an environment which hits it and this patch fixes their
problem.
Make sure we still work with older versions of DPDK as well.
Fixes issue #260.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie3c0ef54a3e34153bd0850ecfb2be4fcb92455b1
Reviewed-on: https://review.gerrithub.io/410071
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
These were marked as deprecated in v18.04 and scheduled for removal in
v18.07.
Change-Id: I2587bcaf89cdcc757ad902ac42ccd9adce9c8f92
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410727
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>
It doesn't represent an io_channel, so lets
rename it to something less confusing.
Change-Id: I730eb0ff0eb7737a59c190812a25b327ccd8fc14
Suggested-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/409998
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: I44d93da4c5ce51dc12c385bb8c1d56bf1336d526
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410499
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>
Inflate call can be used on thin provisioned blob or clones.
Function allocates all unallocated clusters on specified blob and:
- For clones, copies data from backing blob.
- For thin provisioned blobs, clusters are zeroed.
After this call all dependency from specified blob is removed
what allows deletion i.e. snapshots.
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Change-Id: Ibff569e45b12068b2fb46557156be348b36c252b
Reviewed-on: https://review.gerrithub.io/399367
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>