linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: swise@opengridcomputing.com (Steve Wise)
Subject: [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command
Date: Fri, 26 Aug 2016 08:56:52 -0700	[thread overview]
Message-ID: <20160826160112.495DFE08C5@smtp.ogc.us> (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

             reply	other threads:[~2016-08-26 15:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-26 15:56 Steve Wise [this message]
2016-08-26 21:45 ` [PATCH] nvme-cli/fabrics: Add nr_io_queues parameter to connect command 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

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=20160826160112.495DFE08C5@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).