From: Sagi Grimberg <sagig@dev.mellanox.co.il>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
target-devel@vger.kernel.org,
Tim Chen <tim.c.chen@linux.intel.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org,
Nicholas Bellinger <nab@linux-iscsi.org>,
Sagi Grimberg <sagig@mellanox.com>,
Christoph Hellwig <hch@lst.de>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH v3 0/5] target: Fix several problems related to T10-PI support
Date: Tue, 28 Apr 2015 13:22:39 +0300 [thread overview]
Message-ID: <553F5F6F.5040800@dev.mellanox.co.il> (raw)
In-Reply-To: <yq1tww1uo4d.fsf@sermon.lab.mkp.net>
On 4/28/2015 2:50 AM, Martin K. Petersen wrote:
>>>>>> "Sagi" == Sagi Grimberg <sagig@dev.mellanox.co.il> writes:
>
> Sagi> The problem is that the HBA does not have the write_same
> Sagi> functionality you introduce here, i.e. generate multiple same
> Sagi> protection fields for a single data block.
>
> Adding support to DIX would be problematic since it would essentially
> turn a WRITE SAME into a WRITE. You'd only do one block of DMA but you'd
> get N blocks going over the wire.
I thought that WRITE_SAME with DIX would include PI for the block that
is being sent over the wire, the initiator and target HBAs will verify
the single block integrity and the target backend will expand the PI
for the number of same sectors involved (unless the target backend
includes another wire, in this case it should handle it like the
initiator...)
>
> In target mode it is conceivable to set up a prot sgl after parsing the
> CDB and let the HBA do the work. But I'm not aware of any hardware that
> allows that.
I don't either, I think it would be simpler to have the target core
implement it instead of having each fabric driver doing the same thing.
>
> Sagi> In this case, for WRITE_SAME, have the fabrics generate/verify a
> Sagi> single data block (one integrity field) like they do today, and
> Sagi> then the core will expand it to the correct number of sectors
> Sagi> using some form of sbc_dif_expand_same()
>
> Yeah. In a simple world you'd just keep overriding the ref tag in the
> received PI tuple. But for performance reasons you'll obviously want to
> do I/O in units bigger than a single block. Blindly preallocating PI to
> fit the entire I/O is also be problematic, however, since a block count
> of 0 unfortunately means "the whole disk".
>
It seems that the only one that can handle write_same PI expansion is
the backend.
The initiator can pass PI for the block that is transferred, and the
target is responsible to handle it. The target will also pass this
single block with PI to it's backend. The backend is responsible to
update PI for all the sectors that are written.
Sounds right?
Sagi.
next prev parent reply other threads:[~2015-04-28 10:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-25 14:33 [PATCH v3 0/5] target: Fix several problems related to T10-PI support Akinobu Mita
2015-04-25 14:33 ` [PATCH v3 2/5] lib: introduce crc_t10dif_update() Akinobu Mita
2015-04-27 23:41 ` Martin K. Petersen
2015-04-28 17:38 ` Tim Chen
2015-04-28 23:07 ` Martin K. Petersen
2015-04-29 0:39 ` Akinobu Mita
2015-04-29 0:49 ` Herbert Xu
2015-04-29 16:07 ` Tim Chen
2015-04-25 14:33 ` [PATCH v3 3/5] target: handle odd SG mapping for data transfer memory Akinobu Mita
2015-04-26 10:07 ` Sagi Grimberg
2015-04-27 13:03 ` Akinobu Mita
2015-04-26 10:33 ` [PATCH v3 0/5] target: Fix several problems related to T10-PI support Sagi Grimberg
2015-04-27 23:50 ` Martin K. Petersen
2015-04-28 10:22 ` Sagi Grimberg [this message]
2015-04-28 23:06 ` Martin K. Petersen
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=553F5F6F.5040800@dev.mellanox.co.il \
--to=sagig@dev.mellanox.co.il \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akinobu.mita@gmail.com \
--cc=davem@davemloft.net \
--cc=hch@lst.de \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nab@linux-iscsi.org \
--cc=sagig@mellanox.com \
--cc=target-devel@vger.kernel.org \
--cc=tim.c.chen@linux.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