All of lore.kernel.org
 help / color / mirror / Atom feed
From: Walker, Benjamin <benjamin.walker at intel.com>
To: spdk@lists.01.org
Subject: Re: [SPDK] error while submitting readv cmd
Date: Tue, 02 Aug 2016 15:56:05 +0000	[thread overview]
Message-ID: <1470153363.2387.240.camel@intel.com> (raw)
In-Reply-To: CABSNBDE4gvcUfyGY1o-0CUNTTmp=w9fwy_vUukX+RwPHLU72AA@mail.gmail.com

[-- Attachment #1: Type: text/plain, Size: 1923 bytes --]

On Mon, 2016-08-01 at 16:50 -0700, txcy uio wrote:
> Hello,
> 
> While submitting a readv command (spdk_nvme_ns_cmd_readv) I see the following error:
> 
> READ sqid:3 cid:127 nsid:1 lba:100 len:64
> INVALID_FIELD (00/02) sqid:3 cid:127 cdw0:0 sqhd:0000 p:0 m:0 dnr:1
> 
> 
> Based on this error what can I infer about the command that went wrong?

The SPDK NVMe driver is zero-copy, meaning we program the hardware to transfer data directly from
the buffers you specify. That's why all of the buffers need to be allocated from pinned memory (in
practice, that usually means they need to be allocated using rte_malloc from DPDK). NVMe devices
also have physical alignment restrictions. For instance, version 1.0 of the specification requires
us to program the hardware using a "physical resource page list" (PRP list), which consists of a
list of 4k physical memory pages. The first page does not have to be 4k aligned, but all others do,
and all but the first and last page must be 4k in length. Version 1.2 of the NVMe specification
optionally allows fully flexible scatter gather lists, but almost no commercially available devices
support scatter gather lists yet.

spdk_nvme_ns_cmd_readv is our interface for using the NVMe 1.2 scatter gather list capabilities. If your device doesn't support that, it's going to fail with an error like you are seeing. I now see that the purpose of spdk_nvme_ns_cmd_readv isn't clearly specified in the documentation (http://www.spdk.io/spdk/doc/nvme_8h.html#acb47ce7de6b6e963ec9fb8de261466ae) and if you aren't intimately familiar with the NVMe specification I can definitely see how you wouldn't realize that scatter gather lists require special hardware support. The documentation needs to be updated.

> 
> --Tyc
> 
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02 15:56 Walker, Benjamin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-08-02 17:31 [SPDK] error while submitting readv cmd Bhadauria, Varun
2016-08-02 17:21 Walker, Benjamin
2016-08-02 17:07 Bhadauria, Varun
2016-08-01 23:50 txcy uio

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=1470153363.2387.240.camel@intel.com \
    --to=spdk@lists.01.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: 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.