From: James Smart <james.smart@broadcom.com>
To: Max Gurtovoy <maxg@mellanox.com>,
linux-nvme@lists.infradead.org, kbusch@kernel.org, hch@lst.de,
sagi@grimberg.me, martin.petersen@oracle.com
Cc: axboe@kernel.dk, vladimirk@mellanox.com, idanb@mellanox.com,
israelr@mellanox.com, shlomin@mellanox.com, oren@mellanox.com
Subject: Re: [PATCH 07/16] nvme-rdma: Add metadata/T10-PI support
Date: Thu, 23 Jan 2020 10:52:50 -0800 [thread overview]
Message-ID: <f467d8a0-78ac-78c4-f5dd-59031fbfde2f@broadcom.com> (raw)
In-Reply-To: <095f5943-5a5f-36ca-a8ee-0c8a9a02cc52@broadcom.com>
On 1/23/2020 7:34 AM, James Smart wrote:
>
>
> On 1/23/2020 1:59 AM, Max Gurtovoy wrote:
>>
>> On 1/22/2020 11:57 PM, James Smart wrote:
>>> On a per-io basis, there needs to be specific descriptions of the
>>> DIF information to program the port hardware. Things such as block
>>> size, type, and so. I see this routine using a mix of the bio that
>>> is associated with the original request as well as the namespace
>>> pointer to get this info. To me the reaching into the bio, as
>>> well as the locating of the ns structures are reaching into the
>>> other layers too much.
>>>
>>> Wouldn't we be better off with with the core layer doing all the
>>> reaching and setting up a pi structure in the nvme_request with this
>>> information ? replace has_pi with this pi struct and
>>> "nvme_req(rq)->pi.pi_type == 0" is equivalent to has_pi ? If we
>>> didn't want to replicate the PI info, then nvme_request can simply
>>> add a pointer to the ns, and the ns can be looked at explicitly to
>>> gather the attributes.
>>>
>>> Thoughts ?
>>>
>> NVMe namespace is used by RDMA/TCP/FC transport drivers in each
>> queue_rq implementation. We can pass it instead of reaching it from
>> the rq, if this looks better.
>
> ?? there hasn't been any reason to look at the namespace by the
> transports to date.
>
> But yes, I much prefer passing the ns and using it for the dif info.
> This removes what I didn't like - encoding the relationship of how to
> get from the rq to ns in each transport.
>
also means the bio isn't necessary in most of the other routines until
you call blk_rq_count_integrity_sg(). blksz can come from (1 <<
ns->lba_shift)
-- james
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-01-23 18:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-02 14:47 [PATCH 00/16 V2] nvme-rdma/nvmet-rdma: Add metadata/T10-PI support Max Gurtovoy
2019-12-02 14:47 ` [PATCH] nvme-cli/fabrics: Add pi_enable param to connect cmd Max Gurtovoy
2019-12-02 14:47 ` [PATCH 01/16] nvme: Introduce namespace features flag Max Gurtovoy
2019-12-04 8:41 ` Christoph Hellwig
2019-12-02 14:47 ` [PATCH 02/16] nvme: Enforce extended LBA format for fabrics metadata Max Gurtovoy
2019-12-02 14:47 ` [PATCH 03/16] nvme: Introduce max_integrity_segments ctrl attribute Max Gurtovoy
2019-12-02 14:48 ` [PATCH 04/16] nvme-fabrics: Allow user enabling metadata/T10-PI support Max Gurtovoy
2019-12-02 14:48 ` [PATCH 05/16] nvme: Introduce NVME_INLINE_PROT_SG_CNT Max Gurtovoy
2019-12-02 14:48 ` [PATCH 06/16] nvme-rdma: Introduce nvme_rdma_sgl structure Max Gurtovoy
2019-12-02 14:48 ` [PATCH 07/16] nvme-rdma: Add metadata/T10-PI support Max Gurtovoy
2020-01-22 21:57 ` James Smart
2020-01-23 9:59 ` Max Gurtovoy
2020-01-23 15:34 ` James Smart
2020-01-23 18:52 ` James Smart [this message]
2019-12-02 14:48 ` [PATCH 08/16] block: Add a BIP_MAPPED_INTEGRITY check to complete_fn Max Gurtovoy
2019-12-02 14:48 ` [PATCH 09/16] nvmet: Prepare metadata request Max Gurtovoy
2019-12-02 14:48 ` [PATCH 10/16] nvmet: Add metadata characteristics for a namespace Max Gurtovoy
2019-12-02 14:48 ` [PATCH 11/16] nvmet: Rename nvmet_rw_len to nvmet_rw_data_len Max Gurtovoy
2019-12-02 14:48 ` [PATCH 12/16] nvmet: Rename nvmet_check_data_len to nvmet_check_transfer_len Max Gurtovoy
2019-12-02 14:48 ` [PATCH 13/16] nvme: Add Metadata Capabilities enumerations Max Gurtovoy
2019-12-02 14:48 ` [PATCH 14/16] nvmet: Add metadata/T10-PI support Max Gurtovoy
2019-12-02 14:48 ` [PATCH 15/16] nvmet: Add metadata support for block devices Max Gurtovoy
2019-12-02 14:48 ` [PATCH 16/16] nvmet-rdma: Add metadata/T10-PI support Max Gurtovoy
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=f467d8a0-78ac-78c4-f5dd-59031fbfde2f@broadcom.com \
--to=james.smart@broadcom.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=idanb@mellanox.com \
--cc=israelr@mellanox.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=martin.petersen@oracle.com \
--cc=maxg@mellanox.com \
--cc=oren@mellanox.com \
--cc=sagi@grimberg.me \
--cc=shlomin@mellanox.com \
--cc=vladimirk@mellanox.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;
as well as URLs for NNTP newsgroup(s).