From: swise@opengridcomputing.com (Steve Wise)
Subject: [PATCH 1/2] nvme-cli/fabrics: Add keep-alive-tmo param to connect cmd
Date: Tue, 20 Sep 2016 08:01:54 -0700 [thread overview]
Message-ID: <20160920150437.CA26EE0BC1@smtp.ogc.us> (raw)
Added 'keep-alive-tmo' to 'connect' command so users can specify the
keep alive timeout period.
usage examples:
nvme connect --keep-alive-tmo=30 --transport=rdma --traddr=10.0.1.14 --nqn=test-nvme
nvme connect -k 30 -t rdma -a 10.0.1.14 -n test-nvme
Signed-off-by: Steve Wise <swise at opengridcomputing.com>
---
fabrics.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/fabrics.c b/fabrics.c
index 18e961c..bb144bf 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -51,6 +51,7 @@ struct config {
char *trsvcid;
char *hostnqn;
char *nr_io_queues;
+ char *keep_alive_tmo;
char *raw;
char *device;
} cfg = { 0 };
@@ -490,6 +491,14 @@ static int build_options(char *argstr, int max_len)
max_len -= len;
}
+ if (cfg.keep_alive_tmo) {
+ len = snprintf(argstr, max_len, ",keep_alive_tmo=%s", cfg.keep_alive_tmo);
+ if (len < 0)
+ return -EINVAL;
+ argstr += len;
+ max_len -= len;
+ }
+
return 0;
}
@@ -724,6 +733,8 @@ int connect(const char *desc, int argc, char **argv)
"user-defined hostnqn" },
{"nr-io-queues", 'i', "LIST", CFG_STRING, &cfg.nr_io_queues, required_argument,
"number of io queues to use (default is core count)" },
+ {"keep-alive-tmo", 'k', "LIST", CFG_STRING, &cfg.keep_alive_tmo, required_argument,
+ "keep alive timeout period in seconds" },
{0},
};
--
2.7.0
next reply other threads:[~2016-09-20 15:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 15:01 Steve Wise [this message]
2016-09-20 21:55 ` [PATCH 1/2] nvme-cli/fabrics: Add keep-alive-tmo param to connect cmd J Freyensee
2016-09-22 16:46 ` Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160920150437.CA26EE0BC1@smtp.ogc.us \
--to=swise@opengridcomputing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).