Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:FrontRunner
nvme-cli.24266
0001-fabrics-ensure-zero-kato-for-non-persisten...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-fabrics-ensure-zero-kato-for-non-persistent-controllers.patch of Package nvme-cli.24266
From: Martin George <marting@netapp.com> Date: Wed, 3 Mar 2021 11:49:19 +0530 Subject: [PATCH] fabrics: ensure zero kato for non-persistent controllers References: bsc#1182591 Git-commit: a67d001330ae1c407aa4f8491436bb2d0128d47f Add a helper function that sets the default kato value for the discovery controllers. Along with ensuring a non-zero kato value (i.e. NVMF_DEF_DISC_TMO) is passed to a persistent discovery controller, it also ensures a zero kato value is passed to a non-persistent discovery controller, as mandated by the NVMe spec. Signed-off-by: Martin George <marting@netapp.com> --- fabrics.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) --- a/fabrics.c +++ b/fabrics.c @@ -911,6 +911,16 @@ static int build_options(char *argstr, i return 0; } +static void set_discovery_kato(struct config *cfg) +{ + /* Set kato to NVMF_DEF_DISC_TMO for persistent controllers */ + if (cfg->persistent && !cfg->keep_alive_tmo) + cfg->keep_alive_tmo = NVMF_DEF_DISC_TMO; + /* Set kato to zero for non-persistent controllers */ + else if (!cfg->persistent && (cfg->keep_alive_tmo > 0)) + cfg->keep_alive_tmo = 0; +} + static void discovery_trsvcid(struct config *cfg) { if (!strcmp(cfg->transport, "tcp")) { @@ -1392,8 +1402,7 @@ static int discover_from_conf_file(const if (err) goto free_and_continue; - if (cfg.persistent && !cfg.keep_alive_tmo) - cfg.keep_alive_tmo = NVMF_DEF_DISC_TMO; + set_discovery_kato(&cfg); if (traddr_is_hostname(&cfg)) { ret = hostname2traddr(&cfg); @@ -1467,8 +1476,7 @@ int fabrics_discover(const char *desc, i if (!cfg.transport && !cfg.traddr) { ret = discover_from_conf_file(desc, argstr, opts, connect); } else { - if (cfg.persistent && !cfg.keep_alive_tmo) - cfg.keep_alive_tmo = NVMF_DEF_DISC_TMO; + set_discovery_kato(&cfg); if (traddr_is_hostname(&cfg)) { ret = hostname2traddr(&cfg);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor