All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-4.11-rc 0/3] Fix wrong sqsize settings in fabrics
@ 2017-04-06  6:15 Sagi Grimberg
  2017-04-06  6:15 ` [PATCH for-4.11-rc 1/3] nvme-loop: Fix sqsize wrong assignment based on ctrl MQES capability Sagi Grimberg
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Sagi Grimberg @ 2017-04-06  6:15 UTC (permalink / raw)


This should have been fixed by now, but apparently it wasn't.

Sagi Grimberg (3):
  nvme-loop: Fix sqsize wrong assignment based on ctrl MQES capability
  nvme-rdma: Fix sqsize wrong assignment based on ctrl MQES capability
  nvme-fc: Fix sqsize wrong assignment based on ctrl MQES capability

 drivers/nvme/host/fc.c     | 2 +-
 drivers/nvme/host/rdma.c   | 2 +-
 drivers/nvme/target/loop.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.7.4

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

* [PATCH for-4.11-rc 1/3] nvme-loop: Fix sqsize wrong assignment based on ctrl MQES capability
  2017-04-06  6:15 [PATCH for-4.11-rc 0/3] Fix wrong sqsize settings in fabrics Sagi Grimberg
@ 2017-04-06  6:15 ` Sagi Grimberg
  2017-04-06  6:15 ` [PATCH for-4.11-rc 2/3] nvme-rdma: " Sagi Grimberg
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Sagi Grimberg @ 2017-04-06  6:15 UTC (permalink / raw)


both our sqsize and the controller MQES cap are a 0 based value,
so making it 1 based is wrong.

Reported-by: Trapp, Darren <Darren.Trapp at cavium.com>
Reported-by: Daniel Verkamp <daniel.verkamp at intel.com>
Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
 drivers/nvme/target/loop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index 33b431e4eec3..0487fdf82cfc 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -408,7 +408,7 @@ static int nvme_loop_configure_admin_queue(struct nvme_loop_ctrl *ctrl)
 	}
 
 	ctrl->ctrl.sqsize =
-		min_t(int, NVME_CAP_MQES(ctrl->cap) + 1, ctrl->ctrl.sqsize);
+		min_t(int, NVME_CAP_MQES(ctrl->cap), ctrl->ctrl.sqsize);
 
 	error = nvme_enable_ctrl(&ctrl->ctrl, ctrl->cap);
 	if (error)
-- 
2.7.4

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

* [PATCH for-4.11-rc 2/3] nvme-rdma: Fix sqsize wrong assignment based on ctrl MQES capability
  2017-04-06  6:15 [PATCH for-4.11-rc 0/3] Fix wrong sqsize settings in fabrics Sagi Grimberg
  2017-04-06  6:15 ` [PATCH for-4.11-rc 1/3] nvme-loop: Fix sqsize wrong assignment based on ctrl MQES capability Sagi Grimberg
@ 2017-04-06  6:15 ` Sagi Grimberg
  2017-04-06  6:15 ` [PATCH for-4.11-rc 3/3] nvme-fc: " Sagi Grimberg
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Sagi Grimberg @ 2017-04-06  6:15 UTC (permalink / raw)


both our sqsize and the controller MQES cap are a 0 based value,
so making it 1 based is wrong.

Reported-by: Trapp, Darren <Darren.Trapp at cavium.com>
Reported-by: Daniel Verkamp <daniel.verkamp at intel.com>
Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
 drivers/nvme/host/rdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 4aae363943e3..d674ca32ef02 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1600,7 +1600,7 @@ static int nvme_rdma_configure_admin_queue(struct nvme_rdma_ctrl *ctrl)
 	}
 
 	ctrl->ctrl.sqsize =
-		min_t(int, NVME_CAP_MQES(ctrl->cap) + 1, ctrl->ctrl.sqsize);
+		min_t(int, NVME_CAP_MQES(ctrl->cap), ctrl->ctrl.sqsize);
 
 	error = nvme_enable_ctrl(&ctrl->ctrl, ctrl->cap);
 	if (error)
-- 
2.7.4

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

* [PATCH for-4.11-rc 3/3] nvme-fc: Fix sqsize wrong assignment based on ctrl MQES capability
  2017-04-06  6:15 [PATCH for-4.11-rc 0/3] Fix wrong sqsize settings in fabrics Sagi Grimberg
  2017-04-06  6:15 ` [PATCH for-4.11-rc 1/3] nvme-loop: Fix sqsize wrong assignment based on ctrl MQES capability Sagi Grimberg
  2017-04-06  6:15 ` [PATCH for-4.11-rc 2/3] nvme-rdma: " Sagi Grimberg
