From: Sagi Grimberg <sagi@grimberg.me> To: linux-nvme@lists.infradead.org Cc: Christoph Hellwig <hch@lst.de>, Keith Busch <keith.busch@intel.com>, linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk> Subject: [PATCH nvme-cli 6/5] fabrics: pass in nr_write_queues Date: Tue, 11 Dec 2018 02:49:36 -0800 [thread overview] Message-ID: <20181211104936.25333-7-sagi@grimberg.me> (raw) In-Reply-To: <20181211104936.25333-1-sagi@grimberg.me> nr_write_queues specifies the number of queues additional to nr_io_queues will be connected. These queues will host write I/O (host to target payload) while nr_io_queues will host read I/O (target to host payload). Signed-off-by: Sagi Grimberg <sagi@grimberg.me> --- fabrics.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fabrics.c b/fabrics.c index 93f3410a1c72..55ce2ba79c4f 100644 --- a/fabrics.c +++ b/fabrics.c @@ -53,6 +53,7 @@ static struct config { char *hostnqn; char *hostid; int nr_io_queues; + int nr_write_queues; int queue_size; int keep_alive_tmo; int reconnect_delay; @@ -621,6 +622,8 @@ static int build_options(char *argstr, int max_len) add_argument(&argstr, &max_len, "hostid", cfg.hostid)) || add_int_argument(&argstr, &max_len, "nr_io_queues", cfg.nr_io_queues) || + add_int_argument(&argstr, &max_len, "nr_write_queues", + cfg.nr_write_queues) || add_int_argument(&argstr, &max_len, "queue_size", cfg.queue_size) || add_int_argument(&argstr, &max_len, "keep_alive_tmo", cfg.keep_alive_tmo) || @@ -694,6 +697,13 @@ retry: p += len; } + if (cfg.nr_write_queues) { + len = sprintf(p, ",nr_write_queues=%d", cfg.nr_write_queues); + if (len < 0) + return -EINVAL; + p += len; + } + if (cfg.host_traddr) { len = sprintf(p, ",host_traddr=%s", cfg.host_traddr); if (len < 0) @@ -1009,6 +1019,7 @@ int connect(const char *desc, int argc, char **argv) {"hostnqn", 'q', "LIST", CFG_STRING, &cfg.hostnqn, required_argument, "user-defined hostnqn" }, {"hostid", 'I', "LIST", CFG_STRING, &cfg.hostid, required_argument, "user-defined hostid (if default not used)"}, {"nr-io-queues", 'i', "LIST", CFG_INT, &cfg.nr_io_queues, required_argument, "number of io queues to use (default is core count)" }, + {"nr_write_queues", 'W', "LIST", CFG_INT, &cfg.nr_write_queues, required_argument, "number of write queues to use (default 0)" }, {"queue-size", 'Q', "LIST", CFG_INT, &cfg.queue_size, required_argument, "number of io queue elements to use (default 128)" }, {"keep-alive-tmo", 'k', "LIST", CFG_INT, &cfg.keep_alive_tmo, required_argument, "keep alive timeout period in seconds" }, {"reconnect-delay", 'c', "LIST", CFG_INT, &cfg.reconnect_delay, required_argument, "reconnect timeout period in seconds" }, -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: sagi@grimberg.me (Sagi Grimberg) Subject: [PATCH nvme-cli 6/5] fabrics: pass in nr_write_queues Date: Tue, 11 Dec 2018 02:49:36 -0800 [thread overview] Message-ID: <20181211104936.25333-7-sagi@grimberg.me> (raw) In-Reply-To: <20181211104936.25333-1-sagi@grimberg.me> nr_write_queues specifies the number of queues additional to nr_io_queues will be connected. These queues will host write I/O (host to target payload) while nr_io_queues will host read I/O (target to host payload). Signed-off-by: Sagi Grimberg <sagi at grimberg.me> --- fabrics.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fabrics.c b/fabrics.c index 93f3410a1c72..55ce2ba79c4f 100644 --- a/fabrics.c +++ b/fabrics.c @@ -53,6 +53,7 @@ static struct config { char *hostnqn; char *hostid; int nr_io_queues; + int nr_write_queues; int queue_size; int keep_alive_tmo; int reconnect_delay; @@ -621,6 +622,8 @@ static int build_options(char *argstr, int max_len) add_argument(&argstr, &max_len, "hostid", cfg.hostid)) || add_int_argument(&argstr, &max_len, "nr_io_queues", cfg.nr_io_queues) || + add_int_argument(&argstr, &max_len, "nr_write_queues", + cfg.nr_write_queues) || add_int_argument(&argstr, &max_len, "queue_size", cfg.queue_size) || add_int_argument(&argstr, &max_len, "keep_alive_tmo", cfg.keep_alive_tmo) || @@ -694,6 +697,13 @@ retry: p += len; } + if (cfg.nr_write_queues) { + len = sprintf(p, ",nr_write_queues=%d", cfg.nr_write_queues); + if (len < 0) + return -EINVAL; + p += len; + } + if (cfg.host_traddr) { len = sprintf(p, ",host_traddr=%s", cfg.host_traddr); if (len < 0) @@ -1009,6 +1019,7 @@ int connect(const char *desc, int argc, char **argv) {"hostnqn", 'q', "LIST", CFG_STRING, &cfg.hostnqn, required_argument, "user-defined hostnqn" }, {"hostid", 'I', "LIST", CFG_STRING, &cfg.hostid, required_argument, "user-defined hostid (if default not used)"}, {"nr-io-queues", 'i', "LIST", CFG_INT, &cfg.nr_io_queues, required_argument, "number of io queues to use (default is core count)" }, + {"nr_write_queues", 'W', "LIST", CFG_INT, &cfg.nr_write_queues, required_argument, "number of write queues to use (default 0)" }, {"queue-size", 'Q', "LIST", CFG_INT, &cfg.queue_size, required_argument, "number of io queue elements to use (default 128)" }, {"keep-alive-tmo", 'k', "LIST", CFG_INT, &cfg.keep_alive_tmo, required_argument, "keep alive timeout period in seconds" }, {"reconnect-delay", 'c', "LIST", CFG_INT, &cfg.reconnect_delay, required_argument, "reconnect timeout period in seconds" }, -- 2.17.1
next prev parent reply other threads:[~2018-12-11 10:50 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-12-11 10:49 [PATCH 0/5] implement nvmf read/write queue maps Sagi Grimberg 2018-12-11 10:49 ` Sagi Grimberg 2018-12-11 10:49 ` [PATCH 1/5] blk-mq-rdma: pass in queue map to blk_mq_rdma_map_queues Sagi Grimberg 2018-12-11 10:49 ` Sagi Grimberg 2018-12-11 13:34 ` Christoph Hellwig 2018-12-11 13:34 ` Christoph Hellwig 2018-12-11 10:49 ` [PATCH 2/5] nvme-fabrics: add missing nvmf_ctrl_options documentation Sagi Grimberg 2018-12-11 10:49 ` Sagi Grimberg 2018-12-11 13:35 ` Christoph Hellwig 2018-12-11 13:35 ` Christoph Hellwig 2018-12-11 10:49 ` [PATCH 3/5] nvme-fabrics: allow user to set nr_write_queues for separate queue maps Sagi Grimberg 2018-12-11 10:49 ` Sagi Grimberg 2018-12-11 13:35 ` Christoph Hellwig 2018-12-11 13:35 ` Christoph Hellwig 2018-12-11 10:49 ` [PATCH 4/5] nvme-tcp: support separate queue maps for read and write Sagi Grimberg 2018-12-11 10:49 ` Sagi Grimberg 2018-12-11 13:41 ` Christoph Hellwig 2018-12-11 13:41 ` Christoph Hellwig 2018-12-11 23:11 ` Sagi Grimberg 2018-12-11 23:11 ` Sagi Grimberg 2018-12-11 10:49 ` [PATCH 5/5] nvme-rdma: support read/write queue separation Sagi Grimberg 2018-12-11 10:49 ` Sagi Grimberg 2018-12-11 13:42 ` Christoph Hellwig 2018-12-11 13:42 ` Christoph Hellwig 2018-12-11 10:49 ` Sagi Grimberg [this message] 2018-12-11 10:49 ` [PATCH nvme-cli 6/5] fabrics: pass in nr_write_queues Sagi Grimberg 2018-12-11 19:30 ` Keith Busch 2018-12-11 19:30 ` Keith Busch 2018-12-11 23:34 ` Sagi Grimberg 2018-12-11 23:34 ` Sagi Grimberg 2018-12-11 13:28 ` [PATCH 0/5] implement nvmf read/write queue maps Christoph Hellwig 2018-12-11 13:28 ` Christoph Hellwig
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=20181211104936.25333-7-sagi@grimberg.me \ --to=sagi@grimberg.me \ --cc=axboe@kernel.dk \ --cc=hch@lst.de \ --cc=keith.busch@intel.com \ --cc=linux-block@vger.kernel.org \ --cc=linux-nvme@lists.infradead.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.