* [PATCH] nvme-cli/fabrics: Add ctrl-loss-tmo param to connect cmd
@ 2017-08-13 15:45 Max Gurtovoy
2017-08-14 19:17 ` Keith Busch
0 siblings, 1 reply; 2+ messages in thread
From: Max Gurtovoy @ 2017-08-13 15:45 UTC (permalink / raw)
From: Nitzan Carmi <nitzanc@mellanox.com>
Added 'ctrl-loss-tmo' to 'connect' command so users can specify the
controller lost timeout period.
usage examples:
nvme connect --ctrl-loss-tmo=0 --transport=rdma --traddr=10.0.1.1 --nqn=test-nvme
nvme connect -l 0 -t rdma -a 10.0.1.1 -n test_nvme
Signed-off-by: Nitzan Carmi <nitzanc at mellanox.com>
Reviewed-by: Max Gurtovoy <maxg at mellanox.com>
---
fabrics.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/fabrics.c b/fabrics.c
index 9ed1127..4871e17 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -58,6 +58,7 @@ static struct config {
char *queue_size;
char *keep_alive_tmo;
char *reconnect_delay;
+ char *ctrl_loss_tmo;
char *raw;
char *device;
} cfg = { NULL };
@@ -585,6 +586,14 @@ static int build_options(char *argstr, int max_len)
max_len -= len;
}
+ if (cfg.ctrl_loss_tmo) {
+ len = snprintf(argstr, max_len, ",ctrl_loss_tmo=%s", cfg.ctrl_loss_tmo);
+ if (len < 0)
+ return -EINVAL;
+ argstr += len;
+ max_len -= len;
+ }
+
return 0;
}
@@ -863,6 +872,7 @@ int connect(const char *desc, int argc, char **argv)
{"queue-size", 'Q', "LIST", CFG_STRING, &cfg.queue_size, required_argument, "number of io queue elements to use (default 128)" },
{"keep-alive-tmo", 'k', "LIST", CFG_STRING, &cfg.keep_alive_tmo, required_argument, "keep alive timeout period in seconds" },
{"reconnect-delay", 'c', "LIST", CFG_STRING, &cfg.reconnect_delay, required_argument, "reconnect timeout period in seconds" },
+ {"ctrl-loss-tmo", 'l', "LIST", CFG_STRING, &cfg.ctrl_loss_tmo, required_argument, "controller loss timeout period in seconds" },
{NULL},
};
--
2.9.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] nvme-cli/fabrics: Add ctrl-loss-tmo param to connect cmd
2017-08-13 15:45 [PATCH] nvme-cli/fabrics: Add ctrl-loss-tmo param to connect cmd Max Gurtovoy
@ 2017-08-14 19:17 ` Keith Busch
0 siblings, 0 replies; 2+ messages in thread
From: Keith Busch @ 2017-08-14 19:17 UTC (permalink / raw)
On Sun, Aug 13, 2017@06:45:04PM +0300, Max Gurtovoy wrote:
> From: Nitzan Carmi <nitzanc at mellanox.com>
>
> Added 'ctrl-loss-tmo' to 'connect' command so users can specify the
> controller lost timeout period.
>
> usage examples:
> nvme connect --ctrl-loss-tmo=0 --transport=rdma --traddr=10.0.1.1 --nqn=test-nvme
> nvme connect -l 0 -t rdma -a 10.0.1.1 -n test_nvme
>
> Signed-off-by: Nitzan Carmi <nitzanc at mellanox.com>
> Reviewed-by: Max Gurtovoy <maxg at mellanox.com>
Looks good, applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-14 19:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-13 15:45 [PATCH] nvme-cli/fabrics: Add ctrl-loss-tmo param to connect cmd Max Gurtovoy
2017-08-14 19:17 ` Keith Busch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.