scripts/perf: use additional kernel NVMe-oF initiator params

Add configuration option "extra params" to run kernel initiator
with nvme connect options like -i, -I, -D, etc.

Change-Id: I01d9fd0ed15dc5607f0c0f58d97581c5e0b821ba
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477767
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Karol Latecki 2019-12-12 11:18:36 +01:00 committed by Tomasz Zawadzki
parent f610df8d52
commit f1d0fc75cf
3 changed files with 13 additions and 2 deletions

View File

@ -54,6 +54,9 @@ by default. Not used if "mode" is set to "spdk".
### fio_bin
Path to the fio binary that will be used to compile SPDK and run the test.
If not specified, then the script will use /usr/src/fio/fio as the default.
### extra_params
Space separated string with additional settings for "nvme connect" command
other than -t, -s, -n and -a.
## fio
Fio job parameters.

View File

@ -17,7 +17,8 @@
"nic_ips": ["192.0.1.1"],
"mode": "spdk",
"nvmecli_dir": "/path/to/nvmecli",
"fio_dir": "/path/to/fio binary"
"fio_dir": "/path/to/fio binary",
"extra_params": "Extra nvme connect params"
},
"initiator2": {
"ip": "10.0.0.2",

View File

@ -573,6 +573,10 @@ class KernelInitiator(Initiator):
super(KernelInitiator, self).__init__(name, username, password, mode, nic_ips, ip, transport,
fio_bin=fio_bin)
self.extra_params = ""
if kwargs["extra_params"]:
self.extra_params = kwargs["extra_params"]
def __del__(self):
self.ssh_connection.close()
@ -581,7 +585,10 @@ class KernelInitiator(Initiator):
self.log_print("Below connection attempts may result in error messages, this is expected!")
for subsystem in subsystems:
self.log_print("Trying to connect %s %s %s" % subsystem)
self.remote_call("sudo %s connect -t %s -s %s -n %s -a %s" % (self.nvmecli_bin, self.transport, *subsystem))
self.remote_call("sudo %s connect -t %s -s %s -n %s -a %s %s" % (self.nvmecli_bin,
self.transport,
*subsystem,
self.extra_params))
time.sleep(2)
def kernel_init_disconnect(self, address_list, subsys_no):