Commit Graph

277 Commits

Author SHA1 Message Date
Shuhei Matsumoto
2982a74df9 iscsi&rpc: Add new initiator information to an existing initiator group
Adding new initiator to an existing initiator group to allow login
will be usual. This patch support the following JSON-RPC commands:
- add_initiators_to_initiator_group
- delete_initiators_from_initiator_group

Both initiator's name and netmask are optional but already added
name or netmask cannot be added.

Test code is added too.

Change-Id: Ic101210b9d00c2b36e37ece23fcba8cfe8e44eb8
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/398361
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-02-15 11:28:19 -05:00
Daniel Verkamp
dc6f9571c1 pep8: re-enable E302 (2 blank lines between functions)
This isn't a significant effort to fix, so let's just enable it to move
closer to the official Python PEP 8 guidelines.

Fix up the existing instances where we didn't already have two lines
between functions, and re-enable the pep8 warning.

Change-Id: I9cf5e7e32b9c6dfedbd1b0f9bc92951cbb2c8a0d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/399949
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-02-15 11:10:41 -05:00
Tomasz Zawadzki
af666e303c doc: added graphviz as depenency
Added missing dependency for building docs.

Change-Id: I56a222bca139c4285027bf4901652fdd7905411c
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/399694
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-02-13 13:16:07 -05:00
Jim Harris
26731440ee build: use conditional CC/CXX assignment for generated mk/cc.mk
This ensures that if user specifies an alternate CC/CXX after
cc.mk was already generated, that the build will pick up the
difference, regenerate mk/cc.mk and trigger a rebuild.

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

Reviewed-on: https://review.gerrithub.io/399431
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-12 12:10:49 -05:00
Jim Harris
5d027b5b06 build: fix detect_cc.sh script for icc
icc -v prints out its version string like this:

icc version 18.0.1 (gcc version 5.0.0 compatibility)

detect_cc.sh gets confused and does this in the generated
mk/cc.mk:

CC_TYPE=icc
gcc

So fix detect_cc.sh to only use the first entry with head -1.

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

Reviewed-on: https://review.gerrithub.io/399262
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-12 12:09:21 -05:00
suman chakraborty
49c7451a18 Added fix for IPV6 address family subsystem creation dynamically through rpc.py
Problem
--------------------
Even though rpc.py has the support of IPV6 it was unable to parse IPV6 address family

Solution
-------------------
Instead of creating the key value pair based on all occurrence of “:” operand .
The key value pair is created on the first occurrence of “:” operand.
The above solution works for IPV4 as well as IPV6.

	modified:   scripts/rpc/nvmf.py

Change-Id: Ibdc1c695eed724374fefe265e07958c698b5fb25
Signed-off-by: suman chakraborty <suman.chakraborty@wdc.com>
Reviewed-on: https://review.gerrithub.io/399132
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
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-02-09 12:04:15 -05:00
Jim Harris
75cb574660 build: sort dictionary in genconfig.py before printing
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8a698531b261c303babac3c5c1594919430c0bac

Reviewed-on: https://review.gerrithub.io/398855
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-02-08 12:05:54 -05:00
Ben Walker
47b17299a4 nvmf: Add an rpc to add a namespace to a subsystem
Change-Id: I351c7bda1b32dc161c49d47fb2887595099e4be6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/396696
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-07 23:22:57 -05:00
Daniel Verkamp
9f5970550c nvmf: use "nqn" rather than "subnqn" in RPC param
This fixes the new nvmf_subsystem_add_listener RPC method to use "nqn"
as the parameter name to be consistent with the other NVMe-oF target RPC
methods.

Since this method is brand new, no provision for compatibility with the
old name is provided.

Fixes: 6336217e16 ("nvmf: Add rpc to add listeners to subsystems")
Change-Id: I86263fb1c53ed6ab48fe70917686d78a4a7ce28d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/398870
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-02-07 23:22:57 -05:00
Daniel Verkamp
64465d0dc8 Remove trailing whitespace before \n in printf()
Tree-wide cleanup of all instances of printf()-style functions where a
format string contains a space before a newline character.

