public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagig@dev.mellanox.co.il>
To: Julian Satran <julians@infinidat.com>
Cc: "martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	Mike Christie <michaelc@cs.wisc.edu>,
	"Nicholas A. Bellinger" <nab@linux-iscsi.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	target-devel <target-devel@vger.kernel.org>,
	Oren Duer <oren@mellanox.com>,
	"james.smart@emulex.com" <james.smart@emulex.com>,
	Or Gerlitz <ogerlitz@mellanox.com>,
	"cbm@chadalapaka.com" <cbm@chadalapaka.com>,
	"meth@il.ibm.com" <meth@il.ibm.com>,
	"david.black@emc.com" <david.black@emc.com>
Subject: Re: iSCSI Expected Data Transfer Length for T10-PI
Date: Mon, 26 May 2014 00:04:34 +0300	[thread overview]
Message-ID: <53825AE2.5020800@dev.mellanox.co.il> (raw)
In-Reply-To: <AD52A8E9-F044-4E3A-A842-D53BF06C8CF1@infinidat.com>

On 5/25/2014 10:39 PM, Julian Satran wrote:
Hi Julian,

> I have some trouble parsing you English/Question.

I'll try to clarify.

>   I think the intent of SCSI PI was that wherever the PI exist it should be checked end-to-end and it may be checked in between.
> A storage client (server) will have the PI appended in the memory when writing and reading and checking it. As the values are standardized storage may also check it both when reading and when writing but it should not change it.

All true.

>   If by implicit you mean inclusive I assume iSCSI Expected data transfer length will take whatever is in the cdb.
> Block transfer devices will likely add the PI length to the pure data length - i.e. inclusive.

My intention was that there is no explicit indication in the CDB that X 
additional PI bytes should be transferred,
it is implied that each block is appended with 8 bytes of PI.

For example:
Say we have an iSCSI target exposing a LUN which is formatted with PI. 
The iSCSI initiator supports PI transfer as well.
What do you expect iSCSI.ExpectedDataTransferLength field to be in the 
case of a single 512B block SCSI READ?  512?  520?
My understanding is that you think it should be the number of pure data 
bytes (i.e. 512).

As I mentioned, FC's fc_dl for example, was updated to be the *total* 
number of bytes (data + PI) in the SCSI operation (i.e. will be 520 in 
the above example).
virtio_scsi header was updated to additionally specify the number of IN 
PI bytes and the number of OUT PI bytes involved.

What I understood from the spec, is that 
iSCSI.ExpectedDataTransferLength corresponds to the number of
*data* bytes involved in this SCSI operation. That's why I kept 
iSCSI.ExpectedDataTransferLength to be
the number of pure data bytes.

So I guess I'm basically asking is, should iSCSI header include the 
number of PI bytes that should be transferred over the
wire as well?

Hope things are clearer,
Sagi.

  reply	other threads:[~2014-05-25 21:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-25 15:30 iSCSI Expected Data Transfer Length for T10-PI Sagi Grimberg
2014-05-25 19:39 ` Julian Satran
2014-05-25 21:04   ` Sagi Grimberg [this message]
2014-05-27 11:58 ` Black, David
2014-05-27 17:12   ` Sagi Grimberg

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=53825AE2.5020800@dev.mellanox.co.il \
    --to=sagig@dev.mellanox.co.il \
    --cc=cbm@chadalapaka.com \
    --cc=david.black@emc.com \
    --cc=james.smart@emulex.com \
    --cc=julians@infinidat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=meth@il.ibm.com \
    --cc=michaelc@cs.wisc.edu \
    --cc=nab@linux-iscsi.org \
    --cc=ogerlitz@mellanox.com \
    --cc=oren@mellanox.com \
    --cc=target-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox