nvme-cli/fabrics: Add ctrl-loss-tmo param to connect cmd
PATCH 1/1 nvme-cli/fabrics: Add ctrl-loss-tmo param to connect cmd
From: Nitzan Carmi <[email protected]>
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(+)
fabrics.c +10 -0
@@ -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}, };
Signature · 1 line
2.9.4
PATCH 1/1 nvme-cli/fabrics: Add ctrl-loss-tmo param to connect cmd
Quoted 11 lines · Max Gurtovoy
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 -ntest_nvmeSigned-off-by Nitzan Carmi <nitzanc at mellanox.com>Reviewed-by Max Gurtovoy <maxg at mellanox.com>
Looks good, applied.