Change-Id: Ib5b5861e97bed9e9d62db03875547e3f771f4769
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/397031
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-02-06 11:16:50 -05:00
Ben Walker
6336217e16 nvmf: Add rpc to add listeners to subsystems
The construct_nvmf_subsystem method's "listen_addresses" parameter is
now optional, and new listen addresses may be configured at runtime
using the "nvmf_subsystem_add_listener" method.

Change-Id: Ie0217c5d112e278cc0491a561753f50ed877d842
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/395556
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-02-06 10:29:42 -05:00
Daniel Verkamp
a54e7e584b rpc.py: make 'verbose' a client parameter
Rather than requiring the 'verbose' flag as a parameter to
JSONRPCClient.call(), move it to the JSONRPCClient constructor so that
it can be set once.

This fixes the inconsistency between RPC method wrappers that passed
args.verbose and those that didn't; now, rpc.py -v works reliably for
all methods.

The JSONRPCClient.call() verbose parameter is maintained as well to
allow individual calls to be set to verbose if desired.

Change-Id: Iee385510cc9eb1d2984d3b9982055789dff188c6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/398508
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-02-06 08:54:38 -05:00
Daniel Verkamp
4716d5aabb autotest: detect if nbd module is available
Some distributions may not ship the nbd module; detect whether it can be
loaded rather than just failing if it is missing.

Change-Id: Ib35ba26b211de4e8b85b689ab55fed47bd02a750
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/398097
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>
2018-02-02 12:34:21 -05:00
Tomasz Zawadzki
9856fe06e5 lvol: display details of single lvol store RPC
New optional argument added to get_lvol_stores RPC.
If lvol store name or uuid is provided, details
for this single lvol store is displayed.

It follows similar logic as in get_bdevs or get_nbd_disks.

Change-Id: I11e71d98f3cde869addf5cedeb4f33e5cebf53ea
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/395126
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-31 12:08:04 -05:00
Maciej Szwed
9ed6bedd3e lvol: enable creation of thin provisioned lvols
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ie6a651d0238d09729e28d5456a84ba090faeb465
Reviewed-on: https://review.gerrithub.io/391568
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>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-01-30 17:29:53 -05:00
Daniel Verkamp
f038ee68fd rpc.py: import print_dict for get_rpc_methods
get_rpc_methods needs print_dict to be explicitly imported from client.

Change-Id: I5563e88a6ae05071cde7323421910760074de235
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/396470
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: Changpeng Liu <changpeng.liu@intel.com>
2018-01-26 12:13:15 -05:00
Ben Walker
4dd3f4a7fa rpc: Break rpc client into individual python files
The top level client is unchanged. This is primarily just
moving code around. The client.py file is the only location
with new code, which converts the old jsonrpc_call function
into a class.

Change-Id: I5fb7cd48f77f6affa3d9439128009bf63148acda
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/364316
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-01-25 10:24:46 -05:00
Dariusz Stojaczyk
8be76f8589 setup.sh: hide SKIP_PCI from public help
Instead, PCI_WHITELIST="none" can now be used.
SKIP_PCI continues to work, but is undocumented.

Change-Id: Id4a7959716f6bca92be0da761258c84f32aca8b5
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/395946
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-01-24 16:45:09 -05:00
Dariusz Stojaczyk
2a68832d5c setup.sh: obey PCI_WHITELIST in ./setup.sh reset
It is now possible to reset only
particular PCI devices.

