All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: Correct NVMF enum values to match NVMe-oF rev 1.0
@ 2017-03-02  2:22 Roland Dreier
  2017-03-02 15:52 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Roland Dreier @ 2017-03-02  2:22 UTC (permalink / raw)


From: Roland Dreier <roland@purestorage.com>

The enum values for QPTYPE, PRTYPE and CMS are off by 1 from the
values defined in figure 42 of the NVM Express over Fabrics 1.0:

    http://www.nvmexpress.org/wp-content/uploads/NVMe_over_Fabrics_1_0_Gold_20160605-1.pdf

Fix our enums to match the final spec.

Signed-off-by: Roland Dreier <roland at purestorage.com>
---
 include/linux/nvme.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index c43d435d4225..9061780b141f 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -64,26 +64,26 @@ enum {
  * RDMA_QPTYPE field
  */
 enum {
-	NVMF_RDMA_QPTYPE_CONNECTED	= 0, /* Reliable Connected */
-	NVMF_RDMA_QPTYPE_DATAGRAM	= 1, /* Reliable Datagram */
+	NVMF_RDMA_QPTYPE_CONNECTED	= 1, /* Reliable Connected */
+	NVMF_RDMA_QPTYPE_DATAGRAM	= 2, /* Reliable Datagram */
 };
 
 /* RDMA QP Service Type codes for Discovery Log Page entry TSAS
  * RDMA_QPTYPE field
  */
 enum {
-	NVMF_RDMA_PRTYPE_NOT_SPECIFIED	= 0, /* No Provider Specified */
-	NVMF_RDMA_PRTYPE_IB		= 1, /* InfiniBand */
-	NVMF_RDMA_PRTYPE_ROCE		= 2, /* InfiniBand RoCE */
-	NVMF_RDMA_PRTYPE_ROCEV2		= 3, /* InfiniBand RoCEV2 */
-	NVMF_RDMA_PRTYPE_IWARP		= 4, /* IWARP */
+	NVMF_RDMA_PRTYPE_NOT_SPECIFIED	= 1, /* No Provider Specified */
+	NVMF_RDMA_PRTYPE_IB		= 2, /* InfiniBand */
+	NVMF_RDMA_PRTYPE_ROCE		= 3, /* InfiniBand RoCE */
+	NVMF_RDMA_PRTYPE_ROCEV2		= 4, /* InfiniBand RoCEV2 */
+	NVMF_RDMA_PRTYPE_IWARP		= 5, /* IWARP */
 };
 
 /* RDMA Connection Management Service Type codes for Discovery Log Page
  * entry TSAS RDMA_CMS field
  */
 enum {
-	NVMF_RDMA_CMS_RDMA_CM	= 0, /* Sockets based enpoint addressing */
+	NVMF_RDMA_CMS_RDMA_CM	= 1, /* Sockets based endpoint addressing */
 };
 
 #define NVMF_AQ_DEPTH		32
-- 
2.10.2

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

* [PATCH] nvme: Correct NVMF enum values to match NVMe-oF rev 1.0
  2017-03-02  2:22 [PATCH] nvme: Correct NVMF enum values to match NVMe-oF rev 1.0 Roland Dreier
@ 2017-03-02 15:52 ` Christoph Hellwig
  2017-03-02 16:02   ` Keith Busch
  2017-03-03 15:52 ` Schremmer, Steven
  2017-03-06 11:43 ` Sagi Grimberg
  2 siblings, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2017-03-02 15:52 UTC (permalink / raw)


On Wed, Mar 01, 2017@06:22:01PM -0800, Roland Dreier wrote:
> From: Roland Dreier <roland at purestorage.com>
> 
> The enum values for QPTYPE, PRTYPE and CMS are off by 1 from the
> values defined in figure 42 of the NVM Express over Fabrics 1.0:
> 
>     http://www.nvmexpress.org/wp-content/uploads/NVMe_over_Fabrics_1_0_Gold_20160605-1.pdf
> 
> Fix our enums to match the final spec.

So this basically affects the discovery information, which at least
in the Linux world is not used anywhere except for printing it in
nvme-cli.  So this looks fine:

Reviewed-by: Christoph Hellwig <hch at lst.de>

But can you also send an update for nvme-cli, please?

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

* [PATCH] nvme: Correct NVMF enum values to match NVMe-oF rev 1.0
  2017-03-02 16:02   ` Keith Busch
@ 2017-03-02 15:56     ` Christoph Hellwig
  2017-03-02 18:08       ` Roland Dreier
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2017-03-02 15:56 UTC (permalink / raw)


On Thu, Mar 02, 2017@11:02:27AM -0500, Keith Busch wrote:
> On Thu, Mar 02, 2017@07:52:42AM -0800, Christoph Hellwig wrote:
> > So this basically affects the discovery information, which at least
> > in the Linux world is not used anywhere except for printing it in
> > nvme-cli.  So this looks fine:
> > 
> > Reviewed-by: Christoph Hellwig <hch at lst.de>
> > 
> > But can you also send an update for nvme-cli, please?
> 
> Yep, that's done: https://github.com/linux-nvme/nvme-cli/pull/161

Grr, damn github pull requests that defeat review..

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

* [PATCH] nvme: Correct NVMF enum values to match NVMe-oF rev 1.0
  2017-03-02 15:52 ` Christoph Hellwig
@ 2017-03-02 16:02   ` Keith Busch
  2017-03-02 15:56     ` Christoph Hellwig
  0 siblings, 1 reply; 9+ messages in thread
From: Keith Busch @ 2017-03-02 16:02 UTC (permalink / raw)


On Thu, Mar 02, 2017@07:52:42AM -0800, Christoph Hellwig wrote:
> So this basically affects the discovery information, which at least
> in the Linux world is not used anywhere except for printing it in
> nvme-cli.  So this looks fine:
> 
> Reviewed-by: Christoph Hellwig <hch at lst.de>
> 
> But can you also send an update for nvme-cli, please?

Yep, that's done: https://github.com/linux-nvme/nvme-cli/pull/161

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

* [PATCH] nvme: Correct NVMF enum values to match NVMe-oF rev 1.0
  2017-03-02 15:56     ` Christoph Hellwig
@ 2017-03-02 18:08       ` Roland Dreier
  2017-03-02 18:34         ` Keith Busch
  0 siblings, 1 reply; 9+ messages in thread
From: Roland Dreier @ 2017-03-02 18:08 UTC (permalink / raw)


On Thu, Mar 2, 2017@7:56 AM, Christoph Hellwig <hch@infradead.org> wrote:
> Grr, damn github pull requests that defeat review..

Are mailing list patches or github pull requests preferred for
nvme-cli changes?  (Christoph I know how you'll answer, more wondering
about Keith ;)

I thought that the "github native" method is better for github-hosted
projects, but obviously I can just as easily email patches.

 - R.

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

* [PATCH] nvme: Correct NVMF enum values to match NVMe-oF rev 1.0
  2017-03-02 18:08       ` Roland Dreier
@ 2017-03-02 18:34         ` Keith Busch
  2017-03-02 19:04           ` Roland Dreier
  0 siblings, 1 reply; 9+ messages in thread
From: Keith Busch @ 2017-03-02 18:34 UTC (permalink / raw)


On Thu, Mar 02, 2017@10:08:24AM -0800, Roland Dreier wrote:
> On Thu, Mar 2, 2017@7:56 AM, Christoph Hellwig <hch@infradead.org> wrote:
> > Grr, damn github pull requests that defeat review..
> 
> Are mailing list patches or github pull requests preferred for
> nvme-cli changes?  (Christoph I know how you'll answer, more wondering
> about Keith ;)

Just considering the convenience, I can pull github requests from just about
anywhere in the world with one click on my phone. It's a slightly more
involved process to apply email patches. :)

I'm really okay with either, though substantial changes should be sent to
the mailing list first since that is our single source of all linux-nvme
related reviewers. I currently rely on our best judgement to decide what's
mailing list material, but if Christoph or anyone is really concerned
about this, I will concede the mailing list as the preferred path.

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

* [PATCH] nvme: Correct NVMF enum values to match NVMe-oF rev 1.0
  2017-03-02 18:34         ` Keith Busch
@ 2017-03-02 19:04           ` Roland Dreier
  0 siblings, 0 replies; 9+ messages in thread
From: Roland Dreier @ 2017-03-02 19:04 UTC (permalink / raw)


On Thu, Mar 2, 2017@10:34 AM, Keith Busch <keith.busch@intel.com> wrote:
> Just considering the convenience, I can pull github requests from just about
> anywhere in the world with one click on my phone. It's a slightly more
> involved process to apply email patches. :)
>
> I'm really okay with either, though substantial changes should be sent to
> the mailing list first since that is our single source of all linux-nvme
> related reviewers. I currently rely on our best judgement to decide what's
> mailing list material, but if Christoph or anyone is really concerned
> about this, I will concede the mailing list as the preferred path.

It's easy enough to do both, I'll do that for the second fix I have now.

 - R.

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

* [PATCH] nvme: Correct NVMF enum values to match NVMe-oF rev 1.0
  2017-03-02  2:22 [PATCH] nvme: Correct NVMF enum values to match NVMe-oF rev 1.0 Roland Dreier
  2017-03-02 15:52 ` Christoph Hellwig
@ 2017-03-03 15:52 ` Schremmer, Steven
  2017-03-06 11:43 ` Sagi Grimberg
  2 siblings, 0 replies; 9+ messages in thread
From: Schremmer, Steven @ 2017-03-03 15:52 UTC (permalink / raw)


> From: Roland Dreier <roland at purestorage.com>
> 
> The enum values for QPTYPE, PRTYPE and CMS are off by 1 from the
> values defined in figure 42 of the NVM Express over Fabrics 1.0:
> 
>     http://www.nvmexpress.org/wp-content/uploads/NVMe_over_Fabrics_1_0_Gold_20160605-1.pdf
> 
> Fix our enums to match the final spec.
> 
> Signed-off-by: Roland Dreier <roland at purestorage.com>
> ---
>  include/linux/nvme.h | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/include/linux/nvme.h b/include/linux/nvme.h
> index c43d435d4225..9061780b141f 100644
> --- a/include/linux/nvme.h
> +++ b/include/linux/nvme.h
> @@ -64,26 +64,26 @@ enum {
>   * RDMA_QPTYPE field
>   */
>  enum {
> -	NVMF_RDMA_QPTYPE_CONNECTED	= 0, /* Reliable Connected */
> -	NVMF_RDMA_QPTYPE_DATAGRAM	= 1, /* Reliable Datagram */
> +	NVMF_RDMA_QPTYPE_CONNECTED	= 1, /* Reliable Connected */
> +	NVMF_RDMA_QPTYPE_DATAGRAM	= 2, /* Reliable Datagram */
>  };
> 
>  /* RDMA QP Service Type codes for Discovery Log Page entry TSAS
>   * RDMA_QPTYPE field
>   */
>  enum {
> -	NVMF_RDMA_PRTYPE_NOT_SPECIFIED	= 0, /* No Provider Specified */
> -	NVMF_RDMA_PRTYPE_IB		= 1, /* InfiniBand */
> -	NVMF_RDMA_PRTYPE_ROCE		= 2, /* InfiniBand RoCE */
> -	NVMF_RDMA_PRTYPE_ROCEV2		= 3, /* InfiniBand RoCEV2 */
> -	NVMF_RDMA_PRTYPE_IWARP		= 4, /* IWARP */
> +	NVMF_RDMA_PRTYPE_NOT_SPECIFIED	= 1, /* No Provider Specified */
> +	NVMF_RDMA_PRTYPE_IB		= 2, /* InfiniBand */
> +	NVMF_RDMA_PRTYPE_ROCE		= 3, /* InfiniBand RoCE */
> +	NVMF_RDMA_PRTYPE_ROCEV2		= 4, /* InfiniBand RoCEV2 */
> +	NVMF_RDMA_PRTYPE_IWARP		= 5, /* IWARP */
>  };
> 
>  /* RDMA Connection Management Service Type codes for Discovery Log Page
>   * entry TSAS RDMA_CMS field
>   */
>  enum {
> -	NVMF_RDMA_CMS_RDMA_CM	= 0, /* Sockets based enpoint addressing */
> +	NVMF_RDMA_CMS_RDMA_CM	= 1, /* Sockets based endpoint addressing */
>  };
> 
>  #define NVMF_AQ_DEPTH		32
> --
> 2.10.2

Thanks. I was preparing a to send a patch for this. 
You might want to fix the comment above the NVMF_RDMA_PRTYPE_ enum, as it's just a copy of the one above it.
Reviewed-by: Steve Schremmer <steve.schremmer at netapp.com>

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

* [PATCH] nvme: Correct NVMF enum values to match NVMe-oF rev 1.0
  2017-03-02  2:22 [PATCH] nvme: Correct NVMF enum values to match NVMe-oF rev 1.0 Roland Dreier
  2017-03-02 15:52 ` Christoph Hellwig
  2017-03-03 15:52 ` Schremmer, Steven
@ 2017-03-06 11:43 ` Sagi Grimberg
  2 siblings, 0 replies; 9+ messages in thread
From: Sagi Grimberg @ 2017-03-06 11:43 UTC (permalink / raw)


Looks good,

Reviewed-by: Sagi Grimberg <sagi at grimberg.me>

Thanks Roland.

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

end of thread, other threads:[~2017-03-06 11:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-02  2:22 [PATCH] nvme: Correct NVMF enum values to match NVMe-oF rev 1.0 Roland Dreier
2017-03-02 15:52 ` Christoph Hellwig
2017-03-02 16:02   ` Keith Busch
2017-03-02 15:56     ` Christoph Hellwig
2017-03-02 18:08       ` Roland Dreier
2017-03-02 18:34         ` Keith Busch
2017-03-02 19:04           ` Roland Dreier
2017-03-03 15:52 ` Schremmer, Steven
2017-03-06 11:43 ` Sagi Grimberg

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.