From decdfa0b2299fe5bffc6f6ae1c56ab8f28a90c9d Mon Sep 17 00:00:00 2001 From: yidong0635 Date: Mon, 30 Nov 2020 11:52:44 -0500 Subject: [PATCH] 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 Change-Id: Ic1e8a2757dd5ed359500e1692f16e448fab0d4fb Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5333 Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Shuhei Matsumoto --- test/nvmf/common.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/nvmf/common.sh b/test/nvmf/common.sh index 2d239ae8a..90e9d9ec6 100644 --- a/test/nvmf/common.sh +++ b/test/nvmf/common.sh @@ -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[*]}"