All of lore.kernel.org
 help / color / mirror / Atom feed
* submission queue and completion queue allocation in NVMe
@ 2011-11-23 18:17 Kong, Kwok
  2011-11-23 20:50 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Kong, Kwok @ 2011-11-23 18:17 UTC (permalink / raw)


Matthew,

In the current linux driver, you send a Get Feature with Feature ID = 7
(Number of Queues) to allocate submission and completion queues from the
controller.

My understanding is that you should use Set Feature with Feature ID = 7
to allocate submission and completion queues from the controller.  The
Get Feature with ID = 7 returns the number of queues that have been
allocated.

If you send a Get Feature with ID =7 without first sending a Set Feature
with ID =7, the Get feature should return 0 in Dword 0 as no queues have
been allocated.

Do you agree ?

Thanks

-kwok 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* submission queue and completion queue allocation in NVMe
  2011-11-23 18:17 submission queue and completion queue allocation in NVMe Kong, Kwok
@ 2011-11-23 20:50 ` Matthew Wilcox
  2011-11-23 21:21   ` Kong, Kwok
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2011-11-23 20:50 UTC (permalink / raw)


On Wed, Nov 23, 2011@10:17:19AM -0800, Kong, Kwok wrote:
> Matthew,
> 
> In the current linux driver, you send a Get Feature with Feature ID = 7
> (Number of Queues) to allocate submission and completion queues from the
> controller.
> 
> My understanding is that you should use Set Feature with Feature ID = 7
> to allocate submission and completion queues from the controller.  The
> Get Feature with ID = 7 returns the number of queues that have been
> allocated.
> 
> If you send a Get Feature with ID =7 without first sending a Set Feature
> with ID =7, the Get feature should return 0 in Dword 0 as no queues have
> been allocated.
> 
> Do you agree ?

That wasn't my understanding ... but 7.6.1 says I was incorrect.

If I just change the call to be nvme_admin_set_features instead of
get_features, that's sufficient, right?  I don't need to issue a Set
Features and then a Get Features to find out what was set.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* submission queue and completion queue allocation in NVMe
  2011-11-23 20:50 ` Matthew Wilcox
@ 2011-11-23 21:21   ` Kong, Kwok
  0 siblings, 0 replies; 3+ messages in thread
From: Kong, Kwok @ 2011-11-23 21:21 UTC (permalink / raw)


Agreed. All you need to do is to change the call to be
nvme_admin_set_features instead of get feature.
Set features returns the number of queues that have been allocated. You
don't need to call get feature to find out what was set.

-Kwok


-----Original Message-----
From: Matthew Wilcox [mailto:willy@linux.intel.com] 
Sent: Wednesday, November 23, 2011 12:51 PM
To: Kong, Kwok
Cc: linux-nvme at lists.infradead.org
Subject: Re: submission queue and completion queue allocation in NVMe

On Wed, Nov 23, 2011@10:17:19AM -0800, Kong, Kwok wrote:
> Matthew,
> 
> In the current linux driver, you send a Get Feature with Feature ID = 
> 7 (Number of Queues) to allocate submission and completion queues from

> the controller.
> 
> My understanding is that you should use Set Feature with Feature ID = 
> 7 to allocate submission and completion queues from the controller.  
> The Get Feature with ID = 7 returns the number of queues that have 
> been allocated.
> 
> If you send a Get Feature with ID =7 without first sending a Set 
> Feature with ID =7, the Get feature should return 0 in Dword 0 as no 
> queues have been allocated.
> 
> Do you agree ?

That wasn't my understanding ... but 7.6.1 says I was incorrect.

If I just change the call to be nvme_admin_set_features instead of
get_features, that's sufficient, right?  I don't need to issue a Set
Features and then a Get Features to find out what was set.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-23 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23 18:17 submission queue and completion queue allocation in NVMe Kong, Kwok
2011-11-23 20:50 ` Matthew Wilcox
2011-11-23 21:21   ` Kong, Kwok

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.