test/common: Add bdev_nvme_set_options before "bdev_nvme_attach_controller".

This patch is base on the patch about adding item "keep_alive_timeout_ms".
exposing bdev_nvme_set_options this method that existed but not used.

If we meet the keep alive timeout issue or some intermittent failure, we can
change the keep alive timer from host side. This is also an example to
demonstrate some special items that we can finetune.

Our host app is using json config, which gets config from the target side and
overwrite it .
Exposing this bdev_nvme_set_options that users can quickly change the setting
to fit the real testing environment. Strictly it's not a bug of target, just
make it more compatible.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ic1e8a2757dd5ed359500e1692f16e448fab0d4fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5333
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
yidong0635 2020-11-30 11:52:44 -05:00 committed by Tomasz Zawadzki
parent 750cfa17ab
commit decdfa0b22

View File

@ -379,6 +379,23 @@ function gen_nvmf_target_json() {
{
"subsystem": "bdev",
"config": [
{
"method": "bdev_nvme_set_options",
"params": {
"action_on_timeout": "none",
"timeout_us": 0,
"retry_count": 4,
"arbitration_burst": 0,
"low_priority_weight": 0,
"medium_priority_weight": 0,
"high_priority_weight": 0,
"nvme_adminq_poll_period_us": 10000,
"keep_alive_timeout_ms" : 10000,
"nvme_ioq_poll_period_us": 0,
"io_queue_requests": 0,
"delay_cmd_submit": true
}
},
$(
IFS=","
printf '%s\n' "${config[*]}"