<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
@font-face
{font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif"}
span.BalloonTextChar
{font-family:"Tahoma","sans-serif"}
span.EmailStyle19
{font-family:"Times New Roman","serif";
color:#1F497D;
font-weight:normal;
font-style:normal}
span.EmailStyle20
{font-family:"Times New Roman","serif";
color:#1F497D;
font-weight:normal;
font-style:normal}
span.EmailStyle21
{font-family:"Calibri","sans-serif";
color:#1F497D}
.MsoChpDefault
{font-size:10.0pt}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
-->
</style><style type="text/css" id="owaParaStyle"></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Sure. I will go ahead fix them and let's see if anyone have different ideas about #2...
<div><br>
</div>
<div>Thanks,</div>
<div>Alex<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF64626" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Kong, Kwok<br>
<b>Sent:</b> Tuesday, March 05, 2013 5:59 PM<br>
<b>To:</b> Chang, Alex; nvmewin@lists.openfabrics.org<br>
<b>Subject:</b> RE: SCSI Translation Issues<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Alex,</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">I think #1 and #3 are bugs in the driver and should be fixed according to your suggestion. I am ok for you to fix them.</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">#2. CDB request 0 LBA.</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">NVMe requires the number of LBA requested to be 0’s. The minimum number of LBA requested is 1. A request of 0 LBA cannot be sent to a NVMe device.</span></p>
<p class="MsoNormal"><span style="color:#1F497D">In my view, the driver should return “OK” status to the port driver immediately without any further processing when the number of LBA requested is 0.</span></p>
<p class="MsoNormal"><span style="color:#1F497D">Since the request size is 0, the driver has completed the request with exactly 0 byte of data being transferred. (means no action is required).</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Any other opinion on what the driver should do when the number of LBA requested is 0 ?</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Would a SCSI expert please explain what the driver (or a SCSI device) is supposed to do when the number of request LBA is 0 ?</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">-Kwok</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> nvmewin-bounces@lists.openfabrics.org [mailto:nvmewin-bounces@lists.openfabrics.org]
<b>On Behalf Of </b>Chang, Alex<br>
<b>Sent:</b> Monday, March 04, 2013 5:03 PM<br>
<b>To:</b> nvmewin@lists.openfabrics.org<br>
<b>Subject:</b> [nvmewin] SCSI Translation Issues</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:blue">Hi all,</span><span style="font-size:12.0pt; font-family:"Times New Roman","serif""></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt; font-family:"Times New Roman","serif""> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:blue">After reviewing the translation codes from SCSI to NVMe more carefully, it seems there are some potential issues we might want to address sooner than later:</span><span style="font-size:12.0pt; font-family:"Times New Roman","serif""></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:blue">1. We don't handle buffer over/under run cases for read/write commands. For example, when the number of LBAs coded in CDB requires larger buffer size than indicated
in DataTransferLength of SRB, the driver needs to return Check Condition and proper status. In under-run case, driver needs to mark down the actual transfer size in DataTransferLength before completing the request back to Storport.</span><span style="font-size:12.0pt; font-family:"Times New Roman","serif""></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:blue">2. How do we handle the case when the number of LBAs coded in CDB is zero? I think the number of LBAs for read/write commands is 0's based defined in NVMe specification.
Is it a valid case?</span><span style="font-size:12.0pt; font-family:"Times New Roman","serif""></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:blue">3. For Read6/Write6, there is only one byte (byte 4) in CDB to indicate the transfer length. When the value of byte 4 is zero, it indicates the number of LBAs
to transfer is 256. In that case, what driver does is subtracting 1 from 0 and assigning 0xFFFF to DW12. Apparently, it's a known bug.</span><span style="font-size:12.0pt; font-family:"Times New Roman","serif""></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt; font-family:"Times New Roman","serif""> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:blue">I can fix the potential issues mentioned above. However, I need you inputs regarding how we are going to handle #2.</span><span style="font-size:12.0pt; font-family:"Times New Roman","serif""></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt; font-family:"Times New Roman","serif""> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:blue">Thanks,<br>
Alex</span><span style="font-size:12.0pt; font-family:"Times New Roman","serif""></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>