From carolyn.d.foster at intel.com Fri Feb 5 07:40:20 2016 From: carolyn.d.foster at intel.com (Foster, Carolyn D) Date: Fri, 5 Feb 2016 15:40:20 +0000 Subject: [nvmewin] Review comments for Namespace Management patch In-Reply-To: <58.D7.05161.EF6F8A65@epcpsbgx4.samsung.com> References: <58.D7.05161.EF6F8A65@epcpsbgx4.samsung.com> Message-ID: Hi Suman, I have reviewed your comments and I should be able to address them all. I have two questions, I didn't completely understand the following items in your email, and was hoping you could clarify. Thanks! >From review comments, I don't understand what you are suggesting for this one: 3. Function: NVMeCompletionNsAttachment() Line No: 4138 File: nvmeStd.c It is safe to set SEL field to NAMESPACE_MANAGEMENT_DELETE in the pNsMgmtCmd structure. >From Queries, I also don't understand the question. Is there a problem here? It doesn't hurt anything to send commands to inactive namespaces, but it's not required either. This might be a substantial change, and I'm not sure that it's something I can commit to fixing. 1) Looks like The Identify namespace, set feature/get feature commands during the init state machine have been sent to inactive namespaces also. For example one of the below check condition, leads to the above issue. This has to be taken care in all the scenario. Function: NVMeSetFeaturesCompletion() Line no: 1631 File: nvmeInit.c if (pAE->DriverState.TtlLbaRangeExamined == pAE->DriverState.NumKnownNamespaces) { /* We have called identify namespace as well as get/set * features for each of the NN namespaces that exist. * Move on to the next state in the state machine. */ pAE->visibleLuns = pAE->DriverState.VisibleNamespacesExamined; pAE->DriverState.NextDriverState = NVMeWaitOnSetupQueues; } Could you please confirm is it required to issue commands to the inactive namespaces also? If not, we can keep track of active namespaces and issue commands to only those namespaces. From: SUMAN PRAKASH B [mailto:suman.p at samsung.com] Sent: Wednesday, January 27, 2016 9:58 AM To: nvmewin-request at lists.openfabrics.org; nvmewin at lists.openfabrics.org; Foster, Carolyn D ; Robles, Raymond C Cc: judy.brock at ssi.samsung.com; tru.nguyen at ssi.samsung.com; MANOJ THAPLIYAL ; anshul at samsung.com Subject: Review comments for Namespace Management patch Hi Carolyn, Please find below our Review comments and Queries. Review Comments: 1. Function: NVMeIoctlNamespaceMgmt() Line no: 4005 File: nvmeStd.c In the NVMeIoctlNamespaceMgmt() function, the namesapce status verification can be done only incase of NAMESPACE_MANAGEMENT_DELETE as for NAMESPACE_MANAGEMENT_CREATE, the NSID value is reserved. NVMeGetNamespaceStatusAndSlot(pDevExt, currentNSID, &lunId); This function can be moved inside the below condition. if (pNsMgmtDW10->SEL == NAMESPACE_MANAGEMENT_DELETE) { } 2. Function: NVMeIoctlNamespaceMgmt() Line no: 4017 File: nvmeStd.c The DataBuffer(pNvmePtIoctl->DataBuffer) may not be allocated any memory as no data structure required for NAMESPACE_MANAGEMENT_DELETE operation. pNsCtrlsList = (PNVMe_CONTROLLER_LIST)&pNvmePtIoctl->DataBuffer; It is good to allocate memory for pNsCtrlsList and free the memory after command completion. 3. Function: NVMeCompletionNsAttachment() Line No: 4138 File: nvmeStd.c It is safe to set SEL field to NAMESPACE_MANAGEMENT_DELETE in the pNsMgmtCmd structure. 4. Function: NVMeIoctlNamespaceAttachment() Line no: 3931 File: nvmeStd.c The StorPortNotification(BusChangeDetected, pDevExt); has been called twice while performing the NAMESPACE DELETE. This is for the below sequence of operations. a. Create Namespace b. Attach Namespace c. Delete Namespace The overall execution flow looks as below. 1) Namespace Delete command issued. 2) Set: pLunExt->slotStatus = OFFLINE; pLunExt->offlineReason = DELETE_IN_PROGRESS; 3) StorPortNotification(BusChangeDetected, pDevExt); 4) Namespace Detach Command Issued 5) Detach Command Success 6) Set: pLunExt->nsStatus = INACTIVE; pLunExt->slotStatus = FREE; pLunExt->ReadOnly = TRUE; 7) pDevExt->visibleLuns--; 8) StorPortNotification(BusChangeDetected, pDevExt); 9) Delete Command Issued 10)Delete Command Success 11) Set Lun Extn Table to zero The same behavior observed while executing NAMESPACE DETACH command. This is for the below sequence of operations. a. Create Namespace b. Attach Namespace c. Detach Namespace The overall execution flow looks as below. 1) Namespace Detach command issued. 2) Set: pLunExt->slotStatus = OFFLINE; pLunExt->offlineReason = DETACH_IN_PROGRESS; 3) StorPortNotification(BusChangeDetected, pDevExt); 4) Detach Command Success 5) Set: pLunExt->nsStatus = INACTIVE; pLunExt->slotStatus = FREE; pLunExt->ReadOnly = TRUE; pLunExt->OfflineReason = NOT_OFFLINE; 6) pDevExt->visibleLuns--; 7) StorPortNotification(BusChangeDetected, pDevExt); This StorPortNotification() call of multiple times can be avoided. Queries: 1) Looks like The Identify namespace, set feature/get feature commands during the init state machine have been sent to inactive namespaces also. For example one of the below check condition, leads to the above issue. This has to be taken care in all the scenario. Function: NVMeSetFeaturesCompletion() Line no: 1631 File: nvmeInit.c if (pAE->DriverState.TtlLbaRangeExamined == pAE->DriverState.NumKnownNamespaces) { /* We have called identify namespace as well as get/set * features for each of the NN namespaces that exist. * Move on to the next state in the state machine. */ pAE->visibleLuns = pAE->DriverState.VisibleNamespacesExamined; pAE->DriverState.NextDriverState = NVMeWaitOnSetupQueues; } Could you please confirm is it required to issue commands to the inactive namespaces also? If not, we can keep track of active namespaces and issue commands to only those namespaces. 2) Function: NVMeCompletionNsAttachment() Line no: 4099 File: nvmeStd.c Could you please confirm if its a Identify Controller or Identify Namespace commands? If this is Identify Controller command, the NSID need not be set and CNS should be mentioned. If this is Identify Namespace command, then size of PRP preparation should not be sizeof(ADMIN_IDENTIFY_CONTROLLER) at line no: 4102 Thanks, Suman ---------------------------------------------------------------------- Message: 1 Date: Fri, 15 Jan 2016 23:57:26 +0000 From: "Foster, Carolyn D" > To: "nvmewin at lists.openfabrics.org" > Subject: [nvmewin] Patch with changes for Namespace Management Message-ID: > Content-Type: text/plain; charset="us-ascii" Hi all, 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. 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. Password is intelnvme Please let me know if you have any questions. Carolyn Foster This patch includes changes to support Namespace management, including create, delete, attach and detach namespace operations. The new functionality in this patch was tested using proprietary tools. We tested on Server 2008 R2, Server 2012 R2 and Windows 8.1 ****************** Design Assumptions ****************** 1. The numbering of namespaces need not be consecutive. 2. The namespace ID can be any number between 1 and 2^32. 3. A namespace is considered "active" only when it is created and attached to this controller. 4. A detached namespace, or one that is just created but not yet attached is considered "inactive". 5. A non-existent, or deleted namespace is considered "invalid". 6. An active namespace will result in one (and only one) "Online" LUN. 7. Assuming single-host, and single-controller NVMe system. ********************* Architecture Overview ********************* There are four new IOCTLs for namespace management, Create, Delete, Attach and Detach. An attached namespace will result in a visible LUN to the Windows OS. The LUN extension table has been updated to have a Namespace status: typedef enum _NS_STATUS { INVALID = 0, //Namespace ID does not exist (not known to controller). INACTIVE, //Namespace is created, but not attached to controller. ATTACHED //Namespace is created and attached to controller. } NS_STATUS; In order to properly build the LUN extension table during initialization, we made changes to identify all namespaces, and to determine each namespace's status. These changes include new states in the Init State Machine NVMeRnningWaitOnListAttachedNs and NVMeRunningWaitOnListExistingNs. The updated state machine steps are as follows: 1. Send an Identify Namespace command with CNS set to 02h. This should return a list of all active (created and attached) namespaces. 2. Go through the list and update LUN extension entries accordingly, one entry for each namespace. Set all LUN status to online. 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. 4. Go through the list. 5. If a corresponding LUN entry exists, skip this step, as this must have been an active namespace that was covered in previous steps. LUN extension entries are populated as follows: When a namespace is created: - namespaceId is set. - nsStatus is set to "INACTIVE" - slotStatus is set to "FREE" - identifyData is partially set When a namespace is attached: - drive is pulled for namespace identify - identifyData is set accordingly - nsStatus is set to "ATTACHED" - slotStatus is set to "ONLINE" - ReadOnly is set to FALSE When a namespace is detached: - nsStatus is set to "INACTIVE" - slotStatus is set to "FREE" - ReadOnly is set to TRUE When a namespace is deleted: - The entire LUN extension entry is set to 0. There are also new reasons for the LUN to be offline: typedef enum _LUN_OFFLINE_REASON { NOT_OFFLINE, FORMAT_IN_PROGRESS, DETACH_IN_PROGRESS, DELETE_IN_PROGRESS // Add more as needed } LUN_OFFLINE_REASON; When delete or detach requests are made, the driver will call StorportDeviceBusy to pause incoming requests, and the LUN is marked as offline with the appropriate reason. When a user tries to delete an attached namespace, the driver will first send a detach command, and then the delete command. ***************** Known Limitations ***************** 1. If no namepsaces are present, the driver will fail to load. 2. If an error happens on any one namespace during initialization the driver will fail to load. The handling for these two scenarios could be strengthened and improved, which we did not get to in this patch. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IntelNamespaceManagementV1.zip Type: application/x-zip-compressed Size: 222253 bytes Desc: IntelNamespaceManagementV1.zip URL: ------------------------------ _______________________________________________ nvmewin mailing list nvmewin at lists.openfabrics.org http://lists.openfabrics.org/mailman/listinfo/nvmewin End of nvmewin Digest, Vol 49, Issue 3 **************************************

 

 

[http://ext.samsung.net/mailcheck/SeenTimeChecker?do=28bccb0e7a1e0d06003ec0f993c867c045ed77d46f93657db8a3fd6b4a260c0ed33a9d35f6e1735f20a30c65ae77ad69c7b41e955949e5c8a728c55b39cc59eacf878f9a26ce15a0] -------------- next part -------------- An HTML attachment was scrubbed... URL: From suman.p at samsung.com Mon Feb 8 05:32:23 2016 From: suman.p at samsung.com (SUMAN PRAKASH B) Date: Mon, 08 Feb 2016 13:32:23 +0000 (GMT) Subject: [nvmewin] Review comments for Namespace Management patch Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 201602081902462_Z5JE7EUA.gif Type: image/gif Size: 13168 bytes Desc: not available URL: From patil_suresh420 at yahoo.com Mon Feb 22 07:35:32 2016 From: patil_suresh420 at yahoo.com (Suresh Patil) Date: Mon, 22 Feb 2016 15:35:32 +0000 (UTC) Subject: [nvmewin] WHQL limitation of class code References: <1895423389.8438136.1456155332241.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1895423389.8438136.1456155332241.JavaMail.yahoo@mail.yahoo.com> Hi, I ran the WHQL and found that it is failing with the error: "DriverPackage C:\Windows\Inf\oem1.inf has a Hardware Id or a Compatible Id that begins with pci\cc_" It seems that third party vendors cannot have a signed class driver! How come this issue was not encountered during WHQL testing here, or am I missing something? Regards, Suresh From carolyn.d.foster at intel.com Mon Feb 22 14:36:43 2016 From: carolyn.d.foster at intel.com (Foster, Carolyn D) Date: Mon, 22 Feb 2016 22:36:43 +0000 Subject: [nvmewin] WHQL limitation of class code In-Reply-To: <1895423389.8438136.1456155332241.JavaMail.yahoo@mail.yahoo.com> References: <1895423389.8438136.1456155332241.JavaMail.yahoo.ref@mail.yahoo.com> <1895423389.8438136.1456155332241.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Suresh, It seems likely that Microsoft doesn't allow 3rd party vendors to sign drivers that target a class code instead of a vendor and device ID. But unfortunately I can't find any documentation that provides confirmation. Originally the goal for the certification task was to verify that the certification tests ran successfully on the OFA NVMe driver and not to actually certify the driver. Likely, the INF file was either modified to include a specific device and vendor ID to run certification or the standalone executables were extracted and run individually. Carolyn -----Original Message----- From: nvmewin-bounces at lists.openfabrics.org [mailto:nvmewin-bounces at lists.openfabrics.org] On Behalf Of Suresh Patil Sent: Monday, February 22, 2016 8:36 AM To: nvmewin at lists.openfabrics.org Subject: [nvmewin] WHQL limitation of class code Hi, I ran the WHQL and found that it is failing with the error: "DriverPackage C:\Windows\Inf\oem1.inf has a Hardware Id or a Compatible Id that begins with pci\cc_" It seems that third party vendors cannot have a signed class driver! How come this issue was not encountered during WHQL testing here, or am I missing something? Regards, Suresh _______________________________________________ nvmewin mailing list nvmewin at lists.openfabrics.org http://lists.openfabrics.org/mailman/listinfo/nvmewin From carolyn.d.foster at intel.com Fri Feb 26 08:27:49 2016 From: carolyn.d.foster at intel.com (Foster, Carolyn D) Date: Fri, 26 Feb 2016 16:27:49 +0000 Subject: [nvmewin] Patch with changes for Namespace Management In-Reply-To: References: Message-ID: Hi all, 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 Patch updates: - Server 2012 was failing to shut down because of mismatched calls to StorportDeviceBusy and StorportDeviceReady after delete or detach commands. - NVMeGetNamespaceStatusAndSlot(pDevExt, currentNSID, &lunId); moved inside the below condition. if (pNsMgmtDW10->SEL == NAMESPACE_MANAGEMENT_DELETE) { } - In function: NVMeIoctlNamespaceMgmt - allocate memory for pNsCtrlsList and free the memory after command completion. - In the Namespace Detach/Delete path - removed unnecessary calls to StorportNotification - In functions NVMeCompletionNsAttachment and FormatNVMGetIdentify changed PRP preparation to size of Identify Namespace - In function NVMeSetFeaturesCompletion added check for SC==INVALID_NAMESPACE_OR_FORMAT - In function NVMeSetFeaturesCompletion For the case where NS Mgmt is not supported, nsStatus should be set to ATTACHED - In function NVMeSetFeaturesCompletion In the case where NS mgmt is not supported, nsStatus will be "INVALID" Suggested feedback I did not incorporate: - 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. - pAE->DriverState.NumQueuesSet - I could not find any such field in the driver - 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. - I didn't make any of the suggested changes to the LBA RANGE buffer size, because again, I could not commit to testing them - It is safe to set SEL field to NAMESPACE_MANAGEMENT_DELETE in the pNsMgmtCmd structure - as far as I can see when stepping through the code we set this, line 4102 in nvmeStd.c Carolyn From: nvmewin-bounces at lists.openfabrics.org [mailto:nvmewin-bounces at lists.openfabrics.org] On Behalf Of Foster, Carolyn D Sent: Friday, January 15, 2016 4:57 PM To: nvmewin at lists.openfabrics.org Subject: [nvmewin] Patch with changes for Namespace Management Hi all, 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. 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. Password is intelnvme Please let me know if you have any questions. Carolyn Foster This patch includes changes to support Namespace management, including create, delete, attach and detach namespace operations. The new functionality in this patch was tested using proprietary tools. We tested on Server 2008 R2, Server 2012 R2 and Windows 8.1 ****************** Design Assumptions ****************** 1. The numbering of namespaces need not be consecutive. 2. The namespace ID can be any number between 1 and 2^32. 3. A namespace is considered "active" only when it is created and attached to this controller. 4. A detached namespace, or one that is just created but not yet attached is considered "inactive". 5. A non-existent, or deleted namespace is considered "invalid". 6. An active namespace will result in one (and only one) "Online" LUN. 7. Assuming single-host, and single-controller NVMe system. ********************* Architecture Overview ********************* There are four new IOCTLs for namespace management, Create, Delete, Attach and Detach. An attached namespace will result in a visible LUN to the Windows OS. The LUN extension table has been updated to have a Namespace status: typedef enum _NS_STATUS { INVALID = 0, //Namespace ID does not exist (not known to controller). INACTIVE, //Namespace is created, but not attached to controller. ATTACHED //Namespace is created and attached to controller. } NS_STATUS; In order to properly build the LUN extension table during initialization, we made changes to identify all namespaces, and to determine each namespace's status. These changes include new states in the Init State Machine NVMeRnningWaitOnListAttachedNs and NVMeRunningWaitOnListExistingNs. The updated state machine steps are as follows: 1. Send an Identify Namespace command with CNS set to 02h. This should return a list of all active (created and attached) namespaces. 2. Go through the list and update LUN extension entries accordingly, one entry for each namespace. Set all LUN status to online. 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. 4. Go through the list. 5. If a corresponding LUN entry exists, skip this step, as this must have been an active namespace that was covered in previous steps. LUN extension entries are populated as follows: When a namespace is created: - namespaceId is set. - nsStatus is set to "INACTIVE" - slotStatus is set to "FREE" - identifyData is partially set When a namespace is attached: - drive is pulled for namespace identify - identifyData is set accordingly - nsStatus is set to "ATTACHED" - slotStatus is set to "ONLINE" - ReadOnly is set to FALSE When a namespace is detached: - nsStatus is set to "INACTIVE" - slotStatus is set to "FREE" - ReadOnly is set to TRUE When a namespace is deleted: - The entire LUN extension entry is set to 0. There are also new reasons for the LUN to be offline: typedef enum _LUN_OFFLINE_REASON { NOT_OFFLINE, FORMAT_IN_PROGRESS, DETACH_IN_PROGRESS, DELETE_IN_PROGRESS // Add more as needed } LUN_OFFLINE_REASON; When delete or detach requests are made, the driver will call StorportDeviceBusy to pause incoming requests, and the LUN is marked as offline with the appropriate reason. When a user tries to delete an attached namespace, the driver will first send a detach command, and then the delete command. ***************** Known Limitations ***************** 1. If no namepsaces are present, the driver will fail to load. 2. If an error happens on any one namespace during initialization the driver will fail to load. The handling for these two scenarios could be strengthened and improved, which we did not get to in this patch. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IntelNamespaceManagementV2.zip Type: application/x-zip-compressed Size: 225855 bytes Desc: IntelNamespaceManagementV2.zip URL: From bli at cnexlabs.com Sun Feb 28 02:15:11 2016 From: bli at cnexlabs.com (Bin Li) Date: Sun, 28 Feb 2016 10:15:11 +0000 Subject: [nvmewin] Windows 2012 NVM Express Driver Message-ID: Hi Sir, Could you provide the Driver of Windows 2012 NVM Express? Thank you very much! Bin li -------------- next part -------------- An HTML attachment was scrubbed... URL: From raymond.c.robles at intel.com Mon Feb 29 09:21:20 2016 From: raymond.c.robles at intel.com (Robles, Raymond C) Date: Mon, 29 Feb 2016 17:21:20 +0000 Subject: [nvmewin] Windows 2012 NVM Express Driver In-Reply-To: References: Message-ID: <49158E750348AA499168FD41D8898360726250CF@fmsmsx117.amr.corp.intel.com> Hello, The driver is available for download to all via an SVN client (i.e. TortoiseSVN). Just use the repo address provided on the OFA website (https://www.openfabrics.org/svnrepo/nvmewin) You can also browse the source on your internet browser at the same address --> https://www.openfabrics.org/svnrepo/nvmewin Thanks, Ray From: nvmewin [mailto:nvmewin-bounces at lists.openfabrics.org] On Behalf Of Bin Li Sent: Sunday, February 28, 2016 3:15 AM To: nvmewin at lists.openfabrics.org Subject: [nvmewin] Windows 2012 NVM Express Driver Hi Sir, Could you provide the Driver of Windows 2012 NVM Express? Thank you very much! Bin li -------------- next part -------------- An HTML attachment was scrubbed... URL: From yawei.cao at memblaze.com Mon Feb 29 20:15:48 2016 From: yawei.cao at memblaze.com (Yawei Cao) Date: Tue, 1 Mar 2016 04:15:48 +0000 Subject: [nvmewin] Send patch and apply to be a maintainer of NVMe Windws Driver Message-ID: Hi, I’m a Windows driver engineer in Memblaze in Beijing. During my working, I find a bug of Windows driver. The bug is Windows OS crash when the core number larger than 256. The root cause is the data type of Variable “Core” is UCHAR. If the core number larger than 256, the for structure below will be an endless loop. And then, the system will be a long time with a prolonged run time at an IRQL of DISPATCH_LEVEL or above. Best regards, Yawei Email:yawei.cao at memblaze.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: nvmeInit.c.patch Type: application/octet-stream Size: 391 bytes Desc: nvmeInit.c.patch URL: