All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagig@dev.mellanox.co.il>
To: "Black, David" <david.black@emc.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	Mike Christie <michaelc@cs.wisc.edu>,
	"Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: 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>,
	"julians@infinidat.com" <julians@infinidat.com>,
	"meth@il.ibm.com" <meth@il.ibm.com>,
	"blaine@ethernetalliance.org" <blaine@ethernetalliance.org>
Subject: Re: iSCSI Expected Data Transfer Length for T10-PI
Date: Tue, 27 May 2014 20:12:18 +0300	[thread overview]
Message-ID: <5384C772.80007@dev.mellanox.co.il> (raw)
In-Reply-To: <8D3D17ACE214DC429325B2B98F3AE712076C662FE9@MX15A.corp.emc.com>

On 5/27/2014 2:58 PM, Black, David wrote:
> Hi Sagi,

Hey David,

>
>> RFC-7143 states:
>> "the Expected Data Transfer Length field contains the number of bytes of
>> data involved in this SCSI operation."
>> Since this field relates to *data bytes* I kept T10-PI implicit wrt this
>> field. The iSCSI target calculates the
>> total transfer length (data + protection) from the cdb transfer length
>> field and protect bits.
> That is wrong.  At the SCSI transport interface (both iSCSI and FCP are
> SCSI transports), the concept of "data bytes" includes SCSI protection
> information.
>
>> In FC, the fc_dl field was updated to relate to the total number of
>> transfer bytes and includes
>> data and protection bytes. virtio_scsi was added with a header PI
>> section (virtio_scsi_cmd_req_pi).
> That is the correct approach.
>
> At the SCSI transport interface (both FCP and iSCSI are SCSI transports),
> no distinction is made between user data and protection information.
> therefore, a transfer of 512 bytes of user data + 8 bytes of protection
> information is a 520 byte transfer for both protocols.
>
> The authority for this is SAM-5, or SAM-4 if one wants to refer to an
> approved standard.  Neither are open to interpretation on this point.

I see, thanks for clarifying this for me.

> All SCSI transports are supposed to behave the same way.  I hope this
> can be corrected quickly.

No problem, I'll fix it.

Sagi.

      reply	other threads:[~2014-05-27 17:12 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
2014-05-27 11:58 ` Black, David
2014-05-27 17:12   ` Sagi Grimberg [this message]

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=5384C772.80007@dev.mellanox.co.il \
    --to=sagig@dev.mellanox.co.il \
    --cc=blaine@ethernetalliance.org \
    --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 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.