linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH] nvme: support bi-directional commands
Date: Wed, 7 Dec 2016 18:33:23 +0100	[thread overview]
Message-ID: <20161207173323.GA24967@lst.de> (raw)
In-Reply-To: <1481132364-20583-1-git-send-email-keith.busch@intel.com>

On Wed, Dec 07, 2016@12:39:24PM -0500, Keith Busch wrote:
> The nvme specification defines the opcode's lower 2 bits as the
> transfer direction, which allows for bi-directional commands. While
> there are no standard defined opcodes that use both data directions,
> this is something a vendor unique opcode may use.
> 
> This patch adds support for bi-directional user commands. The block
> layer doesn't natively support a request with both directions, but we
> can treat it like a read and set up rq_map_data to force copying the
> user data to the kernel buffers before the transfer.

The block layer actually supports bidi commands for SCSI OSD devices
using two struct requests.  But it's giant mess, and given that no
NVMe command in the spec requires it I am absoutely 100% against
supporting this in NVMe.  It's just going to create a mess for everyone
involved, even worse so for fabrics.

Just don't do it.

  reply	other threads:[~2016-12-07 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-07 17:39 [PATCH] nvme: support bi-directional commands Keith Busch
2016-12-07 17:33 ` Christoph Hellwig [this message]
2016-12-07 17:50   ` Keith Busch
2016-12-07 17:44     ` Christoph Hellwig
2016-12-07 18:07       ` Keith Busch
2016-12-07 17:59         ` Christoph Hellwig
2016-12-07 18:15           ` Keith Busch

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=20161207173323.GA24967@lst.de \
    --to=hch@lst.de \
    /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).