Change-Id: Ic45be5e7e16cf4736c742b14fc0d709788a3b3f1
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/395945
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-01-24 16:45:09 -05:00
Daniel Verkamp
e489ca69f6 setup.sh: add virtio device names to status output
Change-Id: I0f6e1d8df9480538e2dc39cf658396d4ecd14daa
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393724
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-01-23 23:59:12 -05:00
Dariusz Stojaczyk
3779dda48b setup.sh: change NVME_WHITELIST to PCI_WHITELIST
NVME_WHITELIST param remains to work, but is now
undocumented. PCI_WHITELIST will apply to all PCI
devices - NVMe, IO/AT and Virtio.

Change-Id: I782f48bea68079c63e4a2794e4a4eb8f9a7226c9
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/395944
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-01-23 23:44:06 -05:00
Dariusz Stojaczyk
f8c1c71c2e setup.sh: support multiple hugetlb mountpoints
We used to crash when `mount` returned
multiple hugetlb mountpoints.

Change-Id: I75717c2c394204bdfec730edabb9ff6386047742
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/395926
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-01-23 23:44:06 -05:00
Dariusz Stojaczyk
4b42897985 setup.sh: fix chown
Patch da7e3bb8 [1] disabled chown for vfio
groups and hugepage mountpoints. Chown code
was never being executed.

[1] da7e3bb8 ("setup.sh: replace username param with TARGET_USER env
variable")

Change-Id: Ie5c9ac42fca5b60c72ced501d4065842a5bef9cd
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/395925
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-01-23 23:44:06 -05:00
Dariusz Stojaczyk
0d6a37c7d9 bdev/virtio/rpc: add RPC to attach virtio-pci device
`rpc.py construct_virtio_pci_scsi_bdev <bdf> <name>`

The RPC internals reuse the struct definition and callback
functions from virtio-user equivalents

Change-Id: I0c6c49d8481565a49ec9460a633696d27d55367a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/394447
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
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-01-23 22:49:21 -05:00
Shuhei Matsumoto
632f0ced75 iscsi/rpc: Set processor affinity of connection through JSON-RPC
Currently setting cpumask to portal is possible only through
iSCSI.conf. This patch makes possible for any user to set cpumask
through JSON-RPC too.

The following are done in this patch:
- To keep compatibility, cpumask parameter handled as optional.
- Python test code is added.
- Current python script for JSON-RPC does not work correctly for
  IPv6 and the issue is fixed.

Change-Id: I42ef397ce95040a36db4430417a35e9e97527477
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/391728
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>
2018-01-22 15:54:48 -05:00
Dariusz Stojaczyk
5f247660d7 setup.sh: add help message
```
./scripts/setup.sh help
```

Change-Id: I4804f032861f949be3e541456f1df55b64937909
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/394807
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>
2018-01-19 15:52:59 -05:00
Dariusz Stojaczyk
da7e3bb880 setup.sh: replace username param with TARGET_USER env variable
Make it configurable the same way as other options.
setup.sh will configure hugepages and vfio for the
current user by default. To specify other user,
set TARGET_USER variable.

Change-Id: Ib98178a70a007bec761f7465689c2150e8844ffb
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/394806
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-01-19 15:52:59 -05:00
Shuhei Matsumoto
afc97ddcf7 iscsi/rpc: Configure Header/Data digest through JSON-RPC
This patch makes possible to set and get Header Digest and Data
Digest of target.

Change-Id: I1d1b892f9dfb747c0f5ad8fc4fddef40929b4143
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/394482
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>
2018-01-17 12:41:29 -05:00
Shuhei Matsumoto
f04569140c rpc/iscsi: Adding an LUN to an existing target
Add JSON-RPC to add an LUN to an existing target. The parameter
lun_id is optinal and if skipped, the lowest free LUN ID will be
assigned.

This JSON-RPC is tested in iscsi_tgt/rpc_config.

Change-Id: I010619f2d4ccec89c589bb0618466b4d15949ebb
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/385181
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-01-17 12:41:29 -05:00
Stephen Bates
5c13f5ae6d setup.sh: Add support for NVMe whitelisting
In some cases we may not want to assign all PCIe NVMe controllers in a
system to SPDK. Add a new input to the setup.sh script called
NVME_WHITELIST which whitelists (via PCIe slot ID) the NVMe
controllers you wish to add to SPDK.

If the NVME_WHITELIST input argument is not defined then all PCIe NVMe
controllers will be added. The values in the whitelist whould be
white-space seperated and the entire list should be enclosed in double
quotes ("").

To blacklist all PCIe NVMe devices use a non-valid PCIe slot ID
(e.g. the string "none" would work very well).

Examples:

NVME_WHITELIST="0000:02:00.0" ./setup.sh
NVME_WHITELIST="0000:08:00.0 0000:06:00.1" ./setup.sh
NVME_WHITELIST="none" ./setup.sh

Change-Id: If6ebb04307180cbac11fc41cd9a70749640bc598
Signed-off-by: Stephen Bates <sbates@raithlin.com>
Reviewed-on: https://review.gerrithub.io/394303
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-17 10:09:44 -05:00
Dariusz Stojaczyk
5b057b3a05 bdev/virtio/scsi: added RPC to remove vdevs
`rpc.py remove_virtio_scsi_bdev <name>`

The RPC will remove entire Virtio SCSI device together
with all underlying bdevs.

Change-Id: I87f349b0e7543955d54a34406cf73c4a91d1495f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/394170
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-16 19:13:32 -05:00
Shuhei Matsumoto
583e969922 scsi: remove lun name
There is no need to keep a lun name anymore - we always
use the bdev name as the lun name so it is not providing any
additional value. This also keeps us from associating
the same bdev with different LUNs on different iSCSI target
nodes or vhost-scsi controllers.

Side effect of this change is:

1) Use "bdev_name" across the APIs to make it more clear
   what these names refer to.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3d42fde22087352ce1d5dc80178bd8c5cac8cb7c
Reviewed-on: https://review.gerrithub.io/390843
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-11 18:37:34 -05:00
Daniel Verkamp
4393f43fbe setup.sh: fix NVMe status on older kernels
Very old kernels (e.g. 3.13 from Ubuntu 14.04) don't have the nvme
directory in /sys/bus/pci/devices/$bdf/, so check for its existence
before trying to list it.

Change-Id: I1f1ca04c71de6359de2b924fb9437ad03c56523b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393725
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-01-09 15:53:21 -05:00
Pawel Wodkowski
a862d1cdd6 scsi: remove lun_db
Change-Id: Icc40b66cd0c6f63242bc3d3f26b34f323450c570
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393501
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-09 13:56:00 -05:00
Ben Walker
58d46f298f scripts: Add reset option to prep_benchmarks.sh
This undoes what it reasonably can.

Change-Id: I83ff6d652fbf8b717432bef874003987fe87bfc6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/393685
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-01-09 13:40:59 -05:00
Ben Walker
d567945064 scripts: Fix typo in prep_benchmarks.sh
There was was an extra word.

Change-Id: I51d09c7485840caa11a06627269654877f1f13fb
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/393831
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-01-09 13:40:59 -05:00
Ben Walker
7343354b3e scripts: Disable turbo boost in prep_benchmarks.sh
This reduces the potential for jitter.

Change-Id: I736aceec7551be7033c8d2a6f433c64aba1903c0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/393830
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-01-09 13:40:59 -05:00
Ben Walker
5318d33318 scripts: Move logic in prep_benchmarks.sh into a function
This prepares for adding the ability to undo the setup.

Change-Id: Ie3fa3a76715663d9785a1d2f9d88ab20e0d07dce
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/393829
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-01-09 13:40:59 -05:00
Dariusz Stojaczyk
9c44fad7e7 setup.sh: don't bind controllers with only *some* devices mounted
This makes us iterate through all devices
on a controller and check if any of those
is mounted. Previously we only checked the
very first device, which is obviously
insufficient.

Change-Id: I776846b931480d1e0a059137950c21f057ecb710
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/393749
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-05 14:33:10 -05:00
Jim Harris
2fd36c9b25 pkgdep.sh: add sg3_utils
This is used for testing - not as part of the build - but we
already have astyle and pep8 in pkgdep.sh so adding sg3_utils
seems OK.

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

Reviewed-on: https://review.gerrithub.io/393693
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: Changpeng Liu <changpeng.liu@intel.com>
2018-01-05 12:19:56 -05:00
Dariusz Stojaczyk
f869082a91 setup.sh: don't bind virtio-pci devices with active mountpoints
Change-Id: I92aeb8259383fa3e207e6ab3059109f8275bc549
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/393684
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-01-04 15:29:25 -05:00
Jim Harris
4ee8322439 test: allow specifying RUN_NIGHTLY from command line
This can be useful when running nightly tests locally.

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

Reviewed-on: https://review.gerrithub.io/393681
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>
2018-01-04 12:30:59 -05:00
Daniel Verkamp
f0c2093477 scripts: factor out iter_pci helper functions
Add a new file, scripts/common.sh, that can be shared between not only
autotest scripts, but also scripts/setup.sh, scripts/gen_nvme.sh, etc.,
and move the PCI iteration functions there.

The iterators are also expanded to work identically for both dev_id and
class_code on Linux and FreeBSD.

Change-Id: I98423cd06242e78535f5da4fce82166812ea96a8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393416
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-01-03 14:09:22 -05:00
Xiaodong Liu
450ffbc63a nbd: part bdev through bdev_svc
Change-Id: I667df64dd2363c606f39b52c0411c6ba7f55d5ba
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/391370
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-21 13:23:25 -05:00
Seth Howell
710d59a533 autotest_common: Set RUN_ASAN and RUN_UBSAN to 0 on freeBSD
Change-Id: I4cafed913417ce86155a737ef3ecc2ee15fad07c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/392255
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-12-21 12:29:35 -05:00
Karol Latecki
233c5189ab test/vhost: refactor lvol test
- Removing hardcoded lvol bdevs and blk controller sizes
Lvol bdevs will now be created with roughly equal size based on
size of used NVMe backend
- Create lvol structures and VMs setup independently

Change-Id: Ib1cfe1b60033200a9896fa0c8d1b17af41ea0eb1
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/390983
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-12-20 11:39:34 -05:00
Ben Walker
7b397f6281 nvmf: No longer tie subsystems to CPU cores
The "Core" parameter in the configuration file has been removed. New
connections are handed out to available cores using round-robin.

Change-Id: I24527fa22a0b2738ebbf5fb030e3bb373ead5da2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/388295
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-12-15 16:26:33 -05:00
Dariusz Stojaczyk
1bcc289ef7 scripts/check_format: ignore POSIX includes in include/linux
Ignore them in order to be able to
keep linux headers 1:1.

Change-Id: I49a26012a5f0acdd10351eacdf8cb052c44a4044
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/388194
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
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>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-15 13:16:47 -05:00
Shuhei Matsumoto
06beb0249f iscsi/rpc&test/iscsi_tgt: get iSCSI global params
SPDK does not provide casual way to get iSCSI global parameters
set by iSCSI.conf. Hence test/iscsi_tgt have to use hard-coded
value for iSCSI target's nodebase.

NVMeOF provide similar JSON-RPC dump_nvmf_subsystem().

Change-Id: I1a53572f707e83cfd18369475b2565c6390a4d2d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/391323
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-12-14 11:30:05 -05:00
Jim Harris
474fcf64b2 test: remove all uses of strcpy in the code
Then also add a check in check_format.sh and fail if
a new instance is found again.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia35c343e1b7bb44b3b5f4f8484adb9e0d5702d67
Reviewed-on: https://review.gerrithub.io/390916
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>
2017-12-12 17:34:45 -05:00