nvme/perf: Make it possible to disable keep alive.
There was an assignment in perf that prevented the user from actually disabling keep_alive. If the user specified 0, it would get overridden by the default opts value. So set the global in perf to a reasonable value, and always use that value when setting the keep alive timeout. Change-Id: I2eba14525613d679d7def29cc9ed312851cae156 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473059 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
af7be0acec
commit
b35dfa2bd2
@ -220,7 +220,8 @@ static bool g_warn;
|
||||
static bool g_header_digest;
|
||||
static bool g_data_digest;
|
||||
static bool g_no_shn_notification = false;
|
||||
static uint32_t g_keep_alive_timeout_in_ms = 0;
|
||||
/* Default to 10 seconds for the keep alive value. This value is arbitrary. */
|
||||
static uint32_t g_keep_alive_timeout_in_ms = 10000;
|
||||
|
||||
static const char *g_core_mask;
|
||||
|
||||
@ -1871,8 +1872,7 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
/* Set the header and data_digest */
|
||||
opts->header_digest = g_header_digest;
|
||||
opts->data_digest = g_data_digest;
|
||||
opts->keep_alive_timeout_ms = spdk_max(opts->keep_alive_timeout_ms,
|
||||
g_keep_alive_timeout_in_ms);
|
||||
opts->keep_alive_timeout_ms = g_keep_alive_timeout_in_ms;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user