* [PATCH nvme-cli] fabrics: add option to override drivers queue depth
@ 2017-05-10 9:04 Johannes Thumshirn
2017-05-10 14:41 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Thumshirn @ 2017-05-10 9:04 UTC (permalink / raw)
Currently it is not possible to override the fabrics drivers default queue
depth with the nvme userspace utility, but only when manually writing the
parameters to the /dev/nvme-fabrics character device.
Add an option to override the drivers default queue depth for NVMe over
fabrics.
Signed-off-by: Johannes Thumshirn <jthumshirn at suse.de>
---
Documentation/nvme-connect.txt | 6 ++++++
fabrics.c | 11 +++++++++++
2 files changed, 17 insertions(+)
diff --git a/Documentation/nvme-connect.txt b/Documentation/nvme-connect.txt
index 38fae39..a746a3a 100644
--- a/Documentation/nvme-connect.txt
+++ b/Documentation/nvme-connect.txt
@@ -16,6 +16,7 @@ SYNOPSIS
[--host-traddr=<traddr> | -w <traddr>]
[--hostnqn=<hostnqn> | -q <hostnqn>]
[--nr-io-queues=<#> | -i <#>]
+ [--queue-size=<#> | -Q <#>]
[--keep-alive-tmo=<#> | -k <#>]
[--reconnect-delay=<#> | -c <#>]
@@ -73,6 +74,11 @@ OPTIONS
--nr-io-queues=<#>::
Overrides the default number of I/O queues create by the driver.
+-Q <#>::
+--queue-size=<#>::
+ Overrides the default number of elements in the I/O queues created
+ by the driver.
+
-k <#>::
--keep-alive-tmo=<#>::
Overrides the default keep alive timeout (in seconds).
diff --git a/fabrics.c b/fabrics.c
index 6648bae..a826ecc 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -52,6 +52,7 @@ static struct config {
char *host_traddr;
char *hostnqn;
char *nr_io_queues;
+ char *queue_size;
char *keep_alive_tmo;
char *reconnect_delay;
char *raw;
@@ -524,6 +525,15 @@ static int build_options(char *argstr, int max_len)
max_len -= len;
}
+ if (cfg.queue_size) {
+ len = snprintf(argstr, max_len, ",queue_size=%s",
+ cfg.queue_size);
+ if (len < 0)
+ return -EINVAL;
+ argstr += 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)
@@ -805,6 +815,7 @@ int connect(const char *desc, int argc, char **argv)
{"host-traddr", 'w', "LIST", CFG_STRING, &cfg.host_traddr, required_argument, "host traddr (e.g. FC WWN's)" },
{"hostnqn", 'q', "LIST", CFG_STRING, &cfg.hostnqn, required_argument, "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)" },
+ {"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" },
{NULL},
--
1.8.5.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH nvme-cli] fabrics: add option to override drivers queue depth
2017-05-10 9:04 [PATCH nvme-cli] fabrics: add option to override drivers queue depth Johannes Thumshirn
@ 2017-05-10 14:41 ` Christoph Hellwig
2017-05-10 18:38 ` Keith Busch
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2017-05-10 14:41 UTC (permalink / raw)
On Wed, May 10, 2017@11:04:12AM +0200, Johannes Thumshirn wrote:
> Currently it is not possible to override the fabrics drivers default queue
> depth with the nvme userspace utility, but only when manually writing the
> parameters to the /dev/nvme-fabrics character device.
>
> Add an option to override the drivers default queue depth for NVMe over
> fabrics.
Looks fine, but we should probably also add this to connect-all.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH nvme-cli] fabrics: add option to override drivers queue depth
2017-05-10 14:41 ` Christoph Hellwig
@ 2017-05-10 18:38 ` Keith Busch
2017-05-11 7:28 ` Johannes Thumshirn
0 siblings, 1 reply; 4+ messages in thread
From: Keith Busch @ 2017-05-10 18:38 UTC (permalink / raw)
On Wed, May 10, 2017@04:41:21PM +0200, Christoph Hellwig wrote:
> On Wed, May 10, 2017@11:04:12AM +0200, Johannes Thumshirn wrote:
> > Currently it is not possible to override the fabrics drivers default queue
> > depth with the nvme userspace utility, but only when manually writing the
> > parameters to the /dev/nvme-fabrics character device.
> >
> > Add an option to override the drivers default queue depth for NVMe over
> > fabrics.
>
> Looks fine, but we should probably also add this to connect-all.
Agreed. I applied the one as-is, and will apply the connect-all update
when that's posted.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH nvme-cli] fabrics: add option to override drivers queue depth
2017-05-10 18:38 ` Keith Busch
@ 2017-05-11 7:28 ` Johannes Thumshirn
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2017-05-11 7:28 UTC (permalink / raw)
On 05/10/2017 08:38 PM, Keith Busch wrote:
> Agreed. I applied the one as-is, and will apply the connect-all update
> when that's posted.
OK, I'll send a connect-all version as well.
Thanks,
Johannes
--
Johannes Thumshirn Storage
jthumshirn at suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-05-11 7:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-10 9:04 [PATCH nvme-cli] fabrics: add option to override drivers queue depth Johannes Thumshirn
2017-05-10 14:41 ` Christoph Hellwig
2017-05-10 18:38 ` Keith Busch
2017-05-11 7:28 ` Johannes Thumshirn
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.