[SPDK] Re: Submitting NVME I/O write req with SGL

Harris, James R <james.r.harris at intel.com>
Newsgroups dev.linux.lists.spdk
Message-ID <[email protected]>
Hi Filip,

You may only specify a scattered list of 64B buffers like this if your SSD supports SGL.  There are many SSDs that only support PRP (Physical Region Pages), but not SGL.

Based on the error message you've posted, your SSD does not support SGL - only PRP.  With PRP, all of the buffers (except the first) must start on a 4KB address boundary, and all of the buffers (except the last) must end on a 4KB address boundary.

If you would like more information about PRP and its restrictions, you may want to read section 4.3 (Physical Region Page and List) of the NVMe 1.4 base specification.  You can download the specification at https://nvmexpress.org/developers/nvme-specification/.

Regards,

Jim

On 1/29/21, 3:33 AM, "Filip Janiszewski" <contact(a)filipjaniszewski.com> wrote:

    Hi,

    I've plenty of 64B buffers to write to disk, but I'm having trouble
    triggering the proper spdk_nvme_ns_cmd_writev_with_md to do that - I was
    trying to use as sample code the 'perf' test application and the
    following patch: https://gerrithub.io/c/spdk/spdk/+/437905 , but I keep
    getting errors like:

    .
    [2021-01-29 11:17:46.573755] nvme_ns_cmd.c:
    268:_nvme_ns_cmd_split_request_prp: *ERROR*: child_length 64 not even
    multiple of lba_size 512
    .

    So I've a couple of questions:

    1) Is is possible to submit NVME IO write requests while the buffers are
    smaller than LBA using SGL or something?

    2) Is there any documentation for that?

    3) Will this work only with FIO? (the FIO plugin seems to do that, not
    sure).

    Obviously I can't just merge my buffers info LBA size blocks as that
    would mean copy memory, I can't effort to copy memory and I need to dump
    those buffers to disk.. (Wasting an entire LBA of 512B for each single
    64B buffer while work is not acceptable due to disk space waste..)

    Thanks

    -- 
    BR, Filip
    +48 666 369 823
    _______________________________________________
    SPDK mailing list -- spdk(a)lists.01.org
    To unsubscribe send an email to spdk-leave(a)lists.01.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.