Commit Graph

19 Commits

Author SHA1 Message Date
Pawel Niedzwiecki
9a723c1a48 test/virtio: Add vhost initiator tests for multiqueue
We define 'size' and 'offset' parameter as % of device so on nvme
devices the tests are run with big files and small on malloc so we
can remove the 4G test case

Change-Id: I4840e859732696dd981ab0ab11e5270c025ff248
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/391838
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-11 14:28:42 -05:00
Pawel Niedzwiecki
37fd86f0f7 test/virtio: Add vhost initiator tests for multitarget.
test virtio devices created from scsi controller with multiple targets

Change-Id: Ibef135c4dc6fdb324bec6b42c9e532add92e656a
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/391836
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-01-11 14:28:42 -05:00
Pawel Niedzwiecki
8d57f4da2a test/virtio: Add vhost initiator tests for multisocket
test multiple devices simultaneously instead each device
individually

Change-Id: I514ee080a2a585a87c7bcfc2a10da89456b285a4
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/393944
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-01-11 14:28:42 -05:00
Pawel Niedzwiecki
b251ebdd9d test/virtio: Refactor existing code
- replace generating job files with pre-existent fio job file
- construct vhost scsi controllers with rpc
- replace generating path to vhost socket in bdev.conf with
static path
- add function usage

Change-Id: I44dedb7fd9a3d96e3d348450c4351cfae6d20116
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/391827
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-01-11 14:28:42 -05:00
Pawel Wodkowski
575a291fa3 test/vhost: introduce notice, warning, error and fail message
helpers

So we can better trace what failed.
notice - just echo to stdout
warning - just echo to stderr
error - echo to stderr and return false, so trap ERR can catch this
fail - like err but call 'exit 1' at the end so if no trap ERR is used
it will exit anyway.

Change-Id: I5c7b3682fd6c0d81c07c58a5ec965155c7593407
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/392218
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-08 18:01:33 -05:00
Pawel Wodkowski
3911366d66 test/vhost: make run_fio.py to just run fio
Make shell scripts prepare fio jobs and just call run_fio.py to run
those jobs. This way run_fio.py don't need to know anything about test
environment configuration.

Change-Id: I10b6954011855e9139ff7b5372070ec553009d33
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/391929
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-21 11:28:09 -05:00
Jim Harris
df03f9d119 test: add timing calls to vhost/initiator/blockdev.sh
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5e19266d5d418e1b356308d2b9efa419c1b22232

Reviewed-on: https://review.gerrithub.io/392002
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-12-19 11:10:57 -05:00
Daniel Verkamp
5f0c99c018 test/vhost/initiator: specify RPC address via -r
Remove the [Rpc] section of the vhost initiator bdev.conf file and use
the bdev_svc -r parameter to set the RPC address instead.

Change-Id: Iaa5f6947b49679082f00d4c30d625ab2e5db8441
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390327
Tested-by: SPDK Automated Test System <sys_sgsw@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>
2017-12-05 13:16:57 -05:00
Dariusz Stojaczyk
1a2c100332 Revert "test/vhost/initiator: temporarily disable fio test"
This reverts commit bc5f86e3e9 .

Change-Id: I0cfd05d9b8b05d8607c9ba67cd9ce34f5edcc0de
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/388836
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: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-27 12:18:24 -05:00
Daniel Verkamp
136e7d13c8 test/vhost/initiator: temporarily disable fio test
Until the fio_plugin unload crash is fixed, disable the fio portion of
the tests so that we can re-enable the rest of the bdev/virtio testing.

Change-Id: I8d18fff729262fa88cbc66fce914cf1ff92db83e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388307
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
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-11-21 16:33:55 -05:00
Daniel Verkamp
ec1551c598 test/vhost/initiator: fix discover_bdevs usage
discover_bdevs previously took a port number for the RPC service, but
after commit 6bef902ca5 ("rpc: add default UNIX domain socket listen
address"), running rpc.py with just a -p (port) parameter doesn't have
the expected effect, since the default server_addr is now a UNIX domain
socket path, and the port is ignored.

Change discover_bdevs to accept a socket path instead of a port number
to fix the issue for the vhost/initiator test; no other callers use the
disover_bdevs rpc_port argument, so this is the only instance that needs
to change.

Change-Id: I4e290f175ccc79caa3c4ef76c062641b9fe489a8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388283
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-11-21 16:33:55 -05:00
Jim Harris
6bef902ca5 rpc: add default UNIX domain socket listen address
RPC is a default feature required for almost all usages,
so enable RPC by default, but with a UNIX domain socket
for security reasons.

-r can now be used from the command line to specify
an alternative RPC listen address from the default
/var/tmp/spdk.sock.

Remove the Enable parameter from the Rpc config section
but still allow specifying an alternative listen address
using the Listen parameter as an alternative to the
command line option.  This keeps backward compatibility
for this release for anyone using the configuration file
still.

Remove the Rpc sections from all configuration files
that were using them, except for those that specified
alternate TCP ports for multi-process test cases.  We
can fix these later to use an alternate UNIX domain
socket and to use the command line instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ife0d03fcab638c67b659f1eb85348ddc2b55c4c4
Reviewed-on: https://review.gerrithub.io/386561
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-13 14:57:49 -05:00
Pawel Kaminski
bd34b7d9bb test/vhost: Fix write with verification.
Change is needed because fio job (trim_write_read)
submits unmap first and then write,
but sometimes write finishes before unmap.
It casues that write fails with verification.

Nvm Express 1.3:
"The controller fetches SQ entries in order from the Submission Queue,
however, it may then execute those commands in any order. "

Change-Id: Ia399e5677051c2e2077fe3082ede846a8ac9dd49
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/383436
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-27 13:06:03 -04:00
Pawel Kaminski
29d4d1de08 test/vhost: Fio test for vhost initiator for nvme disk larger than 4G.
Change-Id: I3a017612dcadd519cfd427ba43450fa4d54edfce
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/381150
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-10-27 08:46:06 -04:00
Karol Latecki
957ebeb506 test/vhost: remove read tests from vhost initiator
Removing read and randread from test runs as read operations are
performed as part of write with verify enabled tests.

Slight code cleanup included.

Change-Id: Ia3b92ed16cf4c1b873d0f54a0c0677c52f9b726a
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/383770
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
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-10-26 14:08:21 -04:00
Pawel Kaminski
c5f83bd8f3 test/vhost: Fio test for vhost initiator for unmap
Change-Id: I0bb922d6a135d4b49d2f5f89ec3874251b898090
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/381642
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-19 20:14:50 -04:00
Dariusz Stojaczyk
8b0a4a3c53 bdev_virtio: implement multiqueue
Virtqueues now have to be "acquired"
by a logical CPU core in order to
perform any traffic on them. The
acquire mechanism is thread-safe to
prevent two reactors accessing the
same virtqueue at the same time.

For now a single virtqueue
may be used by only one io_channel.
Support for shared virtqueues will
be implemented in future.

Added new param "Queues" to the
virtio config file for VirtioUser
bdevs. VirtioPci will use the
max available queues num -
negotiated during QEMU startup.

Change-Id: I3fd4b9d8c470f26ca9b84838b3c64de6f9e48300
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/377337
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-16 15:48:09 -04:00
Dariusz Stojaczyk
201c0188ac bdev_virtio: define virtio devs in separate config sections
This is required for adding
optional params for vdevs.

Since virtio-initiator README.md
had to be changed, some outdated
entries from TODO section has
been removed as a part of this
patch as well.

Change-Id: I472a966d8e4166305fb19ad3ab20e53289a1e071
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382347
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-10-12 19:40:19 -04:00
Pawel Kaminski
96bd19093b test/vhost: Fio tests for vhost initiator.
Change-Id: Iad11eef12c0f7f80c26264f65a38df798eae1a27
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/378071
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
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>
2017-10-11 11:10:13 -04:00