From: jonathan.derrick@intel.com (Jon Derrick)
Subject: [RFC] nvme: Fabrics should use the fctype field for data direction
Date: Wed, 12 Jul 2017 10:58:19 -0600 [thread overview]
Message-ID: <20170712165819.5326-1-jonathan.derrick@intel.com> (raw)
Fabrics commands with opcode 0x7F use the fctype field to indicate data
direction.
Fixes: eb793e2c ("nvme.h: add NVMe over Fabrics definitions")
Signed-off-by: Jon Derrick <jonathan.derrick at intel.com>
---
I don't have a setup available to test this, but according to the fabrics spec,
we should be using fctype. Any write commands would appear to work, including
Connect, but Property Get and other read commands with opcode 0x7F looks like
they should fail.
include/linux/nvme.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 983975b..7246059 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -1017,7 +1017,7 @@ static inline bool nvme_is_write(struct nvme_command *cmd)
* Why can't we simply have a Fabrics In and Fabrics out command?
*/
if (unlikely(cmd->common.opcode == nvme_fabrics_command))
- return cmd->fabrics.opcode & 1;
+ return cmd->fabrics.fctype & 1;
return cmd->common.opcode & 1;
}
--
2.9.3
next reply other threads:[~2017-07-12 16:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 16:58 Jon Derrick [this message]
2017-07-13 6:55 ` [RFC] nvme: Fabrics should use the fctype field for data direction Sagi Grimberg
2017-07-13 7:27 ` Christoph Hellwig
2017-07-13 7:59 ` Sagi Grimberg
2017-07-25 16:00 ` 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=20170712165819.5326-1-jonathan.derrick@intel.com \
--to=jonathan.derrick@intel.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