@ 2017-04-06  6:15 ` Sagi Grimberg
  2017-04-06  8:44 ` [PATCH for-4.11-rc 0/3] Fix wrong sqsize settings in fabrics Christoph Hellwig
  2017-04-09 12:29 ` Sagi Grimberg
  4 siblings, 0 replies; 7+ messages in thread
From: Sagi Grimberg @ 2017-04-06  6:15 UTC (permalink / raw)


both our sqsize and the controller MQES cap are a 0 based value,
so making it 1 based is wrong.

Reported-by: Trapp, Darren <Darren.Trapp at cavium.com>
Reported-by: Daniel Verkamp <daniel.verkamp at intel.com>
Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
 drivers/nvme/host/fc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index fc42172c796a..6953a5762153 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -2011,7 +2011,7 @@ nvme_fc_configure_admin_queue(struct nvme_fc_ctrl *ctrl)
 	}
 
 	ctrl->ctrl.sqsize =
-		min_t(int, NVME_CAP_MQES(ctrl->cap) + 1, ctrl->ctrl.sqsize);
+		min_t(int, NVME_CAP_MQES(ctrl->cap), ctrl->ctrl.sqsize);
 
 	error = nvme_enable_ctrl(&ctrl->ctrl, ctrl->cap);
 	if (error)
-- 
2.7.4

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

* [PATCH for-4.11-rc 0/3] Fix wrong sqsize settings in fabrics
  2017-04-06  6:15 [PATCH for-4.11-rc 0/3] Fix wrong sqsize settings in fabrics Sagi Grimberg
                   ` (2 preceding siblings ...)
  2017-04-06  6:15 ` [PATCH for-4.11-rc 3/3] nvme-fc: " Sagi Grimberg
@ 2017-04-06  8:44 ` Christoph Hellwig
  2017-04-09 12:29 ` Sagi Grimberg
  4 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2017-04-06  8:44 UTC (permalink / raw)


All the fixes looks good:

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

But this duplicate code really screams for factoring it into helper..

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

* [PATCH for-4.11-rc 0/3] Fix wrong sqsize settings in fabrics
  2017-04-06  6:15 [PATCH for-4.11-rc 0/3] Fix wrong sqsize settings in fabrics Sagi Grimberg
                   ` (3 preceding siblings ...)
  2017-04-06  8:44 ` [PATCH for-4.11-rc 0/3] Fix wrong sqsize settings in fabrics Christoph Hellwig
@ 2017-04-09 12:29 ` Sagi Grimberg
  2017-04-09 19:58   ` Jens Axboe
  4 siblings, 1 reply; 7+ messages in thread
From: Sagi Grimberg @ 2017-04-09 12:29 UTC (permalink / raw)



> This should have been fixed by now, but apparently it wasn't.

Jens, care to pick it up for your next rc pull-request?

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

* [PATCH for-4.11-rc 0/3] Fix wrong sqsize settings in fabrics
  2017-04-09 12:29 ` Sagi Grimberg
@ 2017-04-09 19:58   ` Jens Axboe
  0 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2017-04-09 19:58 UTC (permalink / raw)


On 04/09/2017 06:29 AM, Sagi Grimberg wrote:
> 
>> This should have been fixed by now, but apparently it wasn't.
> 
> Jens, care to pick it up for your next rc pull-request?

Yep, added, thanks.

-- 
Jens Axboe

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

end of thread, other threads:[~2017-04-09 19:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-06  6:15 [PATCH for-4.11-rc 0/3] Fix wrong sqsize settings in fabrics Sagi Grimberg
2017-04-06  6:15 ` [PATCH for-4.11-rc 1/3] nvme-loop: Fix sqsize wrong assignment based on ctrl MQES capability Sagi Grimberg
2017-04-06  6:15 ` [PATCH for-4.11-rc 2/3] nvme-rdma: " Sagi Grimberg
2017-04-06  6:15 ` [PATCH for-4.11-rc 3/3] nvme-fc: " Sagi Grimberg
2017-04-06  8:44 ` [PATCH for-4.11-rc 0/3] Fix wrong sqsize settings in fabrics Christoph Hellwig
2017-04-09 12:29 ` Sagi Grimberg
2017-04-09 19:58   ` Jens Axboe

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.