<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:x="urn:schemas-microsoft-com:office:excel" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" 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 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 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:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p
{mso-style-priority:99;
margin-top:3.75pt;
margin-right:0in;
margin-bottom:3.75pt;
margin-left:0in;
font-size:9.0pt;
font-family:"Arial",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.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.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;}
/* List Definitions */
@list l0
{mso-list-id:135996438;
mso-list-type:hybrid;
mso-list-template-ids:-1382920776 -1427867830 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:15;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Calibri",sans-serif;
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></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="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi all, <o:p></o:p></p>
<p class="MsoNormal">I am sending the updated patch incorporating feedback I received. The changes are listed below, along with my comments about the feedback I did not address. The password is intelnvme<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Patch updates:<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>Server 2012 was failing to shut down because of mismatched calls to StorportDeviceBusy and StorportDeviceReady after delete or detach commands.<o:p></o:p></p>
<p style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">NVMeGetNamespaceStatusAndSlot(pDevExt, currentNSID, &lunId); moved inside the below condition.<br>
</span><span style="font-size:10.0pt;font-family:"Courier New""> if (pNsMgmtDW10->SEL == NAMESPACE_MANAGEMENT_DELETE) { }</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="font-family:"Calibri",sans-serif"><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">In function: NVMeIoctlNamespaceMgmt - allocate memory for pNsCtrlsList and free the memory after command completion</span>.
<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>In the Namespace Detach/Delete path – removed unnecessary calls to StorportNotification<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>In functions NVMeCompletionNsAttachment and FormatNVMGetIdentify changed PRP preparation to size of Identify Namespace<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>In function NVMeSetFeaturesCompletion<i> </i>added check for
<span style="font-size:10.0pt;font-family:"Courier New"">SC==INVALID_NAMESPACE_OR_FORMAT</span><o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>In function NVMeSetFeaturesCompletion<i> </i>For the case where NS Mgmt is not supported, nsStatus should be set to ATTACHED<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>In function NVMeSetFeaturesCompletion<i> </i>In the case where NS mgmt is not supported, nsStatus will be "INVALID"<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Suggested feedback I did not incorporate:<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>I was not able to make any improvements to the driver handling for the zero attached namespace case. If the feedback is that this must be implemented for this patch, I will need two more weeks.
<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]><span style="font-size:10.0pt;font-family:"Courier New"">pAE->DriverState.NumQueuesSet –</span> I could not find any such field in the driver<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>Check should validate that the SCT is GENERIC_COMMAND_STATUS – I did not change this because I’d have to add a new else condition, and I could not commit to testing that kind of a change.<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>I didn’t make any of the suggested changes to the LBA RANGE buffer size, because again, I could not commit to testing them<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>It is safe to set SEL field to <span style="font-size:10.0pt;font-family:Consolas">
NAMESPACE_MANAGEMENT_DELETE </span> in the pNsMgmtCmd structure – as far as I can see when stepping through the code we set this, line 4102 in nvmeStd.c<o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal">Carolyn<o:p></o:p></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="color:#1F497D"><o:p> </o:p></span></a></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> nvmewin-bounces@lists.openfabrics.org [mailto:nvmewin-bounces@lists.openfabrics.org]
<b>On Behalf Of </b>Foster, Carolyn D<br>
<b>Sent:</b> Friday, January 15, 2016 4:57 PM<br>
<b>To:</b> nvmewin@lists.openfabrics.org<br>
<b>Subject:</b> [nvmewin] Patch with changes for Namespace Management<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal">This patch includes changes to support Namespace Management updates from the NVMe specification 1.2. This patch implements some fixes for handling non-continuous namespaces, adds handling for attached and detached namespaces, and implements
new IOCTLs to create, delete, attach and detach namespaces.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have made a detailed overview of the changes in the text file in the attached zip file, the contents are also copied here below.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Password is intelnvme<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Please let me know if you have any questions.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Carolyn Foster<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This patch includes changes to support Namespace management, including create, delete,
<o:p></o:p></p>
<p class="MsoNormal">attach and detach namespace operations. The new functionality in this patch was tested
<o:p></o:p></p>
<p class="MsoNormal">using proprietary tools. We tested on Server 2008 R2, Server 2012 R2 and Windows 8.1<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">******************<o:p></o:p></p>
<p class="MsoNormal">Design Assumptions<o:p></o:p></p>
<p class="MsoNormal">******************<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">1. The numbering of namespaces need not be consecutive.<o:p></o:p></p>
<p class="MsoNormal">2. The namespace ID can be any number between 1 and 2^32.<o:p></o:p></p>
<p class="MsoNormal">3. A namespace is considered “active” only when it is created and attached to this controller.<o:p></o:p></p>
<p class="MsoNormal">4. A detached namespace, or one that is just created but not yet attached is considered “inactive”.
<o:p></o:p></p>
<p class="MsoNormal">5. A non-existent, or deleted namespace is considered “invalid”.<o:p></o:p></p>
<p class="MsoNormal">6. An active namespace will result in one (and only one) “Online” LUN.<o:p></o:p></p>
<p class="MsoNormal">7. Assuming single-host, and single-controller NVMe system.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">*********************<o:p></o:p></p>
<p class="MsoNormal">Architecture Overview<o:p></o:p></p>
<p class="MsoNormal">*********************<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">There are four new IOCTLs for namespace management, Create, Delete, Attach and Detach. An attached
<o:p></o:p></p>
<p class="MsoNormal">namespace will result in a visible LUN to the Windows OS. The LUN extension table has been updated
<o:p></o:p></p>
<p class="MsoNormal">to have a Namespace status:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">typedef enum _NS_STATUS<o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> INVALID = 0, //Namespace ID does not exist (not known to controller).<o:p></o:p></p>
<p class="MsoNormal"> INACTIVE, //Namespace is created, but not attached to controller.<o:p></o:p></p>
<p class="MsoNormal"> ATTACHED //Namespace is created and attached to controller.<o:p></o:p></p>
<p class="MsoNormal">} NS_STATUS;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In order to properly build the LUN extension table during initialization, we made changes to identify
<o:p></o:p></p>
<p class="MsoNormal">all namespaces, and to determine each namespace’s status. These changes include new states in the
<o:p></o:p></p>
<p class="MsoNormal">Init State Machine NVMeRnningWaitOnListAttachedNs and NVMeRunningWaitOnListExistingNs. The updated
<o:p></o:p></p>
<p class="MsoNormal">state machine steps are as follows:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">1. Send an Identify Namespace command with CNS set to 02h. This should return a list of all active (created and attached) namespaces.<o:p></o:p></p>
<p class="MsoNormal">2. Go through the list and update LUN extension entries accordingly, one entry for each namespace. Set all LUN status to online.<o:p></o:p></p>
<p class="MsoNormal">3. Send an Identify Namespace command with CNS set to 10h. This should return a list of all existing namespaces in the system, active and inactive.<o:p></o:p></p>
<p class="MsoNormal">4. Go through the list. <o:p></o:p></p>
<p class="MsoNormal">5. If a corresponding LUN entry exists, skip this step, as this must have been an active namespace that was covered in previous steps.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">LUN extension entries are populated as follows:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When a namespace is created:<o:p></o:p></p>
<p class="MsoNormal">- namespaceId is set.<o:p></o:p></p>
<p class="MsoNormal">- nsStatus is set to “INACTIVE”<o:p></o:p></p>
<p class="MsoNormal">- slotStatus is set to “FREE”<o:p></o:p></p>
<p class="MsoNormal">- identifyData is partially set<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When a namespace is attached:<o:p></o:p></p>
<p class="MsoNormal">- drive is pulled for namespace identify<o:p></o:p></p>
<p class="MsoNormal">- identifyData is set accordingly<o:p></o:p></p>
<p class="MsoNormal">- nsStatus is set to “ATTACHED”<o:p></o:p></p>
<p class="MsoNormal">- slotStatus is set to “ONLINE”<o:p></o:p></p>
<p class="MsoNormal">- ReadOnly is set to FALSE<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When a namespace is detached:<o:p></o:p></p>
<p class="MsoNormal">- nsStatus is set to “INACTIVE”<o:p></o:p></p>
<p class="MsoNormal">- slotStatus is set to “FREE”<o:p></o:p></p>
<p class="MsoNormal">- ReadOnly is set to TRUE<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When a namespace is deleted:<o:p></o:p></p>
<p class="MsoNormal">- The entire LUN extension entry is set to 0.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">There are also new reasons for the LUN to be offline:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">typedef enum _LUN_OFFLINE_REASON<o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> NOT_OFFLINE,<o:p></o:p></p>
<p class="MsoNormal"> FORMAT_IN_PROGRESS,<o:p></o:p></p>
<p class="MsoNormal"> DETACH_IN_PROGRESS,<o:p></o:p></p>
<p class="MsoNormal"> DELETE_IN_PROGRESS<o:p></o:p></p>
<p class="MsoNormal"> // Add more as needed<o:p></o:p></p>
<p class="MsoNormal">} LUN_OFFLINE_REASON;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When delete or detach requests are made, the driver will call StorportDeviceBusy to pause incoming requests,
<o:p></o:p></p>
<p class="MsoNormal">and the LUN is marked as offline with the appropriate reason. When a user tries to delete an attached namespace,
<o:p></o:p></p>
<p class="MsoNormal">the driver will first send a detach command, and then the delete command.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">*****************<o:p></o:p></p>
<p class="MsoNormal">Known Limitations<o:p></o:p></p>
<p class="MsoNormal">*****************<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">1. If no namepsaces are present, the driver will fail to load.<o:p></o:p></p>
<p class="MsoNormal">2. If an error happens on any one namespace during initialization the driver will fail to load.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The handling for these two scenarios could be strengthened and improved, which we did not get to in this patch.<o:p></o:p></p>
</div>
</body>
</html>