<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.5pt;
font-family:Consolas;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:Consolas;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle24
{mso-style-type:personal-reply;
font-family:"Times New Roman","serif";
color:#1F497D;
font-weight:normal;
font-style:normal;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";color:#1F497D">Thanks Rick and Alex! I’ll get this change merged in to the OFA baseline this week.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";color:#1F497D">Ray<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";color:#1F497D"><o:p> </o:p></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>Knoblaugh, Rick<br>
<b>Sent:</b> Monday, June 04, 2012 6:29 PM<br>
<b>To:</b> Chang, Alex; Murray, Kris R; nvmewin@lists.openfabrics.org<br>
<b>Subject:</b> Re: [nvmewin] numberOfPrpEntries patch for review<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">LSI is good with it as well.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> -RIck<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></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"">
<a href="mailto:nvmewin-bounces@lists.openfabrics.org">nvmewin-bounces@lists.openfabrics.org</a>
<a href="mailto:[mailto:nvmewin-bounces@lists.openfabrics.org]">[mailto:nvmewin-bounces@lists.openfabrics.org]</a>
<b>On Behalf Of </b>Chang, Alex<br>
<b>Sent:</b> Monday, June 04, 2012 5:01 PM<br>
<b>To:</b> Murray, Kris R; <a href="mailto:nvmewin@lists.openfabrics.org">nvmewin@lists.openfabrics.org</a><br>
<b>Subject:</b> Re: [nvmewin] numberOfPrpEntries patch for review<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">IDT is fine with the fix.</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> <o:p></o:p></span></p>
<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""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">
<hr size="2" width="100%" align="center">
</span></div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><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"">
<a href="mailto:nvmewin-bounces@lists.openfabrics.org">nvmewin-bounces@lists.openfabrics.org</a>
<a href="mailto:[mailto:nvmewin-bounces@lists.openfabrics.org]">[mailto:nvmewin-bounces@lists.openfabrics.org]</a>
<b>On Behalf Of </b>Murray, Kris R<br>
<b>Sent:</b> Monday, June 04, 2012 11:15 AM<br>
<b>To:</b> <a href="mailto:nvmewin@lists.openfabrics.org">nvmewin@lists.openfabrics.org</a><br>
<b>Subject:</b> [nvmewin] ***UNCHECKED*** numberOfPrpEntries patch for review</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal">All,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>Summary:<o:p></o:p></b></p>
<p class="MsoNormal">I found a bug in the ProcessIo step for copying the PRP list. From the SNTI code, the variable numberOfPrpEntries in the SRB Extension was built as the total number of PRPs for the NVMe command. However, the code to copy over the PRP list
uses this variable unaltered. This creates a bug where one too many PRP entries are copied. This bug hasn’t surfaced yet because creating an NVMe command with the maximum number of PRP entries in the list hasn’t been tested yet.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">See NVMe_PRP_fix.zip for source. Password: NVMe1234<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>Changes:<o:p></o:p></b></p>
<p class="MsoNormal">nvmeStd.h :<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in">-<span style="font-size:7.0pt;font-family:"Times New Roman","serif"">
</span>The numberofPrpEntries variable in the SRB Extension is updated with a comment that clarifies that it holds the total number of PRPs, not just the PRP entries in the list<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">nvmeIo.c:<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in">-<span style="font-size:7.0pt;font-family:"Times New Roman","serif"">
</span>Instead of checking for a valid entry 0 in the list, the number of entries is checked<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in">-<span style="font-size:7.0pt;font-family:"Times New Roman","serif"">
</span>The amount of memory to copy is decreased by the size of 1 entry to account for the PRP that is in PRP1 of the command.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>Code Sample:<o:p></o:p></b></p>
<p class="MsoNormal"><u><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">nvmeStd.h<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:green;background:white;mso-highlight:white">/* Temp PRP List */</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">UINT64 prpList[MAX_TX_SIZE / PAGE_SIZE];<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:green;background:yellow;mso-highlight:yellow">/* Keep track of the total number of PRPs */</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">UINT32 numberOfPrpEntries;</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="color:#1F497D">nvmeIo.c<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">if</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> (</span><span style="font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white">pSrbExtension</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:yellow;mso-highlight:yellow">numberOfPrpEntries
> 2</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> pNvmeCmd->PRP2 = pCmdInfo->prpListPhyAddr.QuadPart;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-size:9.5pt;color:#1F497D;background:yellow;mso-highlight:yellow"> /* Copy the PRP list pointed to by PRP2….
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-size:9.5pt;color:#1F497D;background:yellow;mso-highlight:yellow"> * Size of the copy is total num of PRPs -1 because
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-size:9.5pt;color:#1F497D;background:yellow;mso-highlight:yellow"> * PRP1 is not in the PRP list pointed to by PRP2<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-size:9.5pt;color:#1F497D;background:yellow;mso-highlight:yellow"> */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">StorPortMoveMemory</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">((</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">PVOID</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">)pCmdInfo->pPRPList,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> (</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">PVOID</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">)&</span><span style="font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white">pSrbExtension</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">->prpList[0],<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> (</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:yellow;mso-highlight:yellow">(</span><span style="font-size:9.5pt;font-family:Consolas;color:gray;background:yellow;mso-highlight:yellow">pSrbExtension</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:yellow;mso-highlight:yellow">->numberOfPrpEntries
- 1)</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> * </span>
<span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">sizeof</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">UINT64</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">)));<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">}</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>Testing (Logs attached):<o:p></o:p></b></p>
<p class="MsoListParagraph" style="text-indent:-.25in">-<span style="font-size:7.0pt;font-family:"Times New Roman","serif"">
</span>IOMeter: PASS – See result.csv<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in">-<span style="font-size:7.0pt;font-family:"Times New Roman","serif"">
</span>PCMark7: PASS – See NVMe.pcmark-7-result<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in">-<span style="font-size:7.0pt;font-family:"Times New Roman","serif"">
</span>SCSI Compliance 2.0: 77 PASS, 36 WARN, 2 FAIL – See scsi_comp.txt<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in">-<span style="font-size:7.0pt;font-family:"Times New Roman","serif"">
</span>SD Stress: PASS – See SDSTRESS.LOG<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Kris Murray</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
</div>
</body>
</html>