* [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command
@ 2016-08-26 15:56 Steve Wise
2016-08-26 21:45 ` Keith Busch
2016-08-29 4:11 ` J Freyensee
0 siblings, 2 replies; 11+ messages in thread
From: Steve Wise @ 2016-08-26 15:56 UTC (permalink / raw)
Added 'nr_io_queues' to 'connect' command so users can specify the number
of io queues to allocate.
usage example:
nvme connect -t rdma -Q 8 -s 4420 -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 942e987..4fc5a40 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -50,6 +50,7 @@ struct config {
char *traddr;
char *trsvcid;
char *hostnqn;
+ char *nr_io_queues;
char *raw;
char *device;
} cfg = { 0 };
@@ -481,6 +482,14 @@ static int build_options(char *argstr, int max_len)
max_len -= len;
}
+ if (cfg.nr_io_queues) {
+ len = snprintf(argstr, max_len, ",nr_io_queues=%s", cfg.nr_io_queues);
+ if (len < 0)
+ return -EINVAL;
+ argstr += len;
+ max_len -= len;
+ }
+
return 0;
}
@@ -713,6 +722,8 @@ int connect(const char *desc, int argc, char **argv)
"transport service id (e.g. IP port)" },
{"hostnqn", 'q', "LIST", CFG_STRING, &cfg.hostnqn, required_argument,
"user-defined hostnqn" },
+ {"nr_io_queues", 'Q', "LIST", CFG_STRING, &cfg.nr_io_queues, required_argument,
+ "number of io queues to use (default is core count)" },
{0},
};
--
2.7.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command
2016-08-26 15:56 [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command Steve Wise
@ 2016-08-26 21:45 ` Keith Busch
2016-08-29 14:41 ` Steve Wise
2016-08-29 4:11 ` J Freyensee
1 sibling, 1 reply; 11+ messages in thread
From: Keith Busch @ 2016-08-26 21:45 UTC (permalink / raw)
On Fri, Aug 26, 2016@08:56:52AM -0700, Steve Wise wrote:
> Added 'nr_io_queues' to 'connect' command so users can specify the number
> of io queues to allocate.
Purely as a matter of consistency here, every other long-format option
in this program uses dash '-' instead of underscore '_' as a multi-word
separator. Let's stick with that. It works for 'git'. :)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command
2016-08-26 15:56 [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command Steve Wise
2016-08-26 21:45 ` Keith Busch
@ 2016-08-29 4:11 ` J Freyensee
2016-08-29 8:02 ` Christoph Hellwig
2016-08-29 14:40 ` Steve Wise
1 sibling, 2 replies; 11+ messages in thread
From: J Freyensee @ 2016-08-29 4:11 UTC (permalink / raw)
On Fri, 2016-08-26@08:56 -0700, Steve Wise wrote:
> Added 'nr_io_queues' to 'connect' command so users can specify the
> number
> of io queues to allocate.
>
> usage example:
>
> nvme connect -t rdma -Q 8 -s 4420 -a 10.0.1.14 -n test-nvme
I was just wondering if there could be another lower-case letter flag
option we could use other than capital Q. ?Just looking at the example
above, it looks a tad out-of-place.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command
2016-08-29 4:11 ` J Freyensee
@ 2016-08-29 8:02 ` Christoph Hellwig
2016-08-29 14:43 ` Steve Wise
2016-08-29 14:40 ` Steve Wise
1 sibling, 1 reply; 11+ messages in thread
From: Christoph Hellwig @ 2016-08-29 8:02 UTC (permalink / raw)
On Sun, Aug 28, 2016@09:11:42PM -0700, J Freyensee wrote:
> On Fri, 2016-08-26@08:56 -0700, Steve Wise wrote:
> > Added 'nr_io_queues' to 'connect' command so users can specify the
> > number
> > of io queues to allocate.
> >
> > usage example:
> >
> > nvme connect -t rdma -Q 8 -s 4420 -a 10.0.1.14 -n test-nvme
>
> I was just wondering if there could be another lower-case letter flag
> option we could use other than capital Q. ??Just looking at the example
> above, it looks a tad out-of-place.
-q would be nice. For that'd we need to rename the hostnqn one, but as
stated before I think -q is really misnamed for that anyway..
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command
2016-08-29 4:11 ` J Freyensee
2016-08-29 8:02 ` Christoph Hellwig
@ 2016-08-29 14:40 ` Steve Wise
2016-08-29 15:13 ` J Freyensee
1 sibling, 1 reply; 11+ messages in thread
From: Steve Wise @ 2016-08-29 14:40 UTC (permalink / raw)
>
> On Fri, 2016-08-26@08:56 -0700, Steve Wise wrote:
> > Added 'nr_io_queues' to 'connect' command so users can specify the
> > number
> > of io queues to allocate.
> >
> > usage example:
> >
> > nvme connect -t rdma -Q 8 -s 4420 -a 10.0.1.14 -n test-nvme
>
> I was just wondering if there could be another lower-case letter flag
> option we could use other than capital Q. Just looking at the example
> above, it looks a tad out-of-place.
'-i' ? Any other suggestions?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command
2016-08-26 21:45 ` Keith Busch
@ 2016-08-29 14:41 ` Steve Wise
0 siblings, 0 replies; 11+ messages in thread
From: Steve Wise @ 2016-08-29 14:41 UTC (permalink / raw)
> > Added 'nr_io_queues' to 'connect' command so users can specify the number
> > of io queues to allocate.
>
> Purely as a matter of consistency here, every other long-format option
> in this program uses dash '-' instead of underscore '_' as a multi-word
> separator. Let's stick with that. It works for 'git'. :)
Will do.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command
2016-08-29 8:02 ` Christoph Hellwig
@ 2016-08-29 14:43 ` Steve Wise
2016-08-29 15:05 ` Steve Wise
0 siblings, 1 reply; 11+ messages in thread
From: Steve Wise @ 2016-08-29 14:43 UTC (permalink / raw)
> On Sun, Aug 28, 2016@09:11:42PM -0700, J Freyensee wrote:
> > On Fri, 2016-08-26@08:56 -0700, Steve Wise wrote:
> > > Added 'nr_io_queues' to 'connect' command so users can specify the
> > > number
> > > of io queues to allocate.
> > >
> > > usage example:
> > >
> > > nvme connect -t rdma -Q 8 -s 4420 -a 10.0.1.14 -n test-nvme
> >
> > I was just wondering if there could be another lower-case letter flag
> > option we could use other than capital Q. ??Just looking at the example
> > above, it looks a tad out-of-place.
>
> -q would be nice. For that'd we need to rename the hostnqn one, but as
> stated before I think -q is really misnamed for that anyway..
-h for hostnqn?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command
2016-08-29 14:43 ` Steve Wise
@ 2016-08-29 15:05 ` Steve Wise
2016-08-29 15:09 ` Steve Wise
2016-08-29 15:14 ` J Freyensee
0 siblings, 2 replies; 11+ messages in thread
From: Steve Wise @ 2016-08-29 15:05 UTC (permalink / raw)
> > On Sun, Aug 28, 2016@09:11:42PM -0700, J Freyensee wrote:
> > > On Fri, 2016-08-26@08:56 -0700, Steve Wise wrote:
> > > > Added 'nr_io_queues' to 'connect' command so users can specify the
> > > > number
> > > > of io queues to allocate.
> > > >
> > > > usage example:
> > > >
> > > > nvme connect -t rdma -Q 8 -s 4420 -a 10.0.1.14 -n test-nvme
> > >
> > > I was just wondering if there could be another lower-case letter flag
> > > option we could use other than capital Q. ??Just looking at the example
> > > above, it looks a tad out-of-place.
> >
> > -q would be nice. For that'd we need to rename the hostnqn one, but as
> > stated before I think -q is really misnamed for that anyway..
>
> -h for hostnqn?
Oops... -h is 'help' :)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command
2016-08-29 15:05 ` Steve Wise
@ 2016-08-29 15:09 ` Steve Wise
2016-08-29 15:14 ` J Freyensee
1 sibling, 0 replies; 11+ messages in thread
From: Steve Wise @ 2016-08-29 15:09 UTC (permalink / raw)
> > > > > usage example:
> > > > >
> > > > > nvme connect -t rdma -Q 8 -s 4420 -a 10.0.1.14 -n test-nvme
> > > >
> > > > I was just wondering if there could be another lower-case letter flag
> > > > option we could use other than capital Q. ??Just looking at the example
> > > > above, it looks a tad out-of-place.
> > >
> > > -q would be nice. For that'd we need to rename the hostnqn one, but as
> > > stated before I think -q is really misnamed for that anyway..
> >
> > -h for hostnqn?
>
> Oops... -h is 'help' :)
Could use -i for nr-io-queues...
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command
2016-08-29 14:40 ` Steve Wise
@ 2016-08-29 15:13 ` J Freyensee
0 siblings, 0 replies; 11+ messages in thread
From: J Freyensee @ 2016-08-29 15:13 UTC (permalink / raw)
On Mon, 2016-08-29@09:40 -0500, Steve Wise wrote:
> >
> >
> > On Fri, 2016-08-26@08:56 -0700, Steve Wise wrote:
> > >
> > > Added 'nr_io_queues' to 'connect' command so users can specify
> > > the
> > > number
> > > of io queues to allocate.
> > >
> > > usage example:
> > >
> > > nvme connect -t rdma -Q 8 -s 4420 -a 10.0.1.14 -n test-nvme
> >
> > I was just wondering if there could be another lower-case letter
> > flag
> > option we could use other than capital Q.??Just looking at the
> > example
> > above, it looks a tad out-of-place.
>
> '-i' ???Any other suggestions?
Sounds fine to me.
>
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command
2016-08-29 15:05 ` Steve Wise
2016-08-29 15:09 ` Steve Wise
@ 2016-08-29 15:14 ` J Freyensee
1 sibling, 0 replies; 11+ messages in thread
From: J Freyensee @ 2016-08-29 15:14 UTC (permalink / raw)
On Mon, 2016-08-29@10:05 -0500, Steve Wise wrote:
> >
> > >
> > > On Sun, Aug 28, 2016@09:11:42PM -0700, J Freyensee wrote:
> > > >
> > > > On Fri, 2016-08-26@08:56 -0700, Steve Wise wrote:
> > > > >
> > > > > Added 'nr_io_queues' to 'connect' command so users can
> > > > > specify the
> > > > > number
> > > > > of io queues to allocate.
> > > > >
> > > > > usage example:
> > > > >
> > > > > nvme connect -t rdma -Q 8 -s 4420 -a 10.0.1.14 -n test-nvme
> > > >
> > > > I was just wondering if there could be another lower-case
> > > > letter flag
> > > > option we could use other than capital Q. ??Just looking at the
> > > > example
> > > > above, it looks a tad out-of-place.
> > >
> > > -q would be nice. For that'd we need to rename the hostnqn one,
> > > but as
> > > stated before I think -q is really misnamed for that anyway..
> >
> > -h for hostnqn?
>
> Oops... -h is 'help' :)
Yep, all the good single letter flags are being taken ;-P.
-i seems fine to me. ?I kind of like -q for hostnqn since hostnqn does
have a 'q' in it so there is somewhat of a mind-remembrance game there
:-).
>
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-08-29 15:14 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-26 15:56 [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command Steve Wise
2016-08-26 21:45 ` Keith Busch
2016-08-29 14:41 ` Steve Wise
2016-08-29 4:11 ` J Freyensee
2016-08-29 8:02 ` Christoph Hellwig
2016-08-29 14:43 ` Steve Wise
2016-08-29 15:05 ` Steve Wise
2016-08-29 15:09 ` Steve Wise
2016-08-29 15:14 ` J Freyensee
2016-08-29 14:40 ` Steve Wise
2016-08-29 15:13 ` J Freyensee
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).