linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] nvme-cli/fabrics: Add keep-alive-tmo param to connect cmd
@ 2016-09-20 15:01 Steve Wise
  2016-09-20 21:55 ` J Freyensee
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Wise @ 2016-09-20 15:01 UTC (permalink / 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 1/2] nvme-cli/fabrics: Add keep-alive-tmo param to connect cmd
  2016-09-20 15:01 [PATCH 1/2] nvme-cli/fabrics: Add keep-alive-tmo param to connect cmd Steve Wise
@ 2016-09-20 21:55 ` J Freyensee
  2016-09-22 16:46   ` Keith Busch
  0 siblings, 1 reply; 3+ messages in thread
From: J Freyensee @ 2016-09-20 21:55 UTC (permalink / raw)


On Tue, 2016-09-20@08:01 -0700, Steve Wise wrote:
> 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>
>?

Looks good to me,
Reviewed-by: Jay Freyensee <james_p_freyensee at linux.intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] nvme-cli/fabrics: Add keep-alive-tmo param to connect cmd
  2016-09-20 21:55 ` J Freyensee
@ 2016-09-22 16:46   ` Keith Busch
  0 siblings, 0 replies; 3+ messages in thread
From: Keith Busch @ 2016-09-22 16:46 UTC (permalink / raw)


On Tue, Sep 20, 2016@02:55:53PM -0700, J Freyensee wrote:
> On Tue, 2016-09-20@08:01 -0700, Steve Wise wrote:
> > 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>
> >?
> 
> Looks good to me,
> Reviewed-by: Jay Freyensee <james_p_freyensee at linux.intel.com>

Thanks, I've applied both patches in this series. I had to slightly
modify the patches to apply on the master branch due to some code
formatting changes.

Now that I look at it, I actually think the code format was nicer before
the cleanups, but that's okay. :)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-22 16:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-20 15:01 [PATCH 1/2] nvme-cli/fabrics: Add keep-alive-tmo param to connect cmd Steve Wise
2016-09-20 21:55 ` J Freyensee
2016-09-22 16:46   ` Keith Busch

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).