All of lore.kernel.org
 help / color / mirror / Atom feed
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH rfc 4/4] nvme: Ask for fabrics SQ flow control disable by default
Date: Mon,  1 Oct 2018 17:14:22 -0700	[thread overview]
Message-ID: <20181002001422.9111-5-sagi@grimberg.me> (raw)
In-Reply-To: <20181002001422.9111-1-sagi@grimberg.me>

As for now, we don't care about sq_head pointer updates anyway, so
at least allow the controller to micro-optimize by omiting this update.

Note that we will probably need to support it when a controller
that requires this comes along.

Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
 drivers/nvme/host/fabrics.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 38cf9d371953..ce61c3e1c22b 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -392,6 +392,9 @@ int nvmf_connect_admin_queue(struct nvme_ctrl *ctrl)
 	cmd.connect.kato = ctrl->opts->discovery_nqn ? 0 :
 		cpu_to_le32((ctrl->kato + NVME_KATO_GRACE) * 1000);
 
+	/* Ask to disable SQ head pointer updates */
+	cmd.connect.cattr |= NVME_CONNECT_SQ_FC_DISABLED;
+
 	data = kzalloc(sizeof(*data), GFP_KERNEL);
 	if (!data)
 		return -ENOMEM;
@@ -451,6 +454,9 @@ int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid)
 	cmd.connect.qid = cpu_to_le16(qid);
 	cmd.connect.sqsize = cpu_to_le16(ctrl->sqsize);
 
+	/* Ask to disable SQ head pointer updates */
+	cmd.connect.cattr |= NVME_CONNECT_SQ_FC_DISABLED;
+
 	data = kzalloc(sizeof(*data), GFP_KERNEL);
 	if (!data)
 		return -ENOMEM;
-- 
2.17.1

  parent reply	other threads:[~2018-10-02  0:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02  0:14 [PATCH rfc 0/4] Support SQ flow control disabled mode (TP 8005) Sagi Grimberg
2018-10-02  0:14 ` [PATCH rfc 1/4] nvmet: support fabrics sq flow control Sagi Grimberg
2018-10-02 14:03   ` Hannes Reinecke
2018-10-02  0:14 ` [PATCH rfc 2/4] nvmet: don't override treq upon modification Sagi Grimberg
2018-10-02 14:04   ` Hannes Reinecke
2018-10-06 23:01   ` Max Gurtovoy
2018-10-02  0:14 ` [PATCH rfc 3/4] nvmet: expose support for fabrics SQ flow control disable in treq Sagi Grimberg
2018-10-02 14:04   ` Hannes Reinecke
2018-10-02  0:14 ` Sagi Grimberg [this message]
2018-10-02 14:08   ` [PATCH rfc 4/4] nvme: Ask for fabrics SQ flow control disable by default Hannes Reinecke
2018-10-02 16:17     ` Sagi Grimberg

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=20181002001422.9111-5-sagi@grimberg.me \
    --to=sagi@grimberg.me \
    /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